PmI
2009-11-09 14:02:12 UTC
How do I get a chaptername to print as just the title I gave it in my source,
rather than with "Chapter X." in front of it?
My source has, for instance, \Chapter{Syntax}, and the header will say
"Chapter 1. Synax"... which is not what I exptected.
With some help from the internet, fancyhdr, and some testing I got it down
to:
\renewcommand{\chaptername}{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesubsection\ #1}}
\fancyhead{} % clear all header fields
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO,RE]{\nouppercase{\leftmark} section \nouppercase{\rightmark}}
Which already strips the word "Chapter"from the chaptername, but the number
is still there, so that the header now looks like "1. syntax - section ..."
How do I get rid of this number, too?
And where do I find this information listed in a convenient way, because I
search the net for hours trying to find this explained using a plethora of
search terms, and nothing actually explains why "chaptername" isn't actually
the chapter name, but some concatenated strong of "Chapter", its order
number, and then the actual chapter title. Which I assume is magically added
into it when the chaptermark is requested, because if there is a command that
gives the ACTUAL chapter title, the internet sure as heck isn't telling me
what that command is =(
- Mike Kamermans
rather than with "Chapter X." in front of it?
My source has, for instance, \Chapter{Syntax}, and the header will say
"Chapter 1. Synax"... which is not what I exptected.
With some help from the internet, fancyhdr, and some testing I got it down
to:
\renewcommand{\chaptername}{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesubsection\ #1}}
\fancyhead{} % clear all header fields
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO,RE]{\nouppercase{\leftmark} section \nouppercase{\rightmark}}
Which already strips the word "Chapter"from the chaptername, but the number
is still there, so that the header now looks like "1. syntax - section ..."
How do I get rid of this number, too?
And where do I find this information listed in a convenient way, because I
search the net for hours trying to find this explained using a plethora of
search terms, and nothing actually explains why "chaptername" isn't actually
the chapter name, but some concatenated strong of "Chapter", its order
number, and then the actual chapter title. Which I assume is magically added
into it when the chaptermark is requested, because if there is a command that
gives the ACTUAL chapter title, the internet sure as heck isn't telling me
what that command is =(
- Mike Kamermans