Skip to content

Commit

Permalink
Updated titling formatting to allow for missing components
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Sep 15, 2014
1 parent 10f2085 commit ef41eb4
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions inst/rmd/latex/default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,36 @@
%%% Change title format to be more compact
\usepackage{titling}
\setlength{\droptitle}{-2em}
\pretitle{\vspace{\droptitle}\centering\huge}
\posttitle{\par}
\preauthor{\centering\large\emph}
\postauthor{\par}
\predate{\centering\large\emph}
\postdate{\par}

$if(title)$
\title{$title$}
\title{$title$}
\pretitle{\vspace{\droptitle}\centering\huge}
\posttitle{\par}
$else$
\title{}
\pretitle{\vspace{\droptitle}}
\posttitle{}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
\preauthor{\centering\large\emph}
\postauthor{\par}
$else$
\author{}
\preauthor{}\postauthor{}
$endif$
$if(date)$
\predate{\centering\large\emph}
\postdate{\par}
\date{$date$}
$else$
\date{}
\predate{}\postdate{}
$endif$

$if(subtitle)$
\subtitle{$subtitle$}
$endif$
\author{$for(author)$$author$$sep$ \and $endfor$}
\date{$date$}

$for(header-includes)$
$header-includes$
$endfor$
Expand Down

0 comments on commit ef41eb4

Please sign in to comment.