0% found this document useful (0 votes)
1K views16 pages

Appendix Latex

The document summarizes the appendix package, which provides additional functionality for typesetting appendices beyond the standard LaTeX appendix command. It describes new commands like \appendixpage to add a heading and \addappheadtotoc to include text in the table of contents. It also introduces the appendices environment which combines these commands and allows options like numbering appendix titles. It notes some known issues, then provides the package code in section 3.

Uploaded by

Victor Calderon
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views16 pages

Appendix Latex

The document summarizes the appendix package, which provides additional functionality for typesetting appendices beyond the standard LaTeX appendix command. It describes new commands like \appendixpage to add a heading and \addappheadtotoc to include text in the table of contents. It also introduces the appendices environment which combines these commands and allows options like numbering appendix titles. It notes some known issues, then provides the package code in section 3.

Uploaded by

Victor Calderon
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

The appendix package

Author: Peter Wilson, Herries Press Maintainer: Will Robertson will dot robertson at latex-project dot org 2009/09/02

Abstract The appendix package provides some facilities for modifying the typesetting of appendix titles. Further, (sub)appendices environments are available that can be used, for example, for per chapter/section appendices. The package is designed to work only with classes that have a \chapter and/or \section command. It has not been tested with other packages that change the denitions of the sectioning commands.

Contents
1 Introduction 2 The appendix package 2.1 Known problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The package code 1 2 4 5

Introduction
For classes with Chapters: Resets the chapter and section counters to zero Sets \@chapapp to \appendixname. Redenes \thechapter to produce alphabetic appendix numbers. For the other classes Resets the section and subsection counters to zero.
This

In the standard classes the \appendix command does the following:

le (appendix.dtx) has version number v1.2b, last revised 2009/09/02.

Redenes \thesection to produce alphabetic appendix numbers. The appendix package provides additional appendixing capabilities. It cooperates with the hyperref package1 but may be problematic when used with packages that change the denition of the sectioning commands. Portions of the package were developed as part of a class and package bundle for typesetting ISO standards [Wil96]. This manual is typeset according to the A conventions of the L TEX docstrip utility which enables the automatic extraction A of the L TEX macro source les [GMS94]. Section 2 describes the usage of the package. Commented source code for the package is in Section 3.

The appendix package

\appendixpage

\addappheadtotoc

The appendix package provides some commands that can be used in addition to the \appendix command. It also provides a new environment that can be used instead of the \appendix command. The environment provides some addtional actions with respect to the simple \appendix. First the new commands will be described and then the new environment will be discussed. The \appendixpage command will typeset a heading in the style of a \part heading for the class. The wording of the heading is given by the value of \appendixpagename. This command will insert general heading into the Table of Contents (ToC). The text is given by the value of \appendixtocname. If used, the command must come before the rst appendix, as it is meant to be used to introduce the appendix titles in the ToC. The above commands can be used in conjunction with the traditional \appendix command, which they should immediately follow. For example:
\appendix \appendixpage \addappheadtotoc

\noappendicestocpagenum \appendicestocpagenum

By default the \addappheadtotoc command puts a page number in the ToC. This can be prevented by using \noappendicestocpagenum. For symmetry, the \appendicestocpagenum command ensures that a page number is put in the ToC. NOTE: Unless \noappendicestocpagenum is used the \addappheadtotoc command uses the current page number when it makes the entry in the ToC. The \appendixpage command puts a heading in the document like a \part heading; in un-chaptered documents the \part heading appears in the ordinary run of the text like a \section heading, but in chaptered documents it is on a page by itself. That is, in chaptered documents \appendixpage does a \clear[double]page typesets the heading, and then does another \clear[double]page. Therefore, in
1 With thanks to Hylke W. van Dijk ([email protected]) who pointed out that version 1.1 did not and set me on the track for supporting the hyperref package.

\appendixname \appendixtocname \appendixpagename

