Tuesday, August 28, 2012

(Xe-|Lua-)LaTeX, Fontspec and endash, emdash

Historically we have used xelatex to typeset a larger publication. When we tried to convert to lualatex we hit a problem with emdashes and endashes showing in the document as --- and -- respectively.
The problem is not entirely clear to me. It appears to be caused by two different chars representing -  and is apparently related to the fontspecmode node, the renderer full and the fact that the loader is implemented differently in luatex and xetex. Contex had the same problem but has been fixed, luatex not apparently

If you care about the details read this discussion on stackexchange and this thread on comp.text.tex.

The problem as well as the solution unfortunately depends on the font. Try
the option  Ligatures=TeX for the font and if that doesn't work also try Renderer=basic, like
\setmainfont[Ligatures=TeX,Renderer=Basic,SmallCapsFont={* SC}]{LMU CompatilText}
or in
\defaultfontfeatures{Ligatures=TeX,Renderer=Basic}

Hopefully this works for you. It did for us.

No comments:

Post a Comment