About hyphenation, Please do help

S

sapanparikh18

Can any one suggest a good way of hyphenation in an HTML table? I have
tried ­ but I cant say it is completely automated. I am looking for
some kind of line breaking algorithm. Please do help
 
J

Jukka K. Korpela

Can any one suggest a good way of hyphenation in an HTML table?

There is none.
I have tried ­ but I cant say it is completely automated.

Besides, ­ is far from universally supported, and it will appear as
a visible hyphen in many circumstances.
I am looking for
some kind of line breaking algorithm.

Browsers have some line breaking algorithms, usually poor and
undocumented, but that's a different issue.

Please explain and illustrate the problem. Browsers generally do not
hyphenate words, and this is sometimes a small problem, but what makes
this a big problem? If it's the fixed width you have allocated for a
table column, the solution should be obvious...
 
S

sapanparikh18

I am working in vb right now, where i have a small html control which i
am suppose to use as an input component. It displays a table which is
1.2428 inch in width. By any chance it should not increase that width
but as soon as i get a word longer then 1.2428 Inch the table gets
expanded to fit the word.
Thanks for response,
please reply.
Thanks
 
J

Jukka K. Korpela

I am working in vb right now, where i have a small html control which i
am suppose to use as an input component.

Sounds somewhat enigmatic. A URL would illustrate a lot. Anyway, making the
control (input field) larger might be part of the solution.
It displays a table which is
1.2428 inch in width.

How does an HTML control display a table, and why is it that narrow?
By any chance it should not increase that width

Even if the user needs a very large font size (say 2 inches)?
but as soon as i get a word longer then 1.2428 Inch the table gets
expanded to fit the word.

So is that a problem, or a solution? And how would hyphenation help?

P.S. In future, please quote or paraphrase what you are commenting on; see
http://www.netmeister.org/news/learn2quote.html
 
S

sapanparikh18

How does an HTML control display a table, and why is it that narrow?
This is an HTML Editor control like Front page, and it displays a table
because I have rendered it.
Max font size allowed is very small anyways
Off course this is the problem, i want it not to expand and hyphenate
the word from a proper place
Thanks
 
A

Andy Dingley

Can any one suggest a good way of hyphenation in an HTML table?
[In a somewhat obscure context, hosted within a VB app]

HTML is relatively poor at this. HTML can specify some of it, but
you're at the mercy of how particular browsers might deal with the
actual implementation. HTML is also optimised about displaying "pages"
at a scale that's appropriate for "whole page" viewing. A tiny VB
input control, used more for input than display, isn't quite so
appropriate.

If the default behaviour isn't what you need, then look at using a
different VB control - probably not HTML.
 
J

Jukka K. Korpela

This is an HTML Editor control like Front page, and it displays a table
because I have rendered it.

That doesn't explain what is going on. A URL might help, you know.
Max font size allowed is very small anyways

Then fix the design.
Off course this is the problem, i want it not to expand and hyphenate
the word from a proper place

You haven't told us the real problem (the problem that you made you paint
yourself into a corner), so stay tuned to not getting real answers,
 
S

sapanparikh18

Question is simple
if i write
<table style="width:1.2428in">
<tr>
<td>
pneumonosilicoultramicroscopicvolcanoconiosis or
www.msdn.microft.office.com
</td>
</tr>
</table>

the table's length should always remian 1.2428. This can happen by
entering hyphens whe when the word goes longer than 1.2428

I think this is clear enough this time.
Thanks
 
D

dorayme

the table's length should always remian 1.2428. This can happen by
entering hyphens whe when the word goes longer than 1.2428

I think this is clear enough this time.

I doubt that browsers have the ability to make anything in the
size you specify. An inch on one of my screens is 100px, on
another is about 68px (as I have them set at present). A browser
would need to know a screen resolution and calculate what an inch
and a fraction of an inch across would be, just imagine that and
handling rounding errors and getting it exact!

Imagine the absurd results if it could actually do this and
someone with tired eyes wanted to enlarge the text in the
browser. Does the table still remian 1.2428 inches long and show
only the tiniest bit of the content you wanted?

You need to think through the differences between the print and
screen scenes.
 
S

sapanparikh18

Well I can specify it "in inch" in HTML code as I am more interested in
precise printing, doesn't matter if it doesn't shows up exactly of an
inch on the screen. I am already doing this on different resolution
computers, but it always prints 1.2428 inches.
 
F

frederick

Well I can specify it "in inch" in HTML code as I am more interested in
precise printing, doesn't matter if it doesn't shows up exactly of an
inch on the screen. I am already doing this on different resolution
computers, but it always prints 1.2428 inches.
Then in principle you need separate stylesheets for print and screen.
Of course, in terms of getting things laid out "exactly", you're still
dependent on other people printing on the same size paper, eg what if
you're using US "letter" size but some of your users will be using A4?
I'm not terribly convinced that two different printers would produce
matching results for such an exact measurement, either, but wiser heads
than mine would know about such things.

Also, there's the wider accessibility issue. If someone needs to
"zoom" the font size on screen, it seems a fairly safe bet that they'd
want/need to do the same when printing the page out!

Finally, do you really need such an extraordinarily precise
measurement? Perhaps you should consider keeping the print version as,
say, a PDF, and letting the screen dimensions being more, well,
flexible?
 
J

Jonathan N. Little

Well I can specify it "in inch" in HTML code as I am more interested in
precise printing, doesn't matter if it doesn't shows up exactly of an
inch on the screen. I am already doing this on different resolution
computers, but it always prints 1.2428 inches.

Reliance on precise print formating and HTML is folly! use PDF or
similar technology if precision is required.

Also PLEASE learn how to quote if you wish to use newsgroups!
 
S

sapanparikh18

Reliance on precise print formating and HTML is folly! use PDF orDo you have any idea of such VB control that takes an input on vb form
and outputs a pdf? More over it should support real time editing. Like
entering an image and changing font size etc... After everything is
enterd one can just export a pdf out of it.
Thanks
 
S

sapanparikh18

Reliance on precise print formating and HTML is folly! use PDF orDo you have any idea of such VB control that takes an input on vb form
and outputs a pdf? More over it should support real time editing. Like
entering an image and changing font size etc... After everything is
enterd one can just export a pdf out of it.
Thanks
 
J

Jonathan N. Little

Do you have any idea of such VB control that takes an input on vb form
and outputs a pdf? More over it should support real time editing. Like
entering an image and changing font size etc... After everything is
enterd one can just export a pdf out of it.
Thanks

Not offhand, Google can be your friend. I use PHP and Perl where
libraries are available, I am sure there is for VB as well...but I can
assure that HTML is not the way if precision is required.
 
J

Jukka K. Korpela

Question is simple

It is regarded as elementary courtesy and conduct on Usenet to quote or
paraphrase the message you are commenting on.
if i write
<table style="width:1.2428in">
<tr>
<td>
pneumonosilicoultramicroscopicvolcanoconiosis or
www.msdn.microft.office.com
</td>
</tr>
</table>

Then you do wrong things, as I already explained. You are creating the
problem by setting a fixed width.

The real question is why you are doing this. There's no reason to use a table
in this case, by the way. You are still not telling anything about the real
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top