diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-07-21 22:05:21 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-07-21 22:05:21 -0700 |
commit | 748aa920f6cdbe5c7f828a706a048eda8340abc7 (patch) | |
tree | 8d77b2b65e62854b8a78de711ea0d59d206c29d8 /data | |
parent | e592904087a74d7014088f8d64dfea2f98da84fe (diff) | |
download | pandoc-748aa920f6cdbe5c7f828a706a048eda8340abc7.tar.gz |
Moved some beamer code in default.latex template.
This change allows beamer themes to change the
template and font (as Metropolis does).
Closes #4450.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/default.latex | 72 |
1 files changed, 35 insertions, 37 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex index 31093374f..4d1eeb56a 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -20,6 +20,41 @@ $endif$ $for(beameroption)$ \setbeameroption{$beameroption$} $endfor$ +% Prevent slide breaks in the middle of a paragraph: +\widowpenalties 1 10000 +\raggedbottom +$if(section-titles)$ +\setbeamertemplate{part page}{ +\centering +\begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par +\end{beamercolorbox} +} +\setbeamertemplate{section page}{ +\centering +\begin{beamercolorbox}[sep=12pt,center]{part title} + \usebeamerfont{section title}\insertsection\par +\end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ +\centering +\begin{beamercolorbox}[sep=8pt,center]{part title} + \usebeamerfont{subsection title}\insertsubsection\par +\end{beamercolorbox} +} +\AtBeginPart{ + \frame{\partpage} +} +\AtBeginSection{ + \ifbibliography + \else + \frame{\sectionpage} + \fi +} +\AtBeginSubsection{ + \frame{\subsectionpage} +} +$endif$ $endif$ $if(beamerarticle)$ \usepackage{beamerarticle} % needs to be loaded first @@ -198,43 +233,6 @@ $if(graphics)$ % using explicit options in \includegraphics[width, height, ...]{} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ -$if(beamer)$ -% Prevent slide breaks in the middle of a paragraph: -\widowpenalties 1 10000 -\raggedbottom -$if(section-titles)$ -\setbeamertemplate{part page}{ -\centering -\begin{beamercolorbox}[sep=16pt,center]{part title} - \usebeamerfont{part title}\insertpart\par -\end{beamercolorbox} -} -\setbeamertemplate{section page}{ -\centering -\begin{beamercolorbox}[sep=12pt,center]{part title} - \usebeamerfont{section title}\insertsection\par -\end{beamercolorbox} -} -\setbeamertemplate{subsection page}{ -\centering -\begin{beamercolorbox}[sep=8pt,center]{part title} - \usebeamerfont{subsection title}\insertsubsection\par -\end{beamercolorbox} -} -\AtBeginPart{ - \frame{\partpage} -} -\AtBeginSection{ - \ifbibliography - \else - \frame{\sectionpage} - \fi -} -\AtBeginSubsection{ - \frame{\subsectionpage} -} -$endif$ -$endif$ $if(links-as-notes)$ % Make links footnotes instead of hotlinks: \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} |