git.iko.soy/typeable/pandoc
on master help sign in
LaTeX template: move title, author, date up to top of preamble.

This allows header-includes to use them, and puts them in a position where you can see them immediately. Closes #7295.

commitcc088687b4013c2b8b744eb337ed04fc63f315f2 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 16 May 2021, 14:35 (5 years ago) parentd92622b
5 files changed+42−42
data/templates/default.latex+29−29 test/lhs-test.latex+3−3 test/lhs-test.latex+lhs+3−3 test/writer.latex+4−4 test/writers-lang-and-dir.latex+3−3
data/templates/default.latex+29−29
@@ -36,6 +36,35 @@ $for(classoption)$
3636 $classoption$$sep$,
3737$endfor$
3838]{$documentclass$}
39+$if(title)$
40+\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
41+$endif$
42+$if(subtitle)$
43+$if(beamer)$
44+$else$
45+\usepackage{etoolbox}
46+\makeatletter
47+\providecommand{\subtitle}[1]{% add subtitle to \maketitle
48+ \apptocmd{\@title}{\par {\large #1 \par}}{}{}
49+}
50+\makeatother
51+$endif$
52+\subtitle{$subtitle$}
53+$endif$
54+\author{$for(author)$$author$$sep$ \and $endfor$}
55+\date{$date$}
56+$if(beamer)$
57+$if(institute)$
58+\institute{$for(institute)$$institute$$sep$ \and $endfor$}
59+$endif$
60+$if(titlegraphic)$
61+\titlegraphic{\includegraphics{$titlegraphic$}}
62+$endif$
63+$if(logo)$
64+\logo{\includegraphics{$logo$}}
65+$endif$
66+$endif$
67+
3968$if(beamer)$
4069$if(background-image)$
4170\usebackgroundtemplate{%
@@ -423,35 +452,6 @@ $if(csquotes)$
423452\usepackage{csquotes}
424453$endif$
425454
426−$if(title)$
427−\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
428−$endif$
429−$if(subtitle)$
430−$if(beamer)$
431−$else$
432−\usepackage{etoolbox}
433−\makeatletter
434−\providecommand{\subtitle}[1]{% add subtitle to \maketitle
435− \apptocmd{\@title}{\par {\large #1 \par}}{}{}
436−}
437−\makeatother
438−$endif$
439−\subtitle{$subtitle$}
440−$endif$
441−\author{$for(author)$$author$$sep$ \and $endfor$}
442−\date{$date$}
443−$if(beamer)$
444−$if(institute)$
445−\institute{$for(institute)$$institute$$sep$ \and $endfor$}
446−$endif$
447−$if(titlegraphic)$
448−\titlegraphic{\includegraphics{$titlegraphic$}}
449−$endif$
450−$if(logo)$
451−\logo{\includegraphics{$logo$}}
452−$endif$
453−$endif$
454−
455455\begin{document}
456456$if(has-frontmatter)$
457457\frontmatter
test/lhs-test.latex+3−3
@@ -4,6 +4,9 @@
44%
55\documentclass[
66]{article}
7+\author{}
8+\date{}
9+
710\usepackage{amsmath,amssymb}
811\usepackage{lmodern}
912\usepackage{iftex}
@@ -85,9 +88,6 @@
8588 \usepackage{selnolig} % disable illegal ligatures
8689\fi
8790
88−\author{}
89−\date{}
90−
9191\begin{document}
9292
9393\hypertarget{lhs-test}{%
test/lhs-test.latex+lhs+3−3
@@ -4,6 +4,9 @@
44%
55\documentclass[
66]{article}
7+\author{}
8+\date{}
9+
710\usepackage{amsmath,amssymb}
811\usepackage{lmodern}
912\usepackage{iftex}
@@ -52,9 +55,6 @@
5255 \usepackage{selnolig} % disable illegal ligatures
5356\fi
5457
55−\author{}
56−\date{}
57−
5858\begin{document}
5959
6060\hypertarget{lhs-test}{%
test/writer.latex+4−4
@@ -4,6 +4,10 @@
44%
55\documentclass[
66]{article}
7+\title{Pandoc Test Suite}
8+\author{John MacFarlane \and Anonymous}
9+\date{July 17, 2006}
10+
711\usepackage{amsmath,amssymb}
812\usepackage{lmodern}
913\usepackage{iftex}
@@ -67,10 +71,6 @@
6771 \usepackage{selnolig} % disable illegal ligatures
6872\fi
6973
70−\title{Pandoc Test Suite}
71−\author{John MacFarlane \and Anonymous}
72−\date{July 17, 2006}
73−
7474\begin{document}
7575\maketitle
7676
test/writers-lang-and-dir.latex+3−3
@@ -5,6 +5,9 @@
55\documentclass[
66 english,
77]{article}
8+\author{}
9+\date{}
10+
811\usepackage{amsmath,amssymb}
912\usepackage{lmodern}
1013\usepackage{iftex}
@@ -84,9 +87,6 @@
8487 \newenvironment{LTR}{\beginL}{\endL}
8588\fi
8689
87−\author{}
88−\date{}
89−
9090\begin{document}
9191
9292\hypertarget{empty-divs-and-spans}{%