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 HEADERSNow when the draft option is used the word ‘Draft:’ and the current date will be typesetin italics at the bottom of each page by the spine margin. If any empty pages should bemarked as well, specify similar footers for that style as well.Here is part of the standard definition of the headings pagestyle for the book <strong>class</strong>which uses many internal La<strong>TeX</strong> commands; but note that <strong>memoir</strong> does not use this.\def\ps@headings{%\let\@oddfoot\@empty\let\@evenfoot\@empty\def\@evenhead{\thepage\hfil\slshape\leftmark}%\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%\def\chaptermark##1{%\markboth{\MakeUppercase{%\ifnum\c@secnumdepth > \m@ne\if@mainmatter\@chapapp\ \thechapter. \ %\fi\fi##1}}{}}%\def\sectionmark##1{%\markright{\MakeUppercase{%\ifnum\c@secnumdepth > \z@\thesection. \ %\fi##1}}}}You don’t need to understand this but in outline the first three lines specify the contents ofthe footers and headers, and the remainder of the code sets the marks that will be used inthe headers. <strong>The</strong> \leftmark is specified to be the word ‘chapter’, followed by the numberif it is in the \mainmatter and the secnumdepth is such that chapters are numbered, followedby the chapter’s title; all this is made to be in upper case (via the \MakeUppercasemacro). Similarly the other mark, \rightmark, is the section number, if there is one, andthe section’s title, again all in upper case.A transliteration of this code into <strong>memoir</strong>’s original coding style is:\makepagestyle{headings}\makeevenhead{headings}{\thepage}{}{\slshape\leftmark}\makeoddhead{headings}{\slshape\rightmark}{}{\thepage}\makepsmarks{headings}{%\def\chaptermark##1{%\markboth{\MakeUppercase{%\ifnum\c@secnumdepth > \m@ne\if@mainmatter\@chapapp\ \thechapter. \ %\fi\fi##1}}{}}%\def\sectionmark##1{%\markright{\MakeUppercase{%\ifnum\c@secnumdepth > \z@112

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

Saved successfully!

Ooh no, something went wrong!