4

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?

1
  • 3
    quick analysis -- the doc package redefines \maketitle and within it, it redefines \@makefnmark, overwriting the redefinition for the "adminiatrative footnotes" in amsart. i'm trying to find a concise workaround that doesn't destroy the other things that doc is intended to do. (the top matter is handled quite differently in ams document classes than in the basic latex classes. doc is designed to be used with the basic classes. i'm not surprised at this incompatibility, and there may well be more not yet discovered.) Feb 18, 2015 at 14:12

5 Answers 5

2
+50

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}.

1
  • Ah, this seems to be what I'm looking for :)
    – Jonathan
    Feb 26, 2015 at 8:38
3

patch the portions of the \maketitle command in doc.sty that set the footnote indentation to use the values from amsart:

\documentclass{amsart}
\usepackage{etoolbox}
\usepackage{doc}
\patchcmd\maketitle
  {\parindent 1em}{\parindent\normalparindent}%
  {}{}
\patchcmd\maketitle
  {\hbox to1.8em}{\hbox to\normalparindent}%
  {}{}
\begin{document}
\title{title}
\author{first author}
\thanks{thanks1}
\author{second author}
\thanks{thanks2}
\maketitle
\end{document}
3
  • This is the \patchcmd version of @patrick-happel's solution, right? Also very nice, thank you.
    – Jonathan
    Feb 26, 2015 at 8:40
  • @Jonathan -- yes, this is equivalent to the solution you refer to. either of these solutions would likely be acceptable in an article submitted to the ams for publication. i've never seen a submission using the doc package, but doc isn't on the ams list of "discouraged" or incompatible packages. Feb 26, 2015 at 13:45
  • thank you for the information! The reason for this (unconventional) combination is that I used the doc package to document some code related to an article writen in amsart and I wanted the code documentation to be in the same format as the article .... Everything else seems to have worked fine out of the box, though.
    – Jonathan
    Feb 26, 2015 at 14:15
2

You could for example change the definition of \@makefntext in the definition of \maketitle by the doc package.

\documentclass{amsart}
\usepackage{doc}
\makeatletter
\def\maketitle{\par
      \begingroup
        \def\thefootnote{\fnsymbol{footnote}}%
      \setcounter{footnote}\z@
      \def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
      \long\def\@makefntext##1{\noindent
          \ifnum\c@footnote>\z@\relax
            \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1%
          \else
          \hbox to1.8em{\hfill}%
            \parbox{\dimexpr\linewidth-1.8em}{\raggedright ##1}%
          \fi}
      \if@twocolumn\twocolumn[\@maketitle]%
      \else\newpage\global\@topnum\z@\@maketitle\fi
      \thispagestyle{titlepage}\@thanks\endgroup
      \setcounter{footnote}\z@
      \gdef\@date{\today}\gdef\@thanks{}%
      \gdef\@author{}\gdef\@title{}}


\makeatother
\begin{document}
\title{title\footnote{A footnote}\footnote{Another footnote}}
\author{first author}
\thanks{thanks1}
\author{second author}
\thanks{thanks2}
\maketitle
\end{document}
1
  • Hm, this works but doesn't seem "better" than just copying the amsart definition of \maketitle
    – Jonathan
    Feb 26, 2015 at 8:38
1

The problem is that the doc package redefines \maketitle, the main purpose seems to be allowing several titles in one document: The documentation says

For the same reason the \maketitle command is slightly changed to allow multiple titles in one document. So you can make one driver file reading in several articles at once. To avoid an unwanted pagestyle on the title page the \maketitle command issues a \thispagestyle{titlepage} declaration which produces a plain page if the titlepage page style is undefined.

The simple solution is to just redefine \maketitle with the amsart definition:

\documentclass{amsart}
\usepackage{doc}
% doc package redefines \maketitle, this is taken from amsart.cls
\makeatletter
\def\maketitle{\par
  \@topnum\z@ % this prevents figures from falling at the top of page 1
  \@setcopyright
  \thispagestyle{firstpage}% this sets first page specifications
  \uppercasenonmath\shorttitle
  \ifx\@empty\shortauthors \let\shortauthors\shorttitle
  \else \andify\shortauthors
  \fi
  \@maketitle@hook
  \begingroup
  \@maketitle
  \toks@\@xp{\shortauthors}\@temptokena\@xp{\shorttitle}%
  \toks4{\def\\{ \ignorespaces}}% defend against questionable usage
  \edef\@tempa{%
    \@nx\markboth{\the\toks4
      \@nx\MakeUppercase{\the\toks@}}{\the\@temptokena}}%
  \@tempa
  \endgroup
  \c@footnote\z@
  \@cleartopmattertags
}
\makeatother
\begin{document}
\title{title}
\author{first author}
\thanks{thanks1}
\author{second author}
\thanks{thanks2}
\maketitle
\end{document}

Compiles to yield

crop of footnotes in compiled document

as required.

However, I expect there is some "cleaner" version, in particular in case anyone is interested in using the extra features of the doc version of \maketitle...

1
  • the ams document classes are each designed to handle only a single titled document; collections and proceedings volumes published by the ams are "combined" separately after pdf output of the separate parts has been produced. trying to modify that approach, i'm afraid, sends one into the area of "beyond this place be dragons". Feb 26, 2015 at 20:13
1

All the answers correct the \maketitle made by doc package. Although IMO this is the logical/right approach, a solution with \makeatletter ... stuffs is not easy to remember. So my solution is make a fake thanks with a simple footnotes without marks after \maketitle. Surely someone will find this a bad practice, but far I can see this do not break anything in this way:

\documentclass{amsart}
\usepackage{doc}
\def\thanks#1{{\let\thefootnote\relax\footnote{#1.}\setcounter{footnote}{0}}}
\begin{document}
\author{first author}
\author{second author}
\title{title}
\maketitle
\thanks{thanks1}
\thanks{thanks2}
Some  text\footnote{A normal footnote.}
\end{document}

MWE

3
  • Ah, this is also a very elegant solution, I really like the idea :)
    – Jonathan
    Feb 26, 2015 at 8:41
  • 1
    provided this isn't to be submitted for publication to the ams, it appears to work. the ams style requires that \thankses be input just after the \author entries to which they refer, and they are then properly set by \maketitle. if \thanks defined in this way is moved back into its "required" position in the input, these footnotes will print out on a page by themselves, and the article will start on a new page. Feb 26, 2015 at 13:38
  • @barbarabeeton of course, I remarked in bold that must be after \maketitle for this reason. On the other side, if doc package is used to have multiple titles with different \thanks (maybe I assumed that was not for editor's eyes thinking about this problem) the original command could be a little disappointing.
    – Fran
    Feb 26, 2015 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .