[Tex/LaTex] Use the values of \title, \author and \date on a custom title page

titles

I am trying to create a title page of my own.

Is there a way to make use of the \title, \author and \date commands inside the title page?

For instance:

...
\title{Something Cool}
\author{Cool Dude}
\date{\today}

\begin{document}
\begin{titlepage}

The title is \title
It was written by \author on \date

\end{titlepage}
\end{document}

Basically I just want to know if there is a way to leverage the information stored in \title, \author and \date inside the title page.

Best Answer

The \title, \author and \date macros save their argument into \@title, \@author, and \@date, respectively. You can use these macros after \makeatletter. Afterward, use \makeatother. Note that they are cleared by \maketitle.

\title{Example}
\author{Me}
\date{\today}

% ...

\makeatletter
\begin{titlepage}

The title is \@title
It was written by \@author\space on \@date

\end{titlepage}
\makeatother