a chaptered document the above sequence of commands will use the page number after the \appendixpage as the ToC entry2 and if the ordering is reversed (i.e., \addappheadtotoc \appendixname) then the page number before \appendixname will be used as the ToC entry. For chaptered documents it is probably best to do: \clearpage % or \cleardoublepage \addappheadtotoc \appendixpage which will use the page number of \appendixpage as the ToC entry. The \appendixname command is dened in those classes that provide for chapters. It is provided in this package whether or not it has been dened in the class. Its default value is Appendix. The default value of both \appendixtocname and \appendixpagename is Appendices. These names can all be changed via \renewcommand. For example,
\renewcommand{\appendixtocname}{List of appendices}

appendices

The appendices environment can be used instead of the \appendix command. It provides more functionality than is possible from the combination of the \appendix, \addappheadtotoc and \appendixpage commands. The functions of the appendices environment are usually accessed through the package options, but there are declarations that mey be used insted. The options are: toc Put a header (e.g., Appendices) into the Table of Contents (the ToC) before listing the appendices. (This is done by calling the \addappheadtotoc command.) page Puts a title (e.g., Appendices) into the document at the point where the appendices environment is begun. (This is done by calling the \appendixpage command.) title Adds a name (e.g., Appendix) before each appendix title in the body of the document. The name is given by the value of \appendixname. Note that this is the default behaviour for classes that have chapters. titletoc Adds a name (e.g., Appendix) before each appendix listed in the ToC. The name is given by the value of \appendixname. header Adds a name (e.g., Appendix) before each appendix in page headers. The name is given by the value of \appendixname. Note that this is the default behaviour for classes that have chapters. Depending on the particular package options that are set and the document class, the appendices environment may change the denition of elements of the sectioning commands (e.g., \chapter or \section). This may be a problem if the environment is used in conjunction with any other package that makes changes to these commands. If this is the case, then you will have to examine the code for
2 With

thanks to Eduardo Jacob ([email protected]) for pointing this out.

\appendixtocon \appendixtocoff \appendixpageon \appendixpageoff \appendixtitleon \appendixtitleoff \appendixtitletocon \appendixtitletocoff \appendixheaderon \appendixheaderoff \restoreapp

subappendices

\setthesection \setthesubsection

the appendices environment and make any necessary changes to one or the other of the packages (via your own package le). The changes to the sectional heading commands are discarded at the end of the appendices environment. \appendixtocon is a declaration equivalent to the toc option. The \appendixtocoff declaration is equivalent to not using that option. \appendixpagecon is a declaration equivalent to the page option. The \appendixpageoff declaration is equivalent to not using that option. \appendixtitleon is a declaration equivalent to the title option. The \appendixtitleoff declaration is equivalent to not using that option. \appendixtitletocon is a declaration equivalent to the titletoc option. The \appendixtitletocoff declaration is equivalent to not using that option. \appendixheaderon is a declaration equivalent to the header option. The \appendixheaderoff declaration is equivalent to not using that option. The appendices environment restores the prior value of the chapter/section counter at the end of the environment, so the environment may be used between the main document divisions. By default, the appendix counter value is saved and restored by the environment. That means that appendices in a series of appendices environments will be lettered sequentially. To make the lettering start from A each time, put the following into the preamble: \renewcommand{\restoreapp}{} Within the subappendices environment, an appendix is introduced by a \section command in chaptered documents, otherwise it is introduced by a \subsection command. Eectively, this provides for appendices at the end of a main document division, as an integral part of the division. The subappendices environment supports only the title and titletoc options. By default, the subappendices are numbered like normal (sub)sections, except that the (sub)section number itself is typeset as an uppercase letter. This behaviour can be changed by redening these \setthe... commands. For example, to just have a letter not prepended by the main division number, do: \renewcommand{\setthesection}{\Alph{section}} or \renewcommand{\setthesubsection}{\Alph{subsection}} as appropriate.

2.1

Known problems

A There is an unfortunate interaction between the L TEX kernel commands \include and \addcontentsline. If these are used like this:

