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.

16. CROSS REFERENCINGIf you are defining your own macro that sets a counter, the counter value will be invisibleto any \label unless it is set using \refstepcounter.\fref{〈labstr〉} \figurerefname\tref{〈labstr〉} \tablerefname\pref{〈labstr〉} \pagerefname<strong>The</strong> <strong>class</strong> provides these more particular named references to a figure, table or page. Forexample the default definitions of \fref and \pref are\newcommand{\fref}[1]{\figurerefname~\ref{#1}}\newcommand{\pref}[1]{\pagerefname~\pageref{#1}}and can be used as\ldots footnote parameters are shown in~\fref{fig:fn}on~\pref{fig:fn}.which in this document prints as:. . . footnote parameters are shown in Figure 12.1 on page 235.\Aref{〈labstr〉} \appendixrefname\Bref{〈labstr〉} \bookrefname\Pref{〈labstr〉} \partrefname\Cref{〈labstr〉} \chapterrefname\Sref{〈labstr〉} \sectionrefnameSimilarly, specific commands are supplied for referencing sectional divisions; \Aref forAppendix , \Bref for Book , \Pref for Part , \Cref for Chapter , and \Sref for divisionsbelow Chapter . For example:This is \Sref{sec:lab&ref} in \Cref{chap:xref}.This is §16.1 in Chapter 16.16.2 REFERENCE BY NAMEIn technical works it is common to reference a chapter, say, by its number. In non-technicalworks such cross references are likely to be rare, and when they are given it is more likelythat the chapter title would be used instead of the number, as in:<strong>The</strong> chapter \textit{\titleref{chap:bringhurst}} describes \ldots<strong>The</strong> chapter An example book design describes . . .<strong>The</strong>re are two packages, nameref [Rahtz01] and titleref [Ars01a], that let you refer tothings by name instead of number.Name references were added to the <strong>class</strong> as a consequence of adding a second optionalargument to the sectioning commands. I found that this broke the nameref package, andhence the hyperref package as well, so they had to be fixed. <strong>The</strong> change also broke DonaldArseneau’s titleref package, and it turned out that nameref also clobbered titleref. <strong>The</strong><strong>class</strong> also provides titles, like \poemtitle, that are not recognised by either of the packages.From my viewpoint the most efficient thing to do was to enable the <strong>class</strong> itself toprovide name referencing.296\titleref{〈labstr〉}

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

Saved successfully!

Ooh no, something went wrong!