From ee44d44f20d2a06648efe72a6836c24a179c8146 Mon Sep 17 00:00:00 2001 From: Yihui Xie <xie@yihui.name> Date: Thu, 5 Dec 2019 12:22:31 -0600 Subject: [PATCH] Keep the \author{} command even if author is not specified (#5961) Otherwise there will be a LaTeX warning "No \author given" when the .tex file is compiled. This does not affect spacing in the title block. --- data/templates/default.latex | 2 -- test/lhs-test.latex | 1 + test/lhs-test.latex+lhs | 1 + test/writers-lang-and-dir.latex | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/templates/default.latex b/data/templates/default.latex index 20d5493f4..ed4b8ea33 100644 --- a/data/templates/default.latex +++ b/data/templates/default.latex @@ -383,9 +383,7 @@ $else$ $endif$ \subtitle{$subtitle$} $endif$ -$if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} -$endif$ \date{$date$} $if(beamer)$ $if(institute)$ diff --git a/test/lhs-test.latex b/test/lhs-test.latex index a456995a3..706aaf490 100644 --- a/test/lhs-test.latex +++ b/test/lhs-test.latex @@ -82,6 +82,7 @@ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{-\maxdimen} % remove section numbering +\author{} \date{} \begin{document} diff --git a/test/lhs-test.latex+lhs b/test/lhs-test.latex+lhs index e2860024d..806cf598d 100644 --- a/test/lhs-test.latex+lhs +++ b/test/lhs-test.latex+lhs @@ -49,6 +49,7 @@ \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setcounter{secnumdepth}{-\maxdimen} % remove section numbering +\author{} \date{} \begin{document} diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex index 02ff8b451..a9eefb32f 100644 --- a/test/writers-lang-and-dir.latex +++ b/test/writers-lang-and-dir.latex @@ -78,6 +78,7 @@ \newenvironment{LTR}{\beginL}{\endL} \fi +\author{} \date{} \begin{document}