6

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}
1
  • The TeX Gyre fonts exist in Opentype format!
    – Bernard
    Aug 7, 2014 at 11:23

1 Answer 1

6

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .