From 6b43289e74928059924fa990caf9e90316985491 Mon Sep 17 00:00:00 2001
From: Jonas Smedegaard <dr@jones.dk>
Date: Wed, 10 Dec 2014 02:25:44 +0100
Subject: Support subtitle (not done with documentclass paper).

---
 template.tex | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'template.tex')

diff --git a/template.tex b/template.tex
index 8cdbd0f..3f8103d 100644
--- a/template.tex
+++ b/template.tex
@@ -131,6 +131,19 @@ $endif$
 $if(title)$
 \title{$title$}
 $if(subtitle)$
+% add subtitle in \maketitle, if not done already by documentclass "paper"
+\IfFileExists{xifthen.sty}{%
+  \usepackage{xifthen}
+  \ifthenelse{\isnamedefined{subtitle}}{}{%
+    \def\@subtitle{} \def\subtitle##1{\gdef\@subtitle{##1}}
+    \IfFileExists{titling.sty}{%
+      \usepackage{titling}
+      \posttitle{\par\end{center}} % avoid immediate \vskip
+      \renewcommand{\maketitlehookb}{%
+        \begin{center}\Large \@subtitle \par\end{center}\vskip 0.5em}
+      }{}
+    }
+  }{}
 \subtitle{$subtitle$}
 $endif$
 $if(author)$
-- 
cgit v1.2.3

