Hi, On 05/14/2013 04:16 PM, Mojca Miklavec wrote:
Hyphenation patterns could in principle do both simultaneously, but at one point (at 64 or 256 characters in LuaTeX) TeX runs into a problem of "too long word to hyphenate" and simply stops. (I still believe
The 256 char limit is there to simplify coding a bit, and because Hans and I wanted to have a limit somewhere; at that point in time that seemed like the thing-to-do.
But there is no real need for that limit. If you recompile luatex with MAX_WORD_LEN in lang/texlang.h adjusted, you can hyphenate words up to about 1.5MB without any other changes to the source code (the limit depends on the C stack, as currently it uses a static array which resides on the call stack).
However, if you do this, you will run into two other problems:1. no spaces means no flexibility in the line at all (this should be fixable with font expansion or box postprocessing, though) 2. the paragraph pathfinder (i.e. the code tries to minimize badness in the line breaking process) will run into its limits, resulting in suboptimal paragraphs even if problem 1. is fixed (and is a lot harder a problem to solve).
See the attached pdf of a single 230kb-word hyphenated over 40 pages to illustrate the issue (\hfuzz=9pt, otherwise all lines would have had
black boxes). Best wishes, Taco
longword.pdf
Description: Adobe PDF document
