[texhax] amsart & fancyhdr

Lantz Susan lantzs at tristate.edu
Thu Mar 13 22:24:30 CET 2008

I have read the fancyhdr documentation. I have read the section on LaTeX marks and the section on the fancyhdr package in The LaTeX Companion. According to both sources, the code below should work . . . if I were using the article documentclass. (It does, indeed, work with the article documentclass, but not with amsart.)

I'd would greatly appreciate it if someone could tell me why the tex file below does not put the section number and title as the left side of the header. The left header is blank, no matter whether I use \markboth, \markright, or \markleft when re-defining the sectionmark. (I've tried using \rightmark in \lhead{ . . . } when sectionmark is re-defined with either \markboth or \markright, but no matter what I do, the left header is blank.)

Is this a peculiarity of the amsart documentclass? (I've never had this kind of trouble with the book class or amsbook class.)

-------------- demo.tex -----------------

% File: BME-MS.tex
% Typeset with LaTeX
\documentclass[11pt,oneside]{amsart}
\pdfpageheight 11in

\setlength\topmargin{-0.5in}
\setlength\footskip{25pt}
\setlength\textheight{9.0in}
\setlength\textwidth{6.5in}
\setlength\oddsidemargin{0in}
\setlength\evensidemargin{0in}
\setlength\parindent{0.25in}
\setlength\parskip{0pt} % was 3pt
\usepackage{amssymb,latexsym,amsmath,amsfonts}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.png,.jpg,.pdf,.mps}
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\thispagestyle{fancy}

% redefine sectionmark
\renewcommand\sectionmark[1]{\markboth{\thesection. #1}}
%% neither \markright nor \markleft work

% clear any old style settings
\fancyfoot{}

%% \rightmark doesn't work even if \markright is used for sectionmark
\rfoot{SAL, 20--29 February  \& 03--11 March 2008}

% redefine list styles for enumerated lists \renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\alph{enumii}.}

\begin{document}

Text, text, and more text.

Table~1

More text. Some equations.

\newpage

Lots of words.

Table~2

More words and/or equations.

\newpage

Blither, blather.

Table~3

More scintillating text.

\end{document}
------------------- demo.aux -------
\relax
\newlabel{tocindent-1}{0pt}
\newlabel{tocindent0}{0pt}
\newlabel{tocindent1}{19.4667pt}
\newlabel{tocindent2}{0pt}
\newlabel{tocindent3}{0pt}
\newlabel{LastPage}{{}{3}}
------------------------------

There's nothing the least bit unusual in the log file.

Susan Lantz

Susan A. Lantz, Ph.D.
Associate Professor of Mechanical Engineering
Tri-State University
lantzs at tristate.edu