2

This question is related to this question here

What I want to do is move the date, which is placed at the bottom of front page by amsart package, to the place under author's name, that is, at the top of the front page.

One of the answer in the linked page is as following

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}
  {\ifx\@empty\@dedicatory}
  {\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi
   \ifx\@empty\@dedicatory}
  {}{}
\patchcmd{\@adminfootnotes}
  {\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi}
  {}{}{}
\makeatother

Yes, by this code, the date was moved to the place under the authors name. However, the date which produced by amsart package, which is place at the bottom of front page, is still there. That is, I have two dates, one is under author's name, which is I want, and another one is placed at the bottom of the front page, which is I want to remove. (see image below)

enter image description here

Can anybody help me about this? Thank you!

PS: here is an minimum working example

\documentclass[english, reqno]{amsart}
\usepackage{geometry}            % See geometry.pdf to learn the layout options. There are lots.
\usepackage{amssymb,amsmath,amsthm,amsfonts,color}
%\usepackage{graphicx}
\usepackage{mathrsfs,dsfont, comment,mathscinet}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{mathtools}
\usepackage{babel}
\usepackage{enumerate,esint}
\usepackage{natbib}


\usepackage{indentfirst}
\usepackage{bm}
\usepackage{picinpar}
\usepackage{lipsum}


\usepackage[toc,page]{appendix}


\usepackage{etoolbox}
\usepackage{authblk}
\usepackage{amsaddr}


%\usepackage{showkeys}


%----------------------------------------------------------------------------------------%
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{} %clears the header and footer, otherwise the elements of the default "plain" page style will appear.
\rhead{Section \thesubsection}
\lhead{Page \thepage}
%\cfoot{Page \thepage}
\renewcommand{\headrulewidth}{0.3pt}

% see https://www.sharelatex.com/learn/Headers_and_footers for more options
%----------------------------------------------------------------------------------------%


%----------------------------------------------------------------------------------------%
% This command moves the data from the place of footnotes to the top of front page
\makeatletter
\patchcmd{\@maketitle}
  {\ifx\@empty\@dedicatory}
  {\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi
   \ifx\@empty\@dedicatory}
  {}{}
\patchcmd{\@adminfootnotes}
  {\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi}
  {}{}{}
\makeatother
%----------------------------------------------------------------------------------------%




\allowdisplaybreaks

\mathtoolsset{showonlyrefs} %This command will only number the equation which is referred later.















\title{Title}
\author[1]{author}
\date{\today}        
 \address[xxx]{address}



\setlength{\parindent}{0cm}
\begin{document}
\maketitle
ssss

\end{document}
  • The code works for me. If it doesn't work that means the patching failed. Please post a compilable minimum example so we can double check for any errors, and/or post the log file from the build that shows the date in the footnote. – Willie Wong Jul 29 '16 at 4:28
  • @WillieWong added. Thank you for your comment! – JumpJump Jul 29 '16 at 4:32
3

The problem is that you are loading the amsaddr package, which redefines the title building process.

Replace the second patch command to patch \@maketitle and not \@adminfootnotes. As below:

\makeatletter
\patchcmd{\@maketitle}
  {\ifx\@empty\@dedicatory}
  {\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi
   \ifx\@empty\@dedicatory}
  {}{}
\patchcmd{\@maketitle}   % <----- This line changed
  {\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi}
  {}{}{}
\makeatother

One may think that instead of patching it twice, why not just replace the line

\ifx\@empty\@date\else \@footnotetext{\@setdate}\fi

directly by

\ifx\@empty\@date \else {\vskip3ex \centering\footnotesize\@date\par\vskip1ex}\fi

and use only one call to \patchcmd. If you do that you will end up with the date at the very tip top of the page, and not below the author name as requested. This is due to the particular order in which the commands used to build the title are issued.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.