4

My question is closely related to this one.

I'm using pdfLaTeX and microtype with AlegreyaSans as my sans serif font. I managed to adjust the answer given by Ulrike Fischer in the above question in so far, as the small caps are spaced out nicely in both the roman and the sans font in body text. In footnotes, however, tracking only works for the serif font. I've boiled the problem down to this MWE:

\documentclass{article}

\usepackage[osf]{AlegreyaSans}

\usepackage[tracking=true]{microtype}
\DeclareMicrotypeSet*[tracking]{mysmallcaps}{
    encoding = *,
    family = {rm*},
    shape = {sc*, scit},
    font = */AlegreyaSansSC-OsF/*/*/*
    }
\SetTracking{
    encoding = *,
    shape = {sc*, scit},
    family = {rm*},
    font = */AlegreyaSansSC-OsF/*/*/*
    }{500}

\begin{document}
Some \textsc{small caps} in roman.\footnote{Some \textsc{small caps} inside a footnote in roman.}

{\sffamily Some \textsc{small caps} in sans.}\footnote{\sffamily Some \textsc{small caps} inside a footnote in sans.}
\end{document}

Everything is fine in normal body text: body text

But footnotes break the tracking of the sans serif font: enter image description here

What is happening here?

4

Setting up font sets in microtype can be quite hard work. The most important thing that one must understand is that the asterix is not a wildcard, but that is is replaced by a specific value (the default). So the last asterix in the font option e.g. restricts the tracking to normalsize.

As you want to set tracking to the normal shape of "alegeyra smallcaps" family and to the scshape from the main font I can find only this:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[osf]{AlegreyaSans}

\usepackage[tracking=true,letterspace=500]{microtype}

\DeclareMicrotypeSet*[tracking]{mysmallcaps}
  {
    family={cmr},
    shape=sc*,
    font={
          */\AlegreyaSansSCfamily/*/*/*,
          */\AlegreyaSansSCfamily/*/*/footnotesize,
          */\AlegreyaSansSCfamily/*/*/large
          }
  }



\begin{document}
Some \textsc{small caps} in sans. 
\footnotesize  Some \textsc{small caps} in footnotesize.

{\sffamily Some \textsc{small caps} in sans. 
\footnotesize  Some \textsc{small caps} in footnotesize.
\large \textsc{large}}

\end{document}

enter image description here

1
  • Thanks! This perfectly solved my problem! :) I was too distracted by the \footnote command to realise it was simply the size causing the problem. I have yet to completely understand microtypes way of specifying fonts... – einbandi Aug 4 '15 at 7:04

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.