[Tex/LaTex] How to change font of all \structure in beamer

beamerfonts

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}

Best Answer

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