5

Ligatures set by Latex are often wrong in German (i.e. between combined words like "Auflaufform"). To set these words correct I often use rmligs which is a great tool to disable ligatures when the use of them would be wrong.

rmligs places a "| between the letters of a "wrong ligature".

Unfortunately the use of "| doesn't work for me if I use xelatex and fontspec (it seems to require babel).

Is there a correct method to disable ligatures when I'm forced to use xelatex and fontspec?

This is not a question about disabling only specific ligatures or disable ligatures generally.

  • 2
    Is using LuaLaTeX instead of XeLaTeX an option for you? If it is, you could use the selnolig package (with language option ngerman) to suppress ligatures selectively. – Mico Jun 24 '14 at 14:22
  • 5
    What's the problem in using babel along with fontspec? – egreg Jun 24 '14 at 14:26
5

I tried running rmligs on the following file

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}

\begin{document}
Auflaufform
\end{document}

This resulted in writing out

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}

\begin{document}
Auf"|lauf"|form
\end{document}

which I ran XeLaTeX on, getting

enter image description here

The same result is obtained if the original file is

\documentclass{article}
\usepackage[babelshorthands]{polyglossia}
\setmainlanguage[spelling=new]{german}
\usepackage{fontspec}

\begin{document}
Auflaufform
\end{document}
  • Thank you, I got an error clash if using babel and polyglossia together and an Auflauf"|form as result. Now it works fine. – schmendrich Jun 24 '14 at 14:50
  • Hm. With texlive 2017 on a mac the polyglossa example produces ligatures for me. I would much prefer an automatic solution with xelatex. – Stefan Müller Nov 26 '17 at 9:51
3

If using LuaLaTeX instead of XeLaTeX is an option for you, then running LuaLaTeX on

\documentclass[ngerman]{article}
\usepackage{fontspec,babel,selnolig}
\begin{document}
Auflaufform 

auffällig 

Stoffisolator
\end{document}

produces

enter image description here

without the need to run rmligs (or some other pre-preprocessor) on the input file.

  • Thank you, this is good to know and I will give it a try. – schmendrich Jun 24 '14 at 15:21
  • 1
    @Sverre - Many thanks for the edit! :-) – Mico Jun 24 '14 at 15:36

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.