Skip to content

Commit

Permalink
Merge pull request #252 from robjhyndman/master
Browse files Browse the repository at this point in the history
Switched to titling package and maketitle for latex
  • Loading branch information
jjallaire committed Sep 15, 2014
2 parents b177903 + ef41eb4 commit 698dfdd
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions inst/rmd/latex/default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -130,36 +130,47 @@
\fi
$endif$

%%% Change title format to be more compact
\usepackage{titling}
\setlength{\droptitle}{-2em}
$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$


\begin{document}

$if(title)$
\begin{center}
\huge $title$ \\[0.2cm]
\end{center}
$endif$
$if(author)$
\begin{center}
\large \emph{$for(author)$$author$$sep$ \and $endfor$}\\[0.1cm]
\end{center}
$endif$
$if(date)$
\begin{center}
\large \emph{$date$} \\
\end{center}
$endif$
\normalsize
\maketitle

$if(abstract)$
\begin{abstract}
Expand Down

0 comments on commit 698dfdd

Please sign in to comment.