About hyphenation, Please do help

Discussion in 'HTML' started by sapanparikh18@gmail.com, Apr 12, 2006.

  1. Guest

    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
     
    , Apr 12, 2006
    #1
    1. Advertising

  2. wrote:

    > 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...
     
    Jukka K. Korpela, Apr 12, 2006
    #2
    1. Advertising

  3. Guest

    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
     
    , Apr 12, 2006
    #3
  4. wrote:

    > 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

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Apr 12, 2006
    #4
  5. Guest

    >>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.

    >>Even if the user needs a very large font size (say 2 inches)?

    Max font size allowed is very small anyways

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

    Off course this is the problem, i want it not to expand and hyphenate
    the word from a proper place
    Thanks
     
    , Apr 13, 2006
    #5
  6. Andy Dingley Guest

    wrote:
    > 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.
     
    Andy Dingley, Apr 13, 2006
    #6
  7. wrote:

    >>>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.


    That doesn't explain what is going on. A URL might help, you know.

    >>>Even if the user needs a very large font size (say 2 inches)?

    > Max font size allowed is very small anyways


    Then fix the design.

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

    > 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,

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Apr 13, 2006
    #7
  8. Guest

    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
     
    , Apr 13, 2006
    #8
  9. dorayme Guest

    In article
    <>,
    wrote:

    > 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.

    --
    dorayme
     
    dorayme, Apr 14, 2006
    #9
  10. Guest

    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.
     
    , Apr 14, 2006
    #10
  11. Guest

    wrote:
    > 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?


    --
    AGw.
     
    , Apr 14, 2006
    #11
  12. wrote:
    > 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!

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Apr 14, 2006
    #12
  13. Guest

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

    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
     
    , Apr 14, 2006
    #13
  14. Guest

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

    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
     
    , Apr 14, 2006
    #14
  15. wrote:
    >>> Reliance on precise print formating and HTML is folly! use PDF or
    >>> similar technology if precision is required.

    > 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.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Apr 14, 2006
    #15
  16. Guest

    Thanks a lot
     
    , Apr 14, 2006
    #16
  17. wrote:

    > 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.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, Apr 15, 2006
    #17
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmFobWFu?=

    Hyphenation in string causes newline

    =?Utf-8?B?QmFobWFu?=, Aug 30, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    333
    =?Utf-8?B?QmFobWFu?=
    Aug 30, 2006
  2. Replies:
    2
    Views:
    550
  3. Dr. leo
    Replies:
    0
    Views:
    271
    Dr. leo
    Feb 13, 2008
  4. Dr. leo
    Replies:
    5
    Views:
    308
    thebjorn
    Feb 25, 2008
  5. Dr. leo
    Replies:
    0
    Views:
    248
    Dr. leo
    Feb 27, 2008
Loading...

Share This Page