2

Where are the hyphenations patterns? Are they the same for xelatex and polyglossia as for latex and babel? (Links to information on how to modify them would also be appreciated.)

3

You can find them, in TeX Live 2015, in

/usr/local/texlive/2015/texmf-dist/tex/generic/hyph-utf8/patterns

The distinction should not be made between babel and polyglossia, but between 8-bit engines (like pdftex) and Unicode engines (XeTeX and LuaTeX). However, up to a certain extent, all engines can share most of the hyphenation patterns through a clever translation process.

If you want to study how hyphenation in TeX works, you must read Appendix H of the TeXbook; something about it is also in TeX by Topic.

Modifying a set of hyphenation patterns is quite easy: they're text files, after all. Applying meaningful and coherent changes is a very different matter. Some of the sets are made from grammatical rules (it's so for Italian) and they are quite simple to read and modify. Changing the patterns for British English without a deep knowledge of patgen is hopeless. The program patgen is able to distill patterns from lists of already hyphenated words; it requires expertise that just a few people in the world possess (I'm certainly not among them).

  • Thanks. I tried copying hyph-en-gb.tex to the same directory in texmf-local, ran texhash, changed one of the exceptions, loaded [variant=uk]{english}, and did \showhyphens{university}. But the change hadn’t been applied. Any idea what I’m doing wrong? – Toothrot Sep 17 '15 at 19:38
  • 1
    @Lawrence Hyphenation patterns are not loaded at runtime; you have to regenerate the formats for the new patterns to have effect. Or use LuaLaTeX, that indeed loads the patterns at runtime. – egreg Sep 17 '15 at 19:44
  • How do I regenerate the format? – Toothrot Sep 17 '15 at 19:51
  • @Lawrence man fmtutil-sys – egreg Sep 17 '15 at 19:51
  • Sorry, could you be a bit more specific? (I looked at the man file, but I still don’t understand what I have to do to regenerate the format (whatever that is) from hyph-en-gb.tex – Toothrot Sep 17 '15 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.