This question is similar, but applies only to XETEX.

In LuaTEX, \prehyphenchar and \posthyphenchar supposedly affect the current language:

All languages start out with \prehyphenchar=`\-, \posthyphenchar=0, \preexhyphenchar=0 and \postexhyphenchar=0. When you assign the values of one of these four parameters, you are actually changing the settings for the current \language, this behaviour is compatible with \patterns and \hyphenation.
(LuaTEX Reference v1.0.7, section 4.4)

However, after changing \addfontfeature, both of those reset to the defaults. Can the hyphenation characters be made permanent? How?




\addto\captionsenglish{\prehyphenchar=`¶ \posthyphenchar=`¶}
\prehyphenchar=`¶ \posthyphenchar=`¶


{\addfontfeature{Path}---any feature: hyphen reset---}\par


PDF output

  • fontspec (re)set the values in \__fontspec_init:. Imho this is wrong for luatex, as there the values are tied to languages and not fonts. Open an issue in the github repo of fontspec. – Ulrike Fischer Jan 1 at 17:41
  • I created an issue here. – svenper Jan 1 at 18:07

Your Answer

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

Browse other questions tagged or ask your own question.