[OS X TeX] parts in fancyhdr?
Piet van Oostrum
piet at cs.uu.nl
Wed Sep 8 08:49:26 EDT 2004
>>>>> Hans van Maanen <hans at vanmaanen.org> (HvM) wrote:
HvM> Hi all --
HvM> Here's something I can't seem to manage, and I can't find a FAQ on it.
HvM> I am preparing a book in several numbered parts, each with several
HvM> unnumbered chapters.
HvM> I want my left page header to contain on the left the page number, on the
HvM> right the name of the part.
HvM> The right page should contain the chapter name, and the page number on the
HvM> right.
HvM> I can't get it to work with fancyhdr. Starred chapters do not turn up in
HvM> the header, and I don't know how to get the part name up there either.
HvM> There must be some tricks I have not yet heard about... Can someone help me
HvM> please?
Yes, starred chapters don't set the chaptermark which you use normally to
get the chapter title in the header.
You can get it by following the \chapter*{title} with:
\chaptermark{title} or defining a macro which does both.
For using the parts, you can do the following:
\let\Oldpart\part
\newcommand{\parttitle}{}
\renewcommand{part}[1]{\Oldpart{#1}\renewcommand{\parttitle}{#1}}
and then use \parttitle in the header.
Another alternative is to use the titlesec package which provides commands
like \partmark that you can use.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list