1

How does one change the font of only the \structure{} elements globally in the preamble in a beamer class, let's say to italics?

I was hoping that \setbeamerfont{structure}{shape=\itshape} does the trick, but it changes the frame titles as well. \setbeamerfont{local structure}{shape=\itshape} seems to have no effect.

Minimal example:

\documentclass{beamer}

\begin{document}
\begin{frame}{Title}
  \begin{itemize}
    \item \structure{make me italic!}
    \item \structure{me too!}
  \end{itemize}
\end{frame}

\end{document}

1
  • That is because many elements inherit it's font from structure, but you can always redefine them \setbeamerfont{frametitle}{parent=structure,size=\Large} without the parent=structure entry. May 8, 2016 at 14:41

1 Answer 1

2

As structure is used as parent of many elements, you might have to redefine more than just the frametitle.

\documentclass{beamer}

\setbeamerfont{structure}{shape=\itshape}
\setbeamerfont{frametitle}{shape=\normalfont,size=\Large}

\begin{document}
\begin{frame}{Title}
  \begin{itemize}
    \item \structure{make me italic!}
    \item \structure{me too!}
  \end{itemize}
\end{frame}

\end{document}

For others using alert instead of structure may be a less work intensive alternative.

\documentclass{beamer}

\setbeamerfont{alerted text}{shape=\itshape}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg}

\begin{document}
\begin{frame}{Title}
  \begin{itemize}
    \item \alert{make me italic!}
    \item \alert{me too!}
  \end{itemize}
\end{frame}

\end{document}

enter image description here

2
  • Thanks. Unfortunately, \alert will not work since I use this for other purposes. I was not aware that \structure is used for other things internally. I thought this is just a way to highlight something more softly than with \alert.
    – Daniel
    May 8, 2016 at 15:09
  • @Daniel I edited my question to go with your original structure command, but you might encounter other places which will be affected. May 8, 2016 at 19:07

You must log in to answer this question.

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