I'm typesetting a document in German blackletter with XeLaTeX and ran across a peculiar — for want of a better word — error:
The hyphenation in itself is okay at that position. However, German blackletter typesetting rules would require a long ſ before the hyphen.
The font I'm using offers a stylistic set that does a good job of identifying which s should stay s and which should turn into ſ. Apparantly, though, this stylistic set isn't applied until after TeX has finished hypenating the word in question because if the word shown there is not hyphenated, it is rendered correctly as flüſſige.
I had the following thoughts on how to circumvent that:
- Adding a ZWJ between the ses (
\char"200D
) - Adding a ZWNJ before the ses (
\char"200C
) - Adding
"|
(ligature breaker as defined bypolyglossia
) or\/
In the first two cases, hyphenation is suppressed altogether (but checking a different mischosen s variant I seem to be able to confirm that nothing happened at all). The third case, of course, adds an additional break point and thus induces incorrect hyphenation.
Are there any options to force TeX to render the correct s glyph without entering it in plain text? Something like:
- modifying the hypenation char to read a two-character sequence including something that induces the correct s? (unlikely from the answers to this question and the missing answers to this question
- Adding some additional glyph choosing mechanism designed to only capture special cases not properly rendered by the font's stylistic set?
- …
The font is UnifrakturMaguntia and all information about it including downloads can be found on its Sourceforge page.
On a side note: The documentation (page 31; in German) implies that an s after an other character and preceeding another s be rendered as ſ. Now I'm not sure if TeX somehow suppresses the undisplayable characters or if that is an error of the font's side. If the former, is there any zero-width character that won't be gobbled?
The important part of the code:
\documentclass[12pt,a4paper,twoside]{scrreport}
\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true,spelling=new,script=fraktur]{german}
\setmainfont[Mapping=tex-text,StylisticSet=11]{UnifrakturMaguntia}
\makeatletter
\begingroup\lccode`~=`"
\lowercase{\endgroup
\everymath{\let~\eu@active@quote}
\everydisplay{\let~\eu@active@quote}
}
\makeatother % This code is included to keep German TeX ligatures such as
% % "~ active, despite amsmath package.
\newcommand\zwj{\char"200D} % defines \zwj as zero-width joiner
\newcommand\zwnj{\char"200C} % defines \zwnj as zero-width non-joiner
\begin{document}
Einfüllung mit dem Laufmittelgemisch aufgeschlämmt und unter Stickstoffüberdruck gepackt. Flüssige
und ölige Proben wurden in wenig Laufmittelgemisch angelöst und mit einer Pasteurpipette vorsichtig auf die
Silicaschicht aufgetragen. Feststoffe, die sich nicht in wenig Laufmittelgemisch lösen ließen, wurden mit einem
passenden Lösungsmittel gelöst, mit Kieselgel versetzt, das Lösungsmittel am Rotationsverdampfer entfernt und
\noindent (Think of the same text repeating) Flüs\zwj sige (etc.)
\noindent (Think of the same text repeating) Flü\zwnj ssige (etc.)
\noindent (Think of the same text repeating) Flü"|ssige (etc.)
\end{document}
There is more in my actual document. I just realised the incorrect s before the hyphen at that position, so I experimented and found I could reproduce it by adding at least those lines of text that I wrote down here. I have no idea how to make columns smaller to force hyphenation (that would help testing a lot, though).