Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In the amsart document class, one has the commands \keywords{foo} and \subjclass{foo}. I was wondering, how does one make similar commands for the standard LaTeX article class?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The amsart commands are defined to create commands \@keywords and \@subjclass, which are then used to typeset footers in the \maketitle command. You could hack the \maketitle command provided by the article class (or even better, redefine it in a class of your own) to provide similar functionality, but it's easier (and sloppier) to hack the \@title command:

\makeatletter
\newcommand{\subjclass}[2][1991]{%
  \let\@oldtitle\@title%
  \gdef\@title{\@oldtitle\footnotetext{#1 \emph{Mathematics subject classification.} #2}}%
}
\newcommand{\keywords}[1]{%
  \let\@@oldtitle\@title%
  \gdef\@title{\@@oldtitle\footnotetext{\emph{Key words and phrases.} #1.}}%
}
\makeatother

These definitions are very hacky and likely require correct ordering of things (and as I said you really should either hack the \maketitle command properly or extend article with your own class). Most importantly, use \keyword and \subject after \title. But it works.

share|improve this answer
    
You should use \newcommand instead of \gdef whenever you can. –  Martin Schröder Jul 22 '11 at 10:16
    
I tried to use this, there is one problem: accented letters like ó or ñ do not work within these commands, even when things are set up so they work well in the rest of the document! –  kjetil b halvorsen Nov 22 '12 at 20:29

If all you want is a footnote with no marks, you can write:

\renewcommand{\thefootnote}{\fnsymbol{footnote}} 
\footnotetext{\emph{Key words} whatever}     
\renewcommand{\thefootnote}{\arabic{footnote}} 
share|improve this answer
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Caramdir Jul 22 '11 at 0:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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