aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-07-03 15:21:43 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-07-03 15:34:42 -0700
commit972db3cdcac19bca0dd4e0957514a48bbf1feacb (patch)
treefe87f77060792f91c878a436166f5c2eeaf40b72
parente00e5a4cc27dd5b995887f8152bb71da4f2792c9 (diff)
downloadpandoc-972db3cdcac19bca0dd4e0957514a48bbf1feacb.tar.gz
Revert "LaTeX template: move title, author, date up to top of preamble."
This reverts commit cc088687b4013c2b8b744eb337ed04fc63f315f2 and PR #7295. This fixes issues people had when using LaTeX commands defined later in the preamble (or in some cases UTF-8 text) in the title or author fields. Closes #7422.
-rw-r--r--data/templates/default.latex58
-rw-r--r--test/lhs-test.latex6
-rw-r--r--test/lhs-test.latex+lhs6
-rw-r--r--test/writer.latex8
-rw-r--r--test/writers-lang-and-dir.latex6
5 files changed, 42 insertions, 42 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex
index 60f9972c2..d06701675 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -36,35 +36,6 @@ $for(classoption)$
$classoption$$sep$,
$endfor$
]{$documentclass$}
-$if(title)$
-\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
-$endif$
-$if(subtitle)$
-$if(beamer)$
-$else$
-\usepackage{etoolbox}
-\makeatletter
-\providecommand{\subtitle}[1]{% add subtitle to \maketitle
- \apptocmd{\@title}{\par {\large #1 \par}}{}{}
-}
-\makeatother
-$endif$
-\subtitle{$subtitle$}
-$endif$
-\author{$for(author)$$author$$sep$ \and $endfor$}
-\date{$date$}
-$if(beamer)$
-$if(institute)$
-\institute{$for(institute)$$institute$$sep$ \and $endfor$}
-$endif$
-$if(titlegraphic)$
-\titlegraphic{\includegraphics{$titlegraphic$}}
-$endif$
-$if(logo)$
-\logo{\includegraphics{$logo$}}
-$endif$
-$endif$
-
$if(beamer)$
$if(background-image)$
\usebackgroundtemplate{%
@@ -452,6 +423,35 @@ $if(csquotes)$
\usepackage{csquotes}
$endif$
+$if(title)$
+\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
+$endif$
+$if(subtitle)$
+$if(beamer)$
+$else$
+\usepackage{etoolbox}
+\makeatletter
+\providecommand{\subtitle}[1]{% add subtitle to \maketitle
+ \apptocmd{\@title}{\par {\large #1 \par}}{}{}
+}
+\makeatother
+$endif$
+\subtitle{$subtitle$}
+$endif$
+\author{$for(author)$$author$$sep$ \and $endfor$}
+\date{$date$}
+$if(beamer)$
+$if(institute)$
+\institute{$for(institute)$$institute$$sep$ \and $endfor$}
+$endif$
+$if(titlegraphic)$
+\titlegraphic{\includegraphics{$titlegraphic$}}
+$endif$
+$if(logo)$
+\logo{\includegraphics{$logo$}}
+$endif$
+$endif$
+
\begin{document}
$if(has-frontmatter)$
\frontmatter
diff --git a/test/lhs-test.latex b/test/lhs-test.latex
index 20bc6ae19..fdc344335 100644
--- a/test/lhs-test.latex
+++ b/test/lhs-test.latex
@@ -4,9 +4,6 @@
%
\documentclass[
]{article}
-\author{}
-\date{}
-
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
@@ -88,6 +85,9 @@
\usepackage{selnolig} % disable illegal ligatures
\fi
+\author{}
+\date{}
+
\begin{document}
\hypertarget{lhs-test}{%
diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs
index 327dac4ef..f9149ba02 100644
--- a/test/lhs-test.latex+lhs
+++ b/test/lhs-test.latex+lhs
@@ -4,9 +4,6 @@
%
\documentclass[
]{article}
-\author{}
-\date{}
-
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
@@ -55,6 +52,9 @@
\usepackage{selnolig} % disable illegal ligatures
\fi
+\author{}
+\date{}
+
\begin{document}
\hypertarget{lhs-test}{%
diff --git a/test/writer.latex b/test/writer.latex
index 468c271bc..abf772df4 100644
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -4,10 +4,6 @@
%
\documentclass[
]{article}
-\title{Pandoc Test Suite}
-\author{John MacFarlane \and Anonymous}
-\date{July 17, 2006}
-
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
@@ -71,6 +67,10 @@
\usepackage{selnolig} % disable illegal ligatures
\fi
+\title{Pandoc Test Suite}
+\author{John MacFarlane \and Anonymous}
+\date{July 17, 2006}
+
\begin{document}
\maketitle
diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex
index e06fe05ed..d91f77325 100644
--- a/test/writers-lang-and-dir.latex
+++ b/test/writers-lang-and-dir.latex
@@ -5,9 +5,6 @@
\documentclass[
english,
]{article}
-\author{}
-\date{}
-
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
@@ -87,6 +84,9 @@
\newenvironment{LTR}{\beginL}{\endL}
\fi
+\author{}
+\date{}
+
\begin{document}
\hypertarget{empty-divs-and-spans}{%