# How to add date on the title page while using jcappub.sty?

I am using jcappub.sty. For instance -

\documentclass[a4paper,11pt]{article}
\pdfoutput=1
\usepackage{jcappub}
\title{Title}
\author{Me}
\begin{document}
\maketitle
\date{\today}
\section{Section:1}
.
.
\end{document}


I am trying to add the date on the title page. I followed the suggestion by samcarter_is_at_topanswers.xyz-

\makeatletter
\@date
\makeatother


But the date is going to be shown on the content-page. Is there any solution?

• How are you using that package? Please provide a minimal working example. – muzimuzhi Z Mar 11 '20 at 4:43
• Can you make the example more complete, e.g. containing a document environment and generating (at least) the title-page output. Knowing how the title-page is generated is important. – muzimuzhi Z Mar 11 '20 at 4:54
• By JCAP-author-manual.pdf, jcappub.sty redefines \maketitle so that date is not shown. If you are using this package to submit to jcap, there is no need to change its title-page style. – muzimuzhi Z Mar 11 '20 at 20:08
• Before submitting to JCAAP, I need to submit to our research group. And there I need to mention the date on the manuscript page. – PoreyS Mar 12 '20 at 4:00

## 1 Answer

According to the discussion under question, one can add the date info to title-page by directly inputing date in \author{...}, or by patching \maketitle.

The following example patches \maketitle and add date info on title-page, directly under author.

\documentclass[a4paper,11pt]{article}
\usepackage{jcappub}
\title{Title}
\author{Me}
\date{\today}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\maketitle}
{\the\auth@toks\par}
{\the\auth@toks\par\textmd{\@date}\par}
{}{}
\makeatother

\begin{document}
\maketitle

\section{Section:1}
.
.
\end{document}