mirror of https://github.com/matze/mtheme.git
Use package option to \protect frame titles
Using \protect disables the MakeLowercase command which looks weird with titles set in small caps. For all those who want to use \cite, \ref and co. can now use the `protectframetitles` package option.
This commit is contained in:
parent
30a8dcd9ad
commit
181a0d6452
|
@ -43,6 +43,10 @@ progress bar underneath *each* frame title
|
|||
|
||||
![Progressbar](http://i.imgur.com/4BXHU4K.png)
|
||||
|
||||
In order to use `\cite`, `\ref` and similar commands in a frame title you have
|
||||
to protect the title. This can be done automatically with the
|
||||
`protectframetitle` option.
|
||||
|
||||
|
||||
#### Commands
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
\@useTitleProgressBarfalse
|
||||
\DeclareOption{titleprogressbar}{\@useTitleProgressBartrue}
|
||||
|
||||
\newif\if@protectFrameTitle
|
||||
\@protectFrameTitlefalse
|
||||
\DeclareOption{protectframetitle}{\@protectFrameTitletrue}
|
||||
|
||||
\ProcessOptions\relax
|
||||
|
||||
%}}}
|
||||
|
@ -206,7 +210,11 @@
|
|||
\setbeamertemplate{frametitle}{%
|
||||
\nointerlineskip
|
||||
\begin{beamercolorbox}[wd=\paperwidth,leftskip=0.3cm,rightskip=0.3cm,ht=2.5ex,dp=1.5ex]{frametitle}
|
||||
\if@protectFrameTitle
|
||||
\usebeamerfont{frametitle}\MakeLowercase{\protect\insertframetitle}%
|
||||
\else
|
||||
\usebeamerfont{frametitle}\MakeLowercase{\insertframetitle}%
|
||||
\fi
|
||||
\end{beamercolorbox}%
|
||||
\if@useTitleProgressBar
|
||||
\vspace{-.6em}
|
||||
|
|
Loading…
Reference in New Issue