12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7. PAGINATION AND HEADERSTable 7.2: Mark macros for page headersMain macro\book(*)\part(*)\chapter(*)\section(*)\subsection(*)\subsubsection(*)\paragraph(*)\subparagraph(*)\tableofcontents(*)\listoffigures(*)\listoftables(*)\thebibliography\theindex\theglossary\PoemTitle\PoemTitle*default mark definition\newcommand*{\bookpagemark}[1]{}\newcommand*{\partmark}[1]{}\newcommand*{\chaptermark}[1]{}\newcommand*{\sectionmark}[1]{}\newcommand*{\subsectionmark}[1]{}\newcommand*{\subsubsectionmark}[1]{}\newcommand*{\paragraphmark}[1]{}\newcommand*{\subparagraphmark}[1]{}\newcommand*{\tocmark}[1]{}\newcommand*{\lofmark}[1]{}\newcommand*{\lotmark}[1]{}\newcommand*{\bibmark}{}\newcommand*{\indexmark}{}\newcommand*{\glossarymark}{}\newcommand*{\poemtitlemark}[1]{}\newcommand*{\poemtitlestarmark}[1]{}\markboth{〈left〉}{〈right〉}\markright{〈right〉}\markboth sets the values of two markers to 〈left〉 and 〈right〉 respectively, at the point inthe text where it is called. Similarly, \markright sets the value of a marker to 〈right〉.\leftmark \rightmark<strong>The</strong> macro \leftmark contains the value of the 〈left〉 argument of the last \markboth onthe page. <strong>The</strong> macro \rightmark contains the value of the 〈right〉 argument of the first\markboth or \markright on the page, or if there is not one it contains the value of themost recent 〈right〉 argument.A pagestyle can define the \secmark commands in terms of \markboth or\markright, and then use \leftmark and/or \rightmark in the headers or footers. I’llshow examples of how this works later, and this is often how the myheadings style getsimplemented.All the division commands include a macro that you can define to set marks relatedto that heading. Other commands also include macros that you can redefine for settingmarks.<strong>The</strong> \...mark commands are listed in Table 7.2. When they are called by the relevantmain macro, those that take an argument are called with the ‘title’ as the argument’s value.For example, the \chapter macro calls \chaptermark with the value of the title specifiedas being for the header.Please remember that the macros listed in Table 7.2 are ‘provider’ macros, i.e. theyprovide information for \leftmark and \rightmark for you to use later on. To gainaccess to the section title, you do not use \sectionmark in the header or footer. It is108

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!