aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-10-29 10:10:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-10-29 10:10:42 -0700
commita3c8439ad6e8d1da89be1069a9d62bedd62a3279 (patch)
treefbc9a3b33f99ac80996f1e5894bf7731f365bbfc
parentde2e524e7df0a9d4159f2794deaa2e1847c87d46 (diff)
downloadpandoc-a3c8439ad6e8d1da89be1069a9d62bedd62a3279.tar.gz
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.
-rw-r--r--default.beamer12
1 files changed, 9 insertions, 3 deletions
diff --git a/default.beamer b/default.beamer
index dcbc16196..f4e4be990 100644
--- a/default.beamer
+++ b/default.beamer
@@ -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{
- \let\insertsectionnumber\relax
- \let\sectionname\relax
- \frame{\sectionpage}
+ \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}