\addcontentsline{toc}{...}{addtotoc} \include{import}

then the text of the \addcontentsline command (addtotoc in the example) is not written to the appropriate (toc) le until after the included le has written all its entries out to the (toc) le. As far as I can tell, there is no way around this A behaviour without rewriting parts of the L TEX kernel code. It is thus up to the author to avoid putting an \addcontentsline command (or a command that internally uses \addcontentsline, as does the 4

\addappheadtotoc command) before an \included le that writes out to the same le. Things work as expected if the \addcontentsline command is placed within the \included le, or if the imported le is \inputed instead of \included.

3
1 2 4

The package code

A Announce the name and version of the package, which requires L TEX 2 .

usc \NeedsTeXFormat{LaTeX2e} 3 \ProvidesPackage{appendix}[2009/09/02 v1.2b extra appendix facilities]

In order to try and avoid name clashes with other packages, each internal name will include the character string @pp.
\if@knownclass@pp \if@chapter@pp

These are used when we need to decide what appendix style is being used for the document. Assume the article class or other without chapters.
5 6

\newif\if@chapter@pp\@chapter@ppfalse \newif\if@knownclass@pp\@knownclass@ppfalse

Check the sectioning commands.


\@ifundefined{chapter}{% \@ifundefined{section}{}{\@knownclass@pptrue}}{% 9 \@chapter@pptrue\@knownclass@pptrue}
7 8

\phantomsection \the@pps \if@pphyper

We need to provide \phantomsection if hyperref is not used and, whether or not hyperref is used, we need to dene a counter here to support potential hyperrefs (used to disambiguate (sub)appendices). \if@pphyper is TRUE if the hyperref package is used.
\providecommand{\phantomsection}{} \newcounter{@pps} 12 \renewcommand{\the@pps}{\alph{@pps}} 13 \newif\if@pphyper 14 \@pphyperfalse 15 \AtBeginDocument{% 16 \@ifpackageloaded{hyperref}{\@pphypertrue}{}}
10 11 17

\if@dotoc@pp \if@dotitle@pp \if@dotitletoc@pp \if@dohead@pp \if@dopage@pp

A set of booleans for the options. Default is the appendices environment does nothing more than the \appendix command does unless one or more options are set.
\newif\if@dotoc@pp\@dotoc@ppfalse \newif\if@dotitle@pp\@dotitle@ppfalse 20 \newif\if@dotitletoc@pp\@dotitletoc@ppfalse 21 \newif\if@dohead@pp\@dohead@ppfalse 22 \newif\if@dopage@pp\@dopage@ppfalse
18 19

Now we can do the ve options.


\DeclareOption{toc}{\@dotoc@pptrue} \DeclareOption{title}{\@dotitle@pptrue} 25 \DeclareOption{titletoc}{\@dotitletoc@pptrue} 26 \DeclareOption{header}{\@dohead@pptrue} 27 \DeclareOption{page}{\@dopage@pptrue}
23 24

Process the options now.


28

\ProcessOptions\relax

Issue a warning if \chapter and \section are undened, then quit.


\newcommand{\@ppendinput}{} 30 \if@knownclass@pp\else 31 \PackageWarningNoLine{appendix}% 32 {There is no \protect\chapter\space or \protect\section\space command.\MessageBreak 33 The appendix package will not be used} 34 \renewcommand{\@ppendinput}{\endinput} 35 \fi 36 \@ppendinput
29 37

\appendixtocon \appendixtocoff

Declarative forms of the toc option.


38 39

\newcommand{\appendixtocon}{\@dotoc@pptrue} \newcommand{\appendixtocoff}{\@dotoc@ppfalse}

\appendixpageon \appendixpageoff

Declarative forms of the page option.


40 41

\newcommand{\appendixpageon}{\@dopage@pptrue} \newcommand{\appendixpageoff}{\@dopage@ppfalse}

\appendixtitleon \appendixtitleoff

Declarative forms of the title option.


42 43

