I found a beamer template I want to use. However, it compiles with
! LaTeX Error: Command \beamer@@tmpop@section page@default already defined.
Or name \end… illegal, see p.192 of the manual.
The error may reside somewhere below. Can you find it?
\usecolortheme{crane}
\setbeamerfont{section title}{parent=title}
\setbeamercolor{section title}{parent=titlelike}
\defbeamertemplate*{section page}{default}[1][]
{
\centering
\begin{beamercolorbox}[sep=8pt,center,#1]{section title}
\usebeamerfont{section title}\insertsection\par
\end{beamercolorbox}
}
\newcommand*{\sectionpage}{\usebeamertemplate*{section page}}
\newcommand{\comment}[1]{}
%include polycode.fmt
\begin{document}
\title{Practical introduction to Agda}
EDIT: There's a witness that the template might work
Best Answer
Some of the code added by the template does nowt except causing errors so far as I can tell. Other parts do try to do something, but not in the right way. This means they cause errors and potentially make no difference, depending on what TeX does in response to the errors.
Let's see what it does...
What is the default?
OK. So this sets the section title in the same size font as the title of the presentation, rather than switching to
\Large
. This is OK if you want this.What's the default?
So the code from the template does nothing. It is, however, harmless. It is just pointless.
What's the default?
So the template omits any title defined by
\part{}
, if there is one, reduces the separation and eliminates theSection <Number>
from above the section title. So this tries to do something. However, it does it in the wrong way and causes errors. Moreover, the errors mean that Beamer at least partially ignores the changes it tries to implement:If you want these changes, do it effectively and avoid the errors:
But do note that the template makes no attempt to alter the subsection title pages:
So your presentation will be somewhat inconsistently formatted - perhaps that's part of the design.
Here's the default:
So, this code creates a new command with the same name as an existing command, which doesn't work as it causes an error, but which would do precisely the same as the original if it did work. Brilliant.
De-templated code:
De-templated output:
Corrected templated code:
Corrected (technically - not aesthetically) templated output: