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$
|
$endfor$
|
||||||
\fi
|
\fi
|
||||||
$endif$
|
$endif$
|
||||||
|
\newif\ifbibliography
|
||||||
$if(natbib)$
|
$if(natbib)$
|
||||||
\usepackage{natbib}
|
\usepackage{natbib}
|
||||||
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
|
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
|
||||||
|
@ -129,9 +130,12 @@ $endif$
|
||||||
\frame{\partpage}
|
\frame{\partpage}
|
||||||
}
|
}
|
||||||
\AtBeginSection{
|
\AtBeginSection{
|
||||||
\let\insertsectionnumber\relax
|
\ifbibliography
|
||||||
\let\sectionname\relax
|
\else
|
||||||
\frame{\sectionpage}
|
\let\insertsectionnumber\relax
|
||||||
|
\let\sectionname\relax
|
||||||
|
\frame{\sectionpage}
|
||||||
|
\fi
|
||||||
}
|
}
|
||||||
\AtBeginSubsection{
|
\AtBeginSubsection{
|
||||||
\let\insertsubsectionnumber\relax
|
\let\insertsubsectionnumber\relax
|
||||||
|
@ -215,6 +219,7 @@ $else$
|
||||||
$endif$
|
$endif$
|
||||||
$endif$
|
$endif$
|
||||||
\begin{frame}[allowframebreaks]{$biblio-title$}
|
\begin{frame}[allowframebreaks]{$biblio-title$}
|
||||||
|
\bibliographytrue
|
||||||
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
|
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
@ -222,6 +227,7 @@ $endif$
|
||||||
$endif$
|
$endif$
|
||||||
$if(biblatex)$
|
$if(biblatex)$
|
||||||
\begin{frame}[allowframebreaks]{$biblio-title$}
|
\begin{frame}[allowframebreaks]{$biblio-title$}
|
||||||
|
\bibliographytrue
|
||||||
\printbibliography[heading=none]
|
\printbibliography[heading=none]
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue