Beamer template: fix incompatibility of section slides with natbib.
Natbib (and presumably biblatex) bibliography commands create their own section. Since these are in frame environments, we have an incompatibility with the `\AtBeginSection` macro which creates a special frame when a new section occurs. (We can't have a frame inside another frame.) This change disables `\AtBeginSection` inside bibliography slides. This supersedes #145. See discussion tehre.
This commit is contained in:
parent
de2e524e7d
commit
a3c8439ad6
1 changed files with 9 additions and 3 deletions
|
@ -78,6 +78,7 @@ $for(polyglossia-otherlangs)$
|
|||
$endfor$
|
||||
\fi
|
||||
$endif$
|
||||
\newif\ifbibliography
|
||||
$if(natbib)$
|
||||
\usepackage{natbib}
|
||||
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
|
||||
|
@ -129,9 +130,12 @@ $endif$
|
|||
\frame{\partpage}
|
||||
}
|
||||
\AtBeginSection{
|
||||
\ifbibliography
|
||||
\else
|
||||
\let\insertsectionnumber\relax
|
||||
\let\sectionname\relax
|
||||
\frame{\sectionpage}
|
||||
\fi
|
||||
}
|
||||
\AtBeginSubsection{
|
||||
\let\insertsubsectionnumber\relax
|
||||
|
@ -215,6 +219,7 @@ $else$
|
|||
$endif$
|
||||
$endif$
|
||||
\begin{frame}[allowframebreaks]{$biblio-title$}
|
||||
\bibliographytrue
|
||||
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
|
||||
\end{frame}
|
||||
|
||||
|
@ -222,6 +227,7 @@ $endif$
|
|||
$endif$
|
||||
$if(biblatex)$
|
||||
\begin{frame}[allowframebreaks]{$biblio-title$}
|
||||
\bibliographytrue
|
||||
\printbibliography[heading=none]
|
||||
\end{frame}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue