I'm trying to emphasize some words in the title of a beamer document. Ex :
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usetheme{Warsaw}%\usetheme{m}%-->problem
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\title{Hello \protect\alert{World}!}
\author{}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
Which gives the following result :
But I want to use a theme for the document ( metropolis : see https://github.com/matze/mtheme ). The problem is that errors appear during compilation while using this theme instead of Warsaw theme. The error message is :
"! Undefined control sequence.
\beamer@sort #1#2->\long \def \beamer@todo
{#1}\def \beamer@ospec {}\beamer@...
l.12 \end{frame}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Argument of \beamerx@\alert has an extra }.
<inserted text>
..."
Is there a way to emphasize some part of the title using this theme (with \alert{}
or \textbf
or other environment) ?
Best Answer
If
\title
is defined after\begin{document}
but before\maketitle
, the problem is solved.Similar solution can be applied with other themes when
TiKZ
is used.