[XeTeX] Discretionary hyphens don't work in paragraphed footnotes
Jonathan Kew
jfkthame at gmail.com
Fri Oct 9 11:50:02 CEST 2015
On 7/10/15 16:18, Peter Mukunda Pasedach wrote:
> Dear XeTeX list,
>
> in the following example,
>
> \documentclass[a4paper]{article}
> \usepackage{fontspec}
> \usepackage[para]{footmisc}
> \begin{document}
> \footnote{XXXXXXXXXXXXXX just a few normal words to fill up the line
> up to my word hy\-phe\-na\-te\-me}
> \end{document}
>
> the discretionary hyphens don't work. The combination required to
> produce this behaviour seems to be xelatex + paragraphed footnotes
> (here using the para option of footmisc, as it might be the easiest
> example, but also with manyfoot, bigfoot and eledmac) + fontspec. It
> looks like a bug to me. I've reported it here:
> http://sourceforge.net/p/xetex/bugs/118/ , sorry if my mail now would
> be considered crossposting, but I haven't seen any activity on this.
>
> I should maybe mention that I'm dealing with critical editions of
> Texts in Sanskrit in transliteration, for which, as far as I'm aware
> of, there is no solution for a reasonable default hyphenation i.e. via
> polyglossia, so that discretionary hyphens are the normal way of
> taking care of proper hyphenation.
>
> Peter
Just to follow up, now that we understand what's happening: here's a
workaround I believe you could use in your xelatex document (if you
haven't already solved it there). I notice that LaTeX uses an internal
\@dischyph command, and periodically resets \- to this, so adding a
zero-width kern to \@dischyph seems to work:
\catcode`@=11
\edef\@dischyph{\@dischyph \kern0pt }
\let\-=\@dischyph
\catcode`@=12
Include this in your preamble, and the discretionary hyphens in the
footnote should work as expected.
JK
More information about the XeTeX
mailing list