3

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?

\documentclass[a4paper]{article}
\pagestyle{empty}
\setlength{\textwidth}{17em}

\RequirePackage{lipsum}

\RequirePackage{fontspec}
\setmainfont{cmunrm.otf}

\RequirePackage{polyglossia}
\setmainlanguage{english}
\addto\captionsenglish{\prehyphenchar=`¶ \posthyphenchar=`¶}
\prehyphenchar=`¶ \posthyphenchar=`¶

\begin{document}

\begin{english}
\lipsum*[1]\par
{\addfontfeature{Path}---any feature: hyphen reset---}\par
\lipsum*[1]\par
\end{english}

\end{document}

PDF output

gnucchi
  • 946

0 Answers0