Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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 at 14:22
4  
What's the problem in using babel along with fontspec? –  egreg Jun 24 at 14:26

2 Answers 2

up vote 5 down vote accepted

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}
share|improve this answer
    
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 at 14:50

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.