2

After a font change, proper curly quotes disappear under XeLaTex (and LuaLaTex)in the area after the change, but remain properly generated in the area before the change. I can't figure out why. Both fonts have proper curly quotes in their glyph set. I've tried other secondary fonts with the same results. Here's a MWE:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode


\documentclass[fontsize=11pt,paper=5in:8in,DIV=12]{scrbook} 

\usepackage[english]{babel}

\usepackage{fontspec}
\setmainfont{Bembo Std}



\begin{document}


 ``You see, Lena, this is a good place because the truck drivers eat    here. They always know where the best food is.''

 \newfontfamily\myfont{Alegreya}
\begingroup
\myfont
and began what he himself has termed a ``fanatical devotion'' to  swimming.
\endgroup


\end{document}
  • You are missing the Ligatures option: \newfontfamily\myfont{Alegreya}[Ligatures=TeX]. – Ulrike Fischer Mar 15 '17 at 16:03
  • I didn't realize the word "TeX" was case sensitive. Otherwise it throws the following error: LaTeX error: "kernel/key-choice unknown" Key 'fontspec/Ligatures' accepts only a fixed set of choices. See the LaTeX3 documentation for further information. For immediate help type H return. The key 'fontspec/Ligatures' only accepts predefined values, and 'Tex' is not one of these. – user26732 Mar 15 '17 at 16:22
  • Please make this an answer since the text now compiles properly. – user26732 Mar 15 '17 at 16:23
3

You are missing the Ligatures option:

\newfontfamily\myfont{Alegreya}[Ligatures=TeX]

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.