\newcommand{\appendixtitleon}{\@dotitle@pptrue} \newcommand{\appendixtitleoff}{\@dotitle@ppfalse}

\appendixtitletocon \appendixtitletocoff

Declarative forms of the titletoc option.


44 45

\newcommand{\appendixtitletocon}{\@dotitletoc@pptrue} \newcommand{\appendixtitletocoff}{\@dotitletoc@ppfalse}

\appendixheaderon \appendixheaderoff

Declarative forms of the header option.


46 47

\newcommand{\appendixheaderon}{\@dohead@pptrue} \newcommand{\appendixheaderoff}{\@dohead@ppfalse}

\@ppsavesec \@pprestoresec \@ppsaveapp \restoreapp

For the appendices environment we need to save and restore the main document division number and the appendix number. The \restoreapp command is the one for the user.
\newcounter{@ppsavesec} \newcounter{@ppsaveapp} 50 \setcounter{@ppsaveapp}{0} 51 \newcommand{\@ppsavesec}{% 52 \if@chapter@pp \setcounter{@ppsavesec}{\value{chapter}} \else
48 49

53

\setcounter{@ppsavesec}{\value{section}} \newcommand{\@pprestoresec}{% 55 \if@chapter@pp \setcounter{chapter}{\value{@ppsavesec}} 56 \setcounter{section}{\value{@ppsavesec}} 57 \newcommand{\@ppsaveapp}{% 58 \if@chapter@pp \setcounter{@ppsaveapp}{\value{chapter}} 59 \setcounter{@ppsaveapp}{\value{section}} 60 \newcommand{\restoreapp}{% 61 \if@chapter@pp \setcounter{chapter}{\value{@ppsaveapp}} 62 \setcounter{section}{\value{@ppsaveapp}}
54

\fi} \else \fi} \else \fi} \else \fi}

\appendixname \appendixtocname \appendixpagename

These commands hold the names that might be used. \appendixname may have been dened in the class. The others are new.
\providecommand{\appendixname}{Appendix} \newcommand{\appendixtocname}{Appendices} 65 \newcommand{\appendixpagename}{Appendices}
63 64

\appendixpage

The command to typeset a page announcing the start of the appendices. It is based on the \part denition (either from the book class or the article class).
\newcommand{\appendixpage}{% \if@chapter@pp \@chap@pppage \else \@sec@pppage \fi 68 }
66 67

\clear@ppage

The non-chaptered classes do not dene \if@openright, but we need to use this for chaptered documents to clear the appropriate pages. \clear@ppage does the right thing, but must only be called in chapter related code, otherwise there will be error message like extra \else or extra \fi.
69 70 71

\newcommand{\clear@ppage}{% \if@openright\cleardoublepage\else\clearpage\fi}

\@chap@pppage

Do an appendix page in chapter style. Copy code from the book class \part command, but use \appendixpagename as the title.
\newcommand{\@chap@pppage}{% \clear@ppage 74 \thispagestyle{plain}% 75 \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi 76 \null\vfil 77 \markboth{}{}% 78 {\centering 79 \interlinepenalty \@M 80 \normalfont 81 \Huge \bfseries \appendixpagename\par}%
72 73

Add to ToC if requested


82 83 84

\if@dotoc@pp \addappheadtotoc \fi

In the book class the \part command is nished o by calling \@endpart. There are two problems with this in this package. (1) \@endpart is not dened in article style classes and (2) it always throws a blank page which does not look good if the openany option is used. So, code it all up here.
85 86 87 88 89 90 91 92 93 94 95 96 97

\vfil\newpage \if@twoside \if@openright \null \thispagestyle{empty}% \newpage \fi \fi \if@tempswa \twocolumn \fi }

\@sec@pppage

