From e5573bca8f8c92bf96ed1525fb29fc8fb61dc44c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 20 Nov 2015 14:36:47 -0800 Subject: latex template changes. * Removed setting of `subject` in PDF metadata. This used to be set to the subtitle, but really the subtitle need not give the subject. Also, `subtitle` can contain formatting, so we'd need, at least, a plain text version for this. * Moved `header-includes` before setting of `\title`, `\author`, etc. This allows these macros to be redefined. * Use `\subtitle` command for `subtitle`, instead of tacking it on to the title as before. We give a no-op fallback definition if it is not defined. This change should produce much better results in classes that support `\subtitle`. With the default article class, which does not define `\subtitle`, subtitles will no longer be printed unless the user defines `\subtitle` and redefines `\maketitle`. * Moved redefinitions of `\paragraph` and `\subparagraph` to before header-includes. --- tests/lhs-test.latex | 5 ++--- tests/lhs-test.latex+lhs | 5 ++--- tests/writer.latex | 9 ++++----- tests/writers-lang-and-dir.latex | 19 +++++++++---------- 4 files changed, 17 insertions(+), 21 deletions(-) (limited to 'tests') diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex index f7b6eb2d7..f7bc3b73b 100644 --- a/tests/lhs-test.latex +++ b/tests/lhs-test.latex @@ -72,9 +72,6 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{0} - -\date{} - % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph @@ -85,6 +82,8 @@ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi +\date{} + \begin{document} \section{lhs test}\label{lhs-test} diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs index c9501a2cb..f306beb32 100644 --- a/tests/lhs-test.latex+lhs +++ b/tests/lhs-test.latex+lhs @@ -36,9 +36,6 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{0} - -\date{} - % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph @@ -49,6 +46,8 @@ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi +\date{} + \begin{document} \section{lhs test}\label{lhs-test} diff --git a/tests/writer.latex b/tests/writer.latex index ceee122a4..9102758e9 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -50,11 +50,6 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{0} - -\title{Pandoc Test Suite} -\author{John MacFarlane \and Anonymous} -\date{July 17, 2006} - % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph @@ -65,6 +60,10 @@ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi +\title{Pandoc Test Suite} +\author{John MacFarlane \and Anonymous} +\date{July 17, 2006} + \begin{document} \maketitle diff --git a/tests/writers-lang-and-dir.latex b/tests/writers-lang-and-dir.latex index 3f4ecd5e3..5e8ea293a 100644 --- a/tests/writers-lang-and-dir.latex +++ b/tests/writers-lang-and-dir.latex @@ -54,6 +54,15 @@ \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{0} +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi \ifxetex % load bidi as late as possible as it modifies e.g. graphicx \usepackage{bidi} @@ -68,16 +77,6 @@ \date{} -% Redefines (sub)paragraphs to behave more like sections -\ifx\paragraph\undefined\else -\let\oldparagraph\paragraph -\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else -\let\oldsubparagraph\subparagraph -\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} -\fi - \begin{document} \section{Empty Divs and Spans}\label{empty-divs-and-spans} -- cgit v1.2.3