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.

\setsubsecheadstyle{\sethangfrom{\noindent ##1}\raggedright\itshape}\setbeforesubsecskip{-\onelineskip}\setaftersubsecskip{\onelineskip}As in the redefinition of the \section style, there are fixed spaces before and after thetitle text. <strong>The</strong> title is typeset (\setsubsecheadstyle) raggedright in a normal sized italicfont. <strong>The</strong> macro \sethangfrom is used to to redefine the internal \@hangfrom macro sothat the title and number are typeset as a block paragraph instead of the default hangingparagraph style. Note the use of the double ## mark for denoting the position of theargument to \@hangfrom.An examplebook design20.5 SPECIFYING THE PAGESTYLE<strong>The</strong> pagestyle is perhaps the most interesting aspect of the exercise. Instead of the chapterand section titles being put at the top of the pages they are put in the margin starting aboutseven lines below the top of the typeblock. <strong>The</strong> folios are put at the bottom of the pagealigned with the outside of the typeblock.As the folios are easy, we’ll deal with those first.%% Bringhurst page style\makepagestyle{bringhurst}\makeevenfoot{bringhurst}{\thepage}{}{}\makeoddfoot{bringhurst}{}{}{\thepage}Putting text at a fixed point on a page is typically done by first putting the text intoa zero width picture (which as far as La<strong>TeX</strong> is concerned takes up zero space) and thenplacing the picture at the required point on the page. This can be done by hanging it fromthe header.We might as well treat the titles so that they will align with any marginal notes, whichare \marginparsep (17pt) into the margin and \marginparwidth (51pt) wide. Earlierin the manual I defined two lengths called \pwlayi and \pwlayii which are no longerused. I will use these as scratch lengths in performing some of the necessary calculations.For the recto page headers the picture will be the 〈right〉 part of the header and for theverso pages the picture will be the 〈left〉 part of the header, all other parts being empty.For the picture on the 〈right〉 the text must be 17pt to the right of the origin, andsome distance below the origin. From some experiments, this distance turns out to bethe \headsep plus the \topskip plus 7.3 lines, which is calculated as follows:\setlength{\pwlayi}{\headsep}\addtolength{\pwlayi}{\topskip}\addtolength{\pwlayi}{7.3\onelineskip}<strong>The</strong>re is a nifty internal La<strong>TeX</strong> macro called \strip@pt which you probably haven’theard about, and I have only recently come across. What it does is strip the ‘pt’ froma following length, reducing it to a plain real number. Remembering that the default\unitlength is 1pt we can do the following, while making sure that the current\unitlength is 1pt:\makeatletter\newcommand{\bringpicr}[1]{%\setlength{\unitlength}{1pt}\begin{picture}(0,0)355

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

Saved successfully!

Ooh no, something went wrong!