Copy code from the article class \part command, but use \appendixpagename as the title.
\newcommand{\@sec@pppage}{% \par 100 \addvspace{4ex}% 101 \@afterindentfalse 102 {\parindent \z@ \raggedright 103 \interlinepenalty \@M 104 \normalfont 105 \huge \bfseries \appendixpagename% 106 \markboth{}{}\par}%
98 99

Add to ToC if requested


107 108 109 110 111 112 113 114

\if@dotoc@pp \addappheadtotoc \fi \nobreak \vskip 3ex \@afterheading }

\if@pptocpage \noappendicestocpagenum \appendicestocpagenum \addappheadtotoc

The \addappheadtotoc command adds an appendices line to the ToC. The style is the same as used in tocbibind for the List of gures line. That is, as a Chapter heading or a Section heading. \if@pptocpage controls whether ot not a page number is put into the ToC.
\newif\if@pptocpage \@pptocpagetrue 117 \newcommand{\noappendicestocpagenum}{\@pptocpagefalse} 118 \newcommand{\appendicestocpagenum}{\@pptocpagetrue} 119 \newcommand{\addappheadtotoc}{%
115 116

120 121

\phantomsection \if@chapter@pp \if@pptocpage \addcontentsline{toc}{chapter}{\appendixtocname}% \else \if@pphyper \addtocontents{toc}% {\protect\contentsline{chapter}{\appendixtocname}{}{\@currentHref}}% \else \addtocontents{toc}% {\protect\contentsline{chapter}{\appendixtocname}{}}% \fi \fi \else \if@pptocpage \addcontentsline{toc}{section}{\appendixtocname}% \else \if@pphyper \addtocontents{toc}% {\protect\contentsline{section}{\appendixtocname}{}{\@currentHref}}% \else \addtocontents{toc}% {\protect\contentsline{section}{\appendixtocname}{}}% \fi \fi \fi }

Chaptered document
122 123 124 125 126 127 128 129 130 131 132 133

Not a chaptered document


134 135 136 137 138 139 140 141 142 143 144 145 146 147

For my reference, here is the standard version of the \appendix macro, but modied for both chaptered and unchaptered documents.
\newcommand{\appendix}{\par \if@chapter@pp \setcounter{chapter}{0}% \setcounter{section}{0}% \gdef\@chapapp{\appendixname}% \gdef\thechapter{\@Alph\c@chapter} \else \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section} \fi }

And this equivalently is what the hyperref package does.

\def\Hy@chapterstring{chapter} \def\Hy@appendixstring{appendix} \def\Hy@chapapp{\Hy@chapterstring} \let\Hy@org@appendix\appendix \def\appendix{% \Hy@org@appendix \if@chapter@pp \gdef\theHchapter{\Alph{chapter}}% \else \gdef\theHsection{\Alph{section}}% \fi \xdef\Hy@chapapp{\Hy@appendixstring}% }

\theH@pps

We are going to use \theH@pps to disambiguate contents of appendices that might have the same hyperref marks. It is \provided as if the appendix and hyperref are in the wrong order then somehow hyperref denes it before appendix can get to it.
148 149

\providecommand{\theH@pps}{\alph{@pps}}

\@resets@pp

