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.
This commit is contained in:
Yihui Xie 2019-12-05 12:22:31 -06:00 committed by John MacFarlane
parent e7833c4dfb
commit ee44d44f20
4 changed files with 3 additions and 2 deletions

View file

@ -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)$

View file

@ -82,6 +82,7 @@
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\author{}
\date{}
\begin{document}

View file

@ -49,6 +49,7 @@
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\author{}
\date{}
\begin{document}

View file

@ -78,6 +78,7 @@
\newenvironment{LTR}{\beginL}{\endL}
\fi
\author{}
\date{}
\begin{document}