sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.61k stars 97 forks source link

Support OpenOffice-style hyphenation patterns #277

Open brawer opened 8 years ago

brawer commented 8 years ago

Could SILE support OpenOffice-style hyphenation patterns? The pattern syntax would be a small extension to TeX hyphenation patterns. This helps supporting languages where hyphenation changes the string. For example: Catalan [ca] paral·lel → paral-lel; German [de-1901] Zucker → Zuk-ker; Swedish [sv] tillåta → till-låta.

This paper explains the motivation, pattern syntax, and implementation: https://www.tug.org/TUGboat/tb27-1/tb86nemeth.pdf

simoncozens commented 8 years ago

I'm in favour of this - in theory. In practice, I think I would like to see it implemented as a separate hyphenator, possibly subclassing hyphenator-liang rather than modifying it. Ideally there'd be a C library we could use which handles hyphenation, but I don't think Open/LibreOffice is implemented like that. I think I probably won't get around to this myself but it would be a fun thing for others to implement.

khaledhosny commented 8 years ago

I think libhyphen would handle the new patterns, given that it is maintained by the same person AFAIK, but I haven’t checked that.

cmahte commented 8 years ago

I'm a bit confused maybe, but that paper on Open Office hyphenation is related to OO 2.0. On or around OO 3.0, Open Office dumped it's own hyphenation and now uses hunspell logic? Is that paper describing an ongoing supported concern?

On Tue, Feb 23, 2016 at 6:24 AM, Khaled Hosny notifications@github.com wrote:

I think libhyphen https://sourceforge.net/projects/hunspell/files/Hyphen/ would handle the new patterns, given that it is maintained by the same person AFAIK, but I haven’t checked that.

— Reply to this email directly or view it on GitHub https://github.com/simoncozens/sile/issues/277#issuecomment-187679410.

khaledhosny commented 8 years ago

This seems to be the current home for libhypeh https://github.com/hunspell/hyphen, and it seems to be indeed what LibreOffice uses for its hyphenation support.