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.

18.26. Documenting La<strong>TeX</strong> commands\memapppageinfo{〈title〉}\memapppagestarinfo{〈title〉}\memleadpageinfo{〈pstyle〉}{〈cmdname〉}{〈title〉}\memleadpagestarinfo{〈pstyle〉}{〈cmdname〉}{〈title〉}Hooks for \poemtitle, \PoemTitle, and their starred versions.\mempoeminfo{〈title〉}\mempoemstarinfo{〈title〉}\memPoemTitleinfo{〈thepoem〉}{〈fortoc〉}{〈forhead〉}{〈title〉}\memPoemTitlestarinfo{〈fortoc〉}{〈title〉}Hooks for the several kinds of \caption and \legend commands.\memcaptioninfo{〈type〉}{〈thetype〉}{〈fortoc〉}{〈title〉}\memlegendinfo{〈title〉}\memnamedlegendinfo{〈fortoc〉}{〈title〉}\membitwonumcaptioninfo{〈type〉}{〈thetype〉}{〈fortoc1〉}{〈title1〉}{〈name2〉}{〈fortoc2〉}{〈title2〉}\membionenumcaptioninfo{〈type〉}{〈thetype〉}{〈fortoc1〉}{〈title1〉}{〈name2〉}{〈fortoc2〉}{〈title2〉}\membicaptioninfo{〈type〉}{〈thetype〉}{〈fortoc1〉}{〈title1〉}{〈name2〉}{〈title2〉}As an example of how one of these macros might be used, just before the start of thissection I put\renewcommand{\memsecinfo}[5]{\edef\Margi{#1}\edef\Margii{#2}%\edef\Margiii{#3}\edef\Margiv{#4}%\edef\Margv{#5}}and now I’m putting<strong>The</strong> arguments are: (1) ‘\Margi’, (2) ‘\Margii’, (3) ‘\Margiii’,(4) ‘\Margiv’, (5) ‘\Margv’.<strong>The</strong> arguments are: (1) ‘section’, (2) ‘18.25’, (3) ‘Heading hooks’, (4) ‘Heading hooks’, (5)‘Heading hooks’.Warning: Be very careful with the fifth argument of this macro when using hyperref, thisargument will then contain a hyper link anchor, whih may cause problems when used outof context.18.26 DOCUMENTING LATEX COMMANDS<strong>The</strong> <strong>class</strong> provides a few macros to help you if you want to describe La<strong>TeX</strong> commands.\bs \cs{〈name〉} \cmdprint{〈cmd〉} \cmd{〈cmd〉}<strong>The</strong> macro \bs simply prints the ‘\’ backslash.<strong>The</strong> macro \cs prints its argument, putting a backslash in front of it. For example\cs{name} prints \name.<strong>The</strong> argument to \cmdprint should be the name of a macro, including the backslash.It is then printed as is. For instance \cmdprint{\amacro} prints \amacro.<strong>The</strong> argument to \cmd should be the name of a macro, including the backslash. It isthen printed, using \cmdprint, and also added to the index file with the assumption that345

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

Saved successfully!

Ooh no, something went wrong!