-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeated hyphen at end of line #1
Comments
I've fixed this in the example (KP.pl) for an ordinary hyphen (U+002D), and see that Knuth-Plass refuses to split after an em-dash, so that still needs looking into. It's still up in the air whether such special treatment (suppress the extra hyphen after splitting at a hyphen or dash) should be moved upstream into KnuthPlass.pm. |
See PDF::Builder's |
See also both #2 and #3 regarding word/line splitting in general. Various sorts of hyphens and dashes need to be handled consistently and in accordance with UniCode rules. If a line (or word) can be split after a hyphen or dash (and possibly other punctuation), normally you would not need to add any form of hyphen at the end of the line. This brings up the point of how to split a line (mentioned in #4) when mixing LTR and RTL text -- what hyphen to use and where on the line to place it. For example:
(I'm not even sure whether the split German line is to the physical left or right of the RTL Hebrew text, much less where the split word's hyphen goes. Assume the document is RTL overall.) |
The original problem of an extra hyphen has been fixed in the examples (calling program), so I will remove the "bug" label. Since other line-split dashes, etc. still need to be handled somewhere, I'll add an "enhancement" label. |
I can see in
examples/KP.pl
(paragraph-shaping example) that one place where a compound word was split at a hard hyphen (ASCII x2D) results in a new hyphen being added, giving a double hyphen--
at the end of the line. I haven't yet tracked down whether this is a problem in Text::KnuthPlass, or something that should be handled in the calling code (KP.pl).A similar issue will probably arise with soft hyphens, non-breaking hyphens, narrow-hyphens, and various dashes (en-, em-, fig-). I would like to take care of all of them together, in a consistent manner, rather than chasing them down one at a time.
The text was updated successfully, but these errors were encountered: