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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7. PAGINATION AND HEADERS{\ifonlyfloats{0pt}{\normalrulethickness}}\makeheadposition{floatcomp}{flushright}{flushleft}{}{}\makepsmarks{floatcomp}{\companionpshook}\makeevenhead{floatcomp}%{\ifonlyfloats{}{\normalfont\bfseries\thepage}}%{}%{\ifonlyfloats{}{\normalfont\bfseries\leftmark}}\makeoddhead{floatcomp}%{\ifonlyfloats{}{\normalfont\bfseries\rightmark}}%{}%{\ifonlyfloats{}{\normalfont\bfseries\thepage}}\makeevenfoot{floatcomp}{}{\ifonlyfloats{\thepage}{}}{}\makeoddfoot{floatcomp}{}{\ifonlyfloats{\thepage}{}}{}<strong>The</strong> code above for the floatcomp style should be compared with that for the earlier companionstyle.<strong>The</strong> headrule is invisible on float pages by giving it zero thickness, otherwise it has the\normalrulethickness. <strong>The</strong> head position is identical for both pagestyles. However,the headers are empty for floatcomp and the footers have centered page numbers on floatpages; on ordinary pages the footers are empty while the headers are the same as thecompanion headers.<strong>The</strong> code includes one ‘trick’. <strong>The</strong> macro \makepsmarks{X}{code} is equivalent to\newcommand{\Xpshook}{code}I have used this knowledge in the line:\makepsmarks{floatcomp}{\companionpshook}which avoids retyping the code from \makepsmarks{companion}{...}, and ensuresthat the code is actually the same for the two pagestyles.\mergepagefloatstyle{〈style〉}{〈textstyle〉}{〈floatstyle〉}If you have two pre-existing pagestyles, one that will be used for text pages and the otherthat can be used for float pages, then the \mergepagefloatstyle command providesa simpler means of combining them than the above example code for floatcomp. <strong>The</strong>argument 〈style〉 is the name of the pagestyle being defined. <strong>The</strong> argument 〈textstyle〉 is thename of the pagestyle for text pages and 〈floatstyle〉 is the name of the pagestyle for floatonlypages. Both of these must have been defined before calling \mergepagefloatstyle.So, instead of the long winded, and possibly tricky, code I could have simply said:\mergepagefloatstyle{floatcomp}{companion}{plain}One author thought it would be nice to be able to have different page headings accordingto whether the page was a floatpage, or there was a float at the top of the page, or afloat at the bottom of a page or there was text at the top and bottom.This, I think, is not a common requirement and, further, that to provide this involveschanging parts of the La<strong>TeX</strong> output routine — something only to be tackled by the bravestof the brave. If it were to be done then were best done in a package that could be easilyignored. <strong>The</strong> following is an outline of what might be done; I do not recommend it and ifyou try this and all your work dissappears then on your own head be it.% notefloat.sty118

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

Saved successfully!

Ooh no, something went wrong!