mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-23 16:56:43 +00:00
This reverts commit 3f1f58e96e.
The reason for reverting this change is that it led to an
undesirable behavior change. Documents with no explicit date
specified now have a date printed, because the default
title block will include a date if no `\date` command is used.
The empty `\date{}`, by contrast, suppressed the date, which
is the desirable behavior.
PR #10687 was motivated by the desire to include a custom `\date`
in the frontmatter via header-includes. I think that aim can
be achieved more simply by simply setting the `date` variable.
In markdown you can even use `date:` in metadata and put some
raw LaTeX there.
205 lines
4.7 KiB
Plaintext
205 lines
4.7 KiB
Plaintext
$passoptions.latex()$
|
|
\documentclass[
|
|
$if(fontsize)$
|
|
$fontsize$,
|
|
$endif$
|
|
ignorenonframetext,
|
|
$if(handout)$
|
|
handout,
|
|
$endif$
|
|
$if(aspectratio)$
|
|
aspectratio=$aspectratio$,
|
|
$endif$
|
|
$if(babel-lang)$
|
|
$babel-lang$,
|
|
$endif$
|
|
$for(classoption)$
|
|
$classoption$$sep$,
|
|
$endfor$
|
|
]{$documentclass$}
|
|
$if(geometry)$
|
|
\geometry{$for(geometry)$$geometry$$sep$,$endfor$}
|
|
$endif$
|
|
\newif\ifbibliography
|
|
$if(background-image)$
|
|
\usebackgroundtemplate{%
|
|
\includegraphics[width=\paperwidth]{$background-image$}%
|
|
}
|
|
% In beamer background-image does not work well when other images are used, so this is the workaround
|
|
\pgfdeclareimage[width=\paperwidth,height=\paperheight]{background}{$background-image$}
|
|
\usebackgroundtemplate{\pgfuseimage{background}}
|
|
$endif$
|
|
\usepackage{pgfpages}
|
|
\setbeamertemplate{caption}[numbered]
|
|
\setbeamertemplate{caption label separator}{: }
|
|
\setbeamercolor{caption name}{fg=normal text.fg}
|
|
\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
|
|
$--
|
|
$-- section numbering
|
|
$--
|
|
$if(numbersections)$
|
|
$else$
|
|
% remove section numbering
|
|
\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]{section title}
|
|
\usebeamerfont{section title}\insertsection\par
|
|
\end{beamercolorbox}
|
|
}
|
|
\setbeamertemplate{subsection page}{
|
|
\centering
|
|
\begin{beamercolorbox}[sep=8pt,center]{subsection title}
|
|
\usebeamerfont{subsection title}\insertsubsection\par
|
|
\end{beamercolorbox}
|
|
}
|
|
$endif$
|
|
$for(beameroption)$
|
|
\setbeameroption{$beameroption$}
|
|
$endfor$
|
|
% Prevent slide breaks in the middle of a paragraph
|
|
\widowpenalties 1 10000
|
|
\raggedbottom
|
|
$if(section-titles)$
|
|
\AtBeginPart{
|
|
\frame{\partpage}
|
|
}
|
|
\AtBeginSection{
|
|
\ifbibliography
|
|
\else
|
|
\frame{\sectionpage}
|
|
\fi
|
|
}
|
|
\AtBeginSubsection{
|
|
\frame{\subsectionpage}
|
|
}
|
|
$endif$
|
|
$fonts.latex()$
|
|
$-- Set Beamer theme before user font settings so they can override theme
|
|
$if(theme)$
|
|
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
|
|
$endif$
|
|
$if(colortheme)$
|
|
\usecolortheme[$for(colorthemeoptions)$$colorthemeoptions$$sep$,$endfor$]{$colortheme$}
|
|
$endif$
|
|
$if(fonttheme)$
|
|
\usefonttheme[$for(fontthemeoptions)$$fontthemeoptions$$sep$,$endfor$]{$fonttheme$}
|
|
$endif$
|
|
$if(mainfont)$
|
|
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
|
|
$endif$
|
|
$if(innertheme)$
|
|
\useinnertheme[$for(innerthemeoptions)$$innerthemeoptions$$sep$,$endfor$]{$innertheme$}
|
|
$endif$
|
|
$if(outertheme)$
|
|
\useoutertheme[$for(outerthemeoptions)$$outerthemeoptions$$sep$,$endfor$]{$outertheme$}
|
|
$endif$
|
|
$font-settings.latex()$
|
|
$common.latex()$
|
|
$for(header-includes)$
|
|
$header-includes$
|
|
$endfor$
|
|
$after-header-includes.latex()$
|
|
$hypersetup.latex()$
|
|
|
|
$if(title)$
|
|
\title$if(shorttitle)$[$shorttitle$]$endif${$title$$if(thanks)$\thanks{$thanks$}$endif$}
|
|
$endif$
|
|
$if(subtitle)$
|
|
\subtitle$if(shortsubtitle)$[$shortsubtitle$]$endif${$subtitle$}
|
|
$endif$
|
|
\author$if(shortauthor)$[$shortauthor$]$endif${$for(author)$$author$$sep$ \and $endfor$}
|
|
\date$if(shortdate)$[$shortdate$]$endif${$date$}
|
|
$if(institute)$
|
|
\institute$if(shortinstitute)$[$shortinstitute$]$endif${$for(institute)$$institute$$sep$ \and $endfor$}
|
|
$endif$
|
|
$if(titlegraphic)$
|
|
\titlegraphic{
|
|
$for(titlegraphic)$
|
|
\includegraphics$if(titlegraphicoptions)$[$for(titlegraphicoptions)$$titlegraphicoptions$$sep$, $endfor$]$endif${$titlegraphic$}$sep$\enspace
|
|
$endfor$}
|
|
$endif$
|
|
$if(logo)$
|
|
\logo{\includegraphics{$logo$}}
|
|
$endif$
|
|
|
|
\begin{document}
|
|
$if(title)$
|
|
\frame{\titlepage}
|
|
$if(abstract)$
|
|
\begin{abstract}
|
|
$abstract$
|
|
\end{abstract}
|
|
$endif$
|
|
$endif$
|
|
|
|
$for(include-before)$
|
|
$include-before$
|
|
|
|
$endfor$
|
|
$if(toc)$
|
|
$if(toc-title)$
|
|
\renewcommand*\contentsname{$toc-title$}
|
|
$endif$
|
|
\begin{frame}[allowframebreaks]
|
|
$if(toc-title)$
|
|
\frametitle{$toc-title$}
|
|
$endif$
|
|
\setcounter{tocdepth}{$toc-depth$}
|
|
\tableofcontents
|
|
\end{frame}
|
|
\setcounter{tocdepth}{$toc-depth$}
|
|
\tableofcontents
|
|
}
|
|
$endif$
|
|
$if(lof)$
|
|
\listoffigures
|
|
$endif$
|
|
$if(lot)$
|
|
\listoftables
|
|
$endif$
|
|
$if(linestretch)$
|
|
\setstretch{$linestretch$}
|
|
$endif$
|
|
$body$
|
|
|
|
$if(natbib)$
|
|
$if(bibliography)$
|
|
$if(biblio-title)$
|
|
$if(has-chapters)$
|
|
\renewcommand\bibname{$biblio-title$}
|
|
$else$
|
|
\renewcommand\refname{$biblio-title$}
|
|
$endif$
|
|
$endif$
|
|
\begin{frame}[allowframebreaks]{$biblio-title$}
|
|
$if(nocite-ids)$
|
|
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
|
|
$endif$
|
|
\bibliographytrue
|
|
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
|
|
\end{frame}
|
|
|
|
$endif$
|
|
$endif$
|
|
$if(biblatex)$
|
|
\begin{frame}[allowframebreaks]{$biblio-title$}
|
|
$if(nocite-ids)$
|
|
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
|
|
$endif$
|
|
\bibliographytrue
|
|
\printbibliography[heading=none]
|
|
\end{frame}
|
|
|
|
$endif$
|
|
$for(include-after)$
|
|
$include-after$
|
|
|
|
$endfor$
|
|
\end{document}
|