The titling
package allows users to customise the appearance of the document title, to include multiple titles etc. In addition to allowing customisation of \maketitle
, it defines a new environment, titlingpage
, which is similar to titlepage
but allows the use of \maketitle
within the environment to typeset the title, author, date etc.
Here's an example based on code from page 5 of the manual:
\documentclass{article}
\usepackage{titling}
\title{Title}
\author{Author}
\begin{document}
\begin{titlingpage}
\setlength{\droptitle}{30pt}% lower the title
\maketitle
A few words\dots
\begin{abstract}A few more words\dots\end{abstract}
\end{titlingpage}
\end{document}
In trying to answer this question, I tried to use titlingpage
to typeset the title below an image to be typeset first. When this failed, I produced the following modification of the above example:
\documentclass{article}
\usepackage{titling}
\title{Title}
\author{Author}
\begin{document}
\begin{titlingpage}
A few words\dots
\setlength{\droptitle}{30pt} % lower the title
\maketitle
\begin{abstract}A few more words\dots\end{abstract}
\end{titlingpage}
\end{document}
Not what I expected based on the documentation....
Obviously, it is possible to use titlingpage
, like titlepage
, to typeset the title below other things here. But I cannot figure out how to do so using \maketitle
.
Is this a bug or a feature? Either way, is there a workaround? (If a feature, is this a bug in the documentation?!)
Note that on page 4, the manual says that it defines \maketitle
'essentially' as follows:
\renewcommand{\maketitle}{%
\vspace*{\droptitle}
\maketitlehooka
{\pretitle \title \posttitle}
\maketitlehookb
{\preauthor \author \postauthor}
\maketitlehookc
{\predate \date \postdate}
\maketitlehookd
}
So, again, nothing to suggest that \maketitle
will itself start a new page - especially in the titlingpage
environment.
I'm assuming this is not really how it is defined. (And, indeed, the actual code when the titlepage
option is not active and the document is in one-column mode includes a suspicious-looking newpage
...)
It seems to me that titlingpage
ought to do something like
\let\oldnewpage\newpage
\let\newpage\relax
and
\let\newpage\oldnewpage
at the beginning and end of the environment if titlingpage
is to work as advertised. (But I'm sure this particular suggestion would either not work at all or have horrible side-effects or both.)