5

Is there a way to set the small caps font for use in the Dialogue package? If I use the tgtermes font everything works fine; unfortunately I'm working in another language so I need an Open Type font and while I have a small caps font I'd like to use (Alegreya SC), even though I've set the main font as Alegreya I don't get small caps under the Dialogue package.

MWE:

\documentclass{book}
\usepackage{dialogue}
\usepackage[spanish]{babel}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Alegreya}

%\setmainfont{Alegreya}[SmallCapsFont={Alegreya SC}
\linespread{1.2}
\begin{document}
\begin{dialogue}

\speak{Menón} Sí, Sócrates.
\speak{Sócrates} Ya te dije. 

\end{dialogue}
  • The TeX Gyre fonts exist in Opentype format! – Bernard Aug 7 '14 at 11:23
5

This works:

\documentclass{book}

\usepackage[spanish]{babel}
\usepackage{fontspec}
\usepackage{dialogue}

\setmainfont{Alegreya}[
  SmallCapsFont={Alegreya SC},
]

\begin{document}

\begin{dialogue}

\speak{Menón} Sí, Sócrates.
\speak{Sócrates} Ya te dije.

\end{dialogue}

\end{document}

If you have an older version of fontspec, the syntax for \setmainfont would be

\setmainfont[
  Ligatures=TeX,
  SmallCapsFont={Alegreya SC},
]{Alegreya}

Don't load xunicode and xltxtra.

enter image description here

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.