[OS X TeX] amsart & fancyhdr question
Piet van Oostrum
piet at cs.uu.nl
Mon Mar 17 11:17:52 CET 2008
>>>>> "Lantz Susan" <lantzs at tristate.edu> (LS) wrote:
>LS> I'd would greatly appreciate it if someone could tell me why the tex
>LS> file below does not put the section number and title as the left side
>LS> of the header. The left header is blank, no matter whether I use
>LS> \markboth, \markright, or \markleft when re-defining the sectionmark.
>LS> (I've tried using \rightmark in \lhead{ . . . } when sectionmark is
>LS> re-defined with either \markboth or \markright, but no matter what I
>LS> do, the left header is blank.)
>LS> Is this a peculiarity of the amsart documentclass? (I've never had
>LS> this kind of trouble with the book class or amsbook class.)
Yes, it is. From the documentation:
Section headings don’t set marks for the running heads in the article
style, only in the amsbook style.
The following seems to work:
\let\origsection\section
\renewcommand{\section}[1]{\sectionmark{#1}\origsection{#1}}
% redefine sectionmark
\renewcommand\sectionmark[1]{\markboth{\thesection. #1}{\thesection. #1}}
% clear any old style settings
\fancyhead{}
\fancyfoot{}
% define new headers/footers
\lhead{\scshape\nouppercase\rightmark}
But it may be a bit fragile with section headers close to page boundaries.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the macostex-archives
mailing list