[Tex/LaTex] Small Caps in beamer class – \rmfamily\scshape command doesn’t work

beamerbeamerpostersmall-caps

I'm making a poster with the beamer class and want some of the text with Small Caps. I found out that the default font of the beamer class is sans serif and it does not have small capitals, but I don't want to change all my text font.

Looking here, here and here I tried these solutions and all possible combinations of them:

  • use {\rmfamily \scshape my text here}
  • \usepackage[T1]{fontenc}
  • use \textsc{ my text here}

But none worked. I'm trying to use the small caps along with the \large command, and I thought it could be the problem, but I saw someone using it with \huge and all worked well.

What can I do to have the small capital text without changing the entire text font? Here is what I have, in case I'm overriding the command I want (you can see some of the combinations I tried there):

\documentclass{beamer}
\usepackage{beamerthemeshadow}

\setbeamertemplate{headline}{
\begin{block}

\begin{center}
    \large{{{\rmfamily\scshape Universidade} E\textsc{stadual de} {\rmfamily\textsc{Campinas}} - IMECC}} 
\end{center}
\end{block}
}

\begin{document}
\begin{frame}

\end{frame}
\end{document}

P.S. I'm using a template from someone else, so I do not really understand all that is being made in this code.

UPDATE: When making the MWE, I discovered that when I remove the bemaerthemeshadow package, the problem disappear. But removing it from my poster made some of the text to stay with a not so pretty formatting, then I would like to keep it.

Best Answer

The standard fonts don't have (sans) serif boldface small caps. Thus you get almost random substitutions.

Since you seem to be using \rmfamily, you can get away with this (simpler) code:

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{beamerthemeshadow}


\setbeamertemplate{headline}{%
  \begin{block}{}
  \centering\large\rmfamily\scshape Universidade
  Estadual de Campinas - IMECC
  \end{block}%
}

\begin{document}
\begin{frame}

\end{frame}
\end{document}

enter image description here

Related Question