[Tex/LaTex] \thanks{} footnote indented when using amsart and doc

amsartdocumentationfootnotesindentation

When using the amsart document class in combination with the doc package, I get an extra indent in the thanks footnote of the first author:

\documentclass{amsart}
\usepackage{doc}
\begin{document}
\title{title}
\author{first author}
\thanks{thanks1}
\author{second author}
\thanks{thanks2}
\maketitle
\end{document}

yields

crop of footnote of complication

Is there any way to circumvent this behaviour?

Best Answer

An update of \@setthanks seems to suffice:

enter image description here

\documentclass{amsart}
\usepackage{doc}

\makeatletter
\def\@setthanks{\vspace{-\baselineskip}\def\thanks##1{\@par##1\@addpunct.}\thankses}
\makeatother

\begin{document}

\title{title}
\author{first author}
\thanks{thanks1}
\author{second author}
\thanks{thanks2}

\maketitle

\end{document}

amsart mentions

In order to make multiple thanks footnotes work inside a single \@footnotetext argument we need to make the first \par be ignored. Cf. \@setthanks.

and then sets \def\par{\let\par\@par} as the first thing in \@footnotetext. So, using \@par from the start with every \thanks introduces the vertical skip which is reverted using \vspace{-\baselineskip}.