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.

9.3. New ‘List of. . . ’ and entries\listofcom which can then be used like \listoffigures to typeset the ‘List of. . . ’. <strong>The</strong>〈ext〉 argument is the file extension to be used for the new listing. <strong>The</strong> last argument,〈listofname〉 is the title for the ‘List of. . . ’. Unstarred and starred versions of \listofcomare created. <strong>The</strong> unstarred version, \listofcom, will add 〈listofname〉 to the ToC, whilethe starred version, \listofcom*, makes no entry in the ToC.As an example:\newcommand{\listanswername}{List of Answers}\newlistof{listofanswers}{ans}{\listanswername}will create a new \listofanswers command that can be used to typeset a listing of answersunder the title \listanswername, where the answer titles are in an ans file. Itis up to the author of the document to specify the ‘answer’ code for the answers in thedocument. For example:\newcounter{answer}[chapter]\renewcommand{\theanswer}{\arabic{answer}}\newcommand{\answer}[1]{\refstepcounter{answer}\par\noindent\textbf{Answer \theanswer. #1}\addcontentsline{ans}{answer}{\protect\numberline{\theanswer}#1}\par}which, when used like:\answer{Hard} <strong>The</strong> \ldotswill print as:Answer 1. Hard<strong>The</strong> . . .As mentioned above, the \newlistof command creates several new commands in additionto \listofcom, most of which you should now be familiar with. For convenience,assume that \newlistof{...}{X}{...} has been issued so that X is the new file extensionand corresponds to the X in §9.2.1. <strong>The</strong>n in addition to \listofcom the followingnew commands will be made available.<strong>The</strong> four commands, \Xmark, \Xheadstart, \printXtitle, and \afterXtitle, areanalagous to the commands of the same names described in §9.2.1 (internally the <strong>class</strong> usesthe \newlistof macro to define the ToC, LoF and LoT). In particular the default definitionof \Xmark is equivalent to:\newcommand{\Xmark}{\markboth{listofname}{listofname}}However, this may well be altered by the particular \pagestyle in use.Xdepth<strong>The</strong> counter Xdepth is analagous to the standard tocdepth counter, in that it specifiesthat entries in the new listing should not be typeset if their numbering level is greater thanXdepth. <strong>The</strong> default definition is equivalent to\setcounter{Xdepth}{1}\insertchapterspace\addtodef{〈macro〉}{〈prepend〉}{〈append〉}163

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

Saved successfully!

Ooh no, something went wrong!