Resets the appropriate sectioning counters and names. This does almost exactly what the default \appendix command does, except that it saves and restores sectional numbering. It saves the sectional number at the start and restores the appendix number at the end.
\newcommand{\@resets@pp}{\par \@ppsavesec 152 \stepcounter{@pps} 153 \setcounter{section}{0}% 154 \if@chapter@pp 155 \setcounter{chapter}{0}% 156 \renewcommand\@chapapp{\appendixname}% 157 \renewcommand\thechapter{\@Alph\c@chapter}% 158 \else 159 \setcounter{subsection}{0}% 160 \renewcommand\thesection{\@Alph\c@section}% 161 \fi 162 \if@pphyper
150 151

Now handle the hyperref tweaks.


163 164 165 166 167 168 169 170

\if@chapter@pp \renewcommand{\theHchapter}{\theH@pps.\Alph{chapter}}% \else \renewcommand{\theHsection}{\theH@pps.\Alph{section}}% \fi \def\Hy@chapapp{\appendixname}% \fi \restoreapp

10

171 172

appendices

This is the heart of the package. Start it o by doing the resetting done by the \appendix command. Then do the simple options before getting into the complications of redenitions. Remember to take care of an interaction between \addappheadtotoc and \appendixpage.
\newenvironment{appendices}{% \@resets@pp 175 \if@dotoc@pp 176 \if@dopage@pp 177 \if@chapter@pp 178 \clear@ppage 179 \fi 180 \appendixpage 181 \else 182 \if@chapter@pp 183 \clear@ppage 184 \fi 185 \addappheadtotoc 186 \fi 187 \else 188 \if@dopage@pp 189 \appendixpage 190 \fi 191 \fi
173 174

% both page and toc % chapters

% toc only % chapters

% page only

There is only one other option applicable to the chapter style, so do it now and clear the way for doing the section style. To implement the titletoc option, we redene the \addcontentsline command.
192 193 194

\if@chapter@pp \if@dotitletoc@pp \@redotocentry@pp{chapter} \fi \else

The rest of the code is specic to the section style. While were in the mood we might as well nish o doing the titletoc option.
195

\if@dotitletoc@pp \@redotocentry@pp{section} \fi

The next piece of code implements the header option by providing a special version of \sectionmark.
196 197 198 199 200 201 202 203

\if@dohead@pp \def\sectionmark##1{% \if@twoside \markboth{\@formatsecmark@pp{##1}}{} \else \markright{\@formatsecmark@pp{##1}}{} \fi} \fi

11

The next piece of code implements the title option by doing cunning things with the \@seccntformat.3
204 205 206 207 208 209

\if@dotitle@pp \def\sectionname{\appendixname} \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% \csname the##1\endcsname\quad} \fi \fi}{%

At the end of the environment, save the appendix number and restore the sectional number.
210 211

\@ppsaveapp\@pprestoresec}

\setthesection \setthesubsection

The user commands for specifying the numbering style for subappendices.
212 213 214

\newcommand{\setthesection}{\thechapter.\Alph{section}} \newcommand{\setthesubsection}{\thesection.\Alph{subsection}}

\@resets@ppsub

Similar to \@resets@pp except that it is for use within the subappendices envirionment; as such, it is a bit simpler.
\newcommand{\@resets@ppsub}{\par \stepcounter{@pps} 217 \if@chapter@pp 218 \setcounter{section}{0} 219 \renewcommand{\thesection}{\setthesection} 220 \else 221 \setcounter{subsection}{0} 222 \renewcommand{\thesubsection}{\setthesubsection} 223 \fi 224 \if@pphyper
215 216

Now handle the hyperref tweaks.


225 226 227 228 229 230 231 232 233

\if@chapter@pp \renewcommand{\theHsection}{\theH@pps.\setthesection}% \else \renewcommand{\theHsubsection}{\theH@pps.\setthesubsection}% \fi \def\Hy@chapapp{\appendixname}% \fi }

subappendices

The environment for subappendices. Start it o by doing the resetting of the \(sub)section command.
234 235

\newenvironment{subappendices}{% \@resets@ppsub
3 From

a posting to comp.tex.tex by Donald Arseneau on 13 August 1998.

12

There are two options applicable to the chapter style. To implement the titletoc option, we redene the \addcontentsline command.
236 237

\if@chapter@pp \if@dotitletoc@pp \@redotocentry@pp{section} \fi

To implement the title option we do cunning things with the \@seccntformat command.
238 239 240 241 242 243

\if@dotitle@pp \def\sectionname{\appendixname} \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% \csname the##1\endcsname\quad} \fi \else \if@dotitletoc@pp \@redotocentry@pp{subsection} \fi \if@dotitle@pp \def\subsectionname{\appendixname} \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% \csname the##1\endcsname\quad} \fi \fi}{}

The rest of the code is for the section style.


244 245 246 247 248 249 250 251

\@formatsecmark@pp

Formats the page header for a redened \sectionmark.


\newcommand{\@formatsecmark@pp}[1]{% \MakeUppercase{\appendixname\space 254 \ifnum \c@secnumdepth >\z@ 255 \thesection\quad 256 \fi 257 #1}}
252 253

\@redotocentry@pp

In order to implement the titletoc option we redene the \addcontentsline command which is used to put entries into the ToC. \@redotocentry@pp{ sect } does the redenition, where sect is the name of the sectional heading (i.e., either chapter or section).
258

\newcommand{\@redotocentry@pp}[1]{% \let\oldacl@pp=\addcontentsline \def\addcontentsline##1##2##3{% \def\@pptempa{##1}\def\@pptempb{toc}% \ifx\@pptempa\@pptempb \def\@pptempa{##2}\def\@pptempb{#1}% \ifx\@pptempa\@pptempb

Save the original denition of \addcontentsline. Then start the redenition.


259 260

Check if writing to ToC and appropriate section.


261 262

Adding to the ToC le, so check on the sectioning command.


263 264

13

The sectioning command is the same as that specied by the argument to \@redotocentry@pp, so get on with the redenition.
265 266

\oldacl@pp{##1}{##2}{\appendixname\space ##3}% \else

The heading was dierent from the argument. No redenition is required, so call the original \addcontentsline.
267 268 269

\oldacl@pp{##1}{##2}{##3}% \fi \else

Adding to a le that is not the ToC. No redenition is required, so call the original \addcontentsline.
270 271 272

\oldacl@pp{##1}{##2}{##3}% \fi} }

The end of this package.


273

/usc

References
[GMS94] Michel Goossens, Frank Mittelbach, and Alexander Samarin. The LaTeX Companion. Addison-Wesley Publishing Company, 1994. [Wil96] Peter R. Wilson. LaTeX for standards: The LaTeX package les user manual. NIST Report NISTIR, June 1996.

Index
Numbers written in italic refer to the page where the corresponding entry is described; numbers underlined refer to the code line of the denition; numbers in roman refer to the code lines where the entry is used.
Symbols \@Alph . . . . . . . 157, 160 \@afterheading . . . . 112 \@afterindentfalse . 101 \@chap@pppage . . . 67, 72 \@chapapp . . . . . . . . 156 \@chapter@ppfalse . . 5 \@chapter@pptrue . . . 9 \@currentHref . 127, 139 \@dohead@ppfalse 21, 47 \@dohead@pptrue . 26, 46 \@dopage@ppfalse 22, 41 \@dopage@pptrue . 27, 40 \@dotitle@ppfalse 19, 43 \@dotitle@pptrue 24, 42 \@dotitletoc@ppfalse . . . . . . . . . 20, 45 \@dotitletoc@pptrue . . . . . . . . . 25, 44 \@dotoc@ppfalse . 18, 39 \@dotoc@pptrue . . 23, 38 \@formatsecmark@pp . . . . . 199, 201, 252 \@ifpackageloaded . 16 \@ifundefined . . . . . 7, 8, 206, 240, 247 \@knownclass@ppfalse 6 \@knownclass@pptrue . . . . . . . . . . . 8, 9 \@ppendinput . 29, 34, 36 \@pphyperfalse . . . . 14 \@pphypertrue . . . . . 16 \@pprestoresec . 48, 210 \@ppsaveapp . . . . 48, 210 \@ppsavesec . . . . 48, 151 \@pptempa . . . . 261264 \@pptempb . . . . 261264 \@pptocpagefalse . . 117 \@pptocpagetrue 116, 118

14

\@redotocentry@pp . . . . . . . . . 193, 195, 237, 244, 258 \@resets@pp . . . 150, 174 \@resets@ppsub 215, 235 \@sec@pppage . . . . 67, 98 \@seccntformat . . . . . . . . 206, 240, 247

. . . . . . . 206, 240, 247

\c@secnumdepth . . . . 254 \c@section . . . . . . . 160 \centering . . . . . . . 78 \chapter . . . . . . . . . 32 \clear@ppage . . . . . . . . 69, 73, 178, 183 \cleardoublepage . . 70 \clearpage . . . . . . . 70 \contentsline . . . . . . 127, 130, 139, 142 \csname . . . 206, 207, 240, 241, 247, 248 E \endcsname 206, 207, 240, 241, 247, 248 \endinput . . . . . . . . 34 environments: appendices . . . 3, 173 subappendices 4, 234 H \Huge . . . . . . . . . . . . 81 \huge . . . . . . . . . . . . 105 \Hy@chapapp . . . 168, 230 I \if@chapter@pp . . . . . . 5, 52, 55, 58, 61, 67, 121, 154, 163, 177, 182, 192, 217, 225, 236 \if@dohead@pp . . 18, 196 \if@dopage@pp . . . . . . . . . . 18, 176, 188 \if@dotitle@pp . . . . . 18, 204, 238, 245 \if@dotitletoc@pp 18, 193, 195, 237, 244 \if@dotoc@pp . . . . . . . . 18, 82, 107, 175 \if@knownclass@pp 5, 30 \if@openright . . . 70, 87 \if@pphyper . . . . 10, 125, 137, 162, 224 \if@pptocpage . . . . . 115 \if@twocolumn . . . . . 75 \if@twoside . . . . 86, 198 \interlinepenalty . . . . . . . . . 79, 103

M \MakeUppercase . . . . 253 \MessageBreak . . . . . 32 N \newif 5, 6, 13, 1822, 115 \noappendicestocpagenum . . . . . . . . . 2, 115 \normalfont . . . . 80, 104 O \oldacl@pp . . . . . . . . 259, 265, 267, 270 \onecolumn . . . . . . . 75 P \PackageWarningNoLine . . . . . . . . . . . . 31 \parindent . . . . . . . 102 \phantomsection 10, 120 \providecommand . . . . . . . . . 10, 63, 148 \ProvidesPackage . . . 3 Q \quad . 207, 241, 248, 255 R \restoreapp . . 4, 48, 170 S \section . . . . . . . . . 32 \sectionmark . . . . . . 197 \sectionname . . 205, 239 \setthesection . . . . . . 4, 212, 219, 226 \setthesubsection . . . 4, 212, 222, 228 \stepcounter . . 152, 216 subappendices (environment) . 4, 234 \subsectionname . . . 246 T \the@pps . . . . . \thechapter . . . \theH@pps . . . . 164, 166, \theHchapter . . \theHsection . . \theHsubsection

A \addappheadtotoc . . 2, 83, 108, 115, 185 \addcontentsline . . . 123, 135, 259, 260 \addtocontents . . . . . 126, 129, 138, 141 appendices (environment) . . . . 3, 173 \appendicestocpagenum . . . . . . . . . 2, 115 \appendixheaderoff 4, 46 \appendixheaderon 4, 46 \appendixname . . . . . . . . 3, 63, 156, 168, 205, 230, 239, 246, 253, 265 \appendixpage . . . . . . . . 2, 66, 180, 189 \appendixpagename . . . . . 3, 63, 81, 105 \appendixpageoff . 4, 40 \appendixpageon . . 4, 40 \appendixtitleoff 4, 42 \appendixtitleon . 4, 42 \appendixtitletocoff . . . . . . . . . . 4, 44 \appendixtitletocon . . . . . . . . . . 4, 44 \appendixtocname . . 3, 63, 123, 127, 130, 135, 139, 142 \appendixtocoff . . 4, 38 \appendixtocon . . . 4, 38 \AtBeginDocument . . 15 C . . . . . . . 157

\c@chapter

. . . . 10 157, 212 148, 226, 228 . . . . 164 166, 226 . . . 228

15

\thesection . . . . . . . . 160, 213, 219, 255

\thesubsection . . . . 222 \thispagestyle . . 74, 89 \twocolumn . . . . . . . 94

V \value . . . 52, 53, 55, 56, 58, 59, 61, 62

16

You might also like