summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/appendix
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:51:31 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:51:31 +0000
commit73383af26b2e7c99c97f74dd6fbae23118ec5a55 (patch)
tree94be45d949b5ae880873f02976248ef804135201 /Master/texmf-dist/tex/latex/appendix
parentc5653341831f1b5370ffea638f3f083599cf56ba (diff)
appendix
git-svn-id: svn://tug.org/texlive/trunk@671 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/appendix')
-rw-r--r--Master/texmf-dist/tex/latex/appendix/appendix.sty302
1 files changed, 302 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/appendix/appendix.sty b/Master/texmf-dist/tex/latex/appendix/appendix.sty
new file mode 100644
index 00000000000..49ab6450338
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/appendix/appendix.sty
@@ -0,0 +1,302 @@
+%%
+%% This is file `appendix.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% appendix.dtx (with options: `usc')
+%%
+%% -----------------------------------------------------------------
+%% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004
+%% (or at: pandgwilson at earthlink dot net)
+%% Copyright 1998 --- 2004 Peter R. Wilson
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any
+%% later version.
+%% The latest version of the license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2003/06/01 or later.
+%%
+%% This work has the LPPL maintenance status "author-maintained".
+%%
+%% This work consists of the files listed in the README file.
+%% -----------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{appendix}[2002/08/06 v1.2 extra appendix facilities]
+
+\newif\if@chapter@pp\@chapter@ppfalse
+\newif\if@knownclass@pp\@knownclass@ppfalse
+\@ifundefined{chapter}{%
+ \@ifundefined{section}{}{\@knownclass@pptrue}}{%
+ \@chapter@pptrue\@knownclass@pptrue}
+\providecommand{\phantomsection}{}
+\newcounter{@pps}
+ \renewcommand{\the@pps}{\alph{@pps}}
+\newif\if@pphyper
+ \@pphyperfalse
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{\@pphypertrue}{}}
+
+\newif\if@dotoc@pp\@dotoc@ppfalse
+\newif\if@dotitle@pp\@dotitle@ppfalse
+\newif\if@dotitletoc@pp\@dotitletoc@ppfalse
+\newif\if@dohead@pp\@dohead@ppfalse
+\newif\if@dopage@pp\@dopage@ppfalse
+\DeclareOption{toc}{\@dotoc@pptrue}
+\DeclareOption{title}{\@dotitle@pptrue}
+\DeclareOption{titletoc}{\@dotitletoc@pptrue}
+\DeclareOption{header}{\@dohead@pptrue}
+\DeclareOption{page}{\@dopage@pptrue}
+\ProcessOptions\relax
+\newcommand{\@ppendinput}{}
+\if@knownclass@pp\else
+ \PackageWarningNoLine{appendix}%
+ {There is no \protect\chapter\space or \protect\section\space command.\MessageBreak
+ The appendix package will not be used}
+ \renewcommand{\@ppendinput}{\endinput}
+\fi
+\@ppendinput
+
+\newcommand{\appendixtocon}{\@dotoc@pptrue}
+\newcommand{\appendixtocoff}{\@dotoc@ppfalse}
+\newcommand{\appendixpageon}{\@dopage@pptrue}
+\newcommand{\appendixpageoff}{\@dopage@ppfalse}
+\newcommand{\appendixtitleon}{\@dotitle@pptrue}
+\newcommand{\appendixtitleoff}{\@dotitle@ppfalse}
+\newcommand{\appendixtitletocon}{\@dotitletoc@pptrue}
+\newcommand{\appendixtitletocoff}{\@dotitletoc@ppfalse}
+\newcommand{\appendixheaderon}{\@dohead@pptrue}
+\newcommand{\appendixheaderoff}{\@dohead@ppfalse}
+\newcounter{@ppsavesec}
+\newcounter{@ppsaveapp}
+\setcounter{@ppsaveapp}{0}
+\newcommand{\@ppsavesec}{%
+ \if@chapter@pp \setcounter{@ppsavesec}{\value{chapter}} \else
+ \setcounter{@ppsavesec}{\value{section}} \fi}
+\newcommand{\@pprestoresec}{%
+ \if@chapter@pp \setcounter{chapter}{\value{@ppsavesec}} \else
+ \setcounter{section}{\value{@ppsavesec}} \fi}
+\newcommand{\@ppsaveapp}{%
+ \if@chapter@pp \setcounter{@ppsaveapp}{\value{chapter}} \else
+ \setcounter{@ppsaveapp}{\value{section}} \fi}
+\newcommand{\restoreapp}{%
+ \if@chapter@pp \setcounter{chapter}{\value{@ppsaveapp}} \else
+ \setcounter{section}{\value{@ppsaveapp}} \fi}
+\providecommand{\appendixname}{Appendix}
+\newcommand{\appendixtocname}{Appendices}
+\newcommand{\appendixpagename}{Appendices}
+\newcommand{\appendixpage}{%
+ \if@chapter@pp \@chap@pppage \else \@sec@pppage \fi
+}
+\newcommand{\clear@ppage}{%
+ \if@openright\cleardoublepage\else\clearpage\fi}
+
+\newcommand{\@chap@pppage}{%
+ \clear@ppage
+ \thispagestyle{plain}%
+ \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
+ \null\vfil
+ \markboth{}{}%
+ {\centering
+ \interlinepenalty \@M
+ \normalfont
+ \Huge \bfseries \appendixpagename\par}%
+ \if@dotoc@pp
+ \addappheadtotoc
+ \fi
+ \vfil\newpage
+ \if@twoside
+ \if@openright
+ \null
+ \thispagestyle{empty}%
+ \newpage
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi
+}
+
+\newcommand{\@sec@pppage}{%
+ \par
+ \addvspace{4ex}%
+ \@afterindentfalse
+ {\parindent \z@ \raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \huge \bfseries \appendixpagename%
+ \markboth{}{}\par}%
+ \if@dotoc@pp
+ \addappheadtotoc
+ \fi
+ \nobreak
+ \vskip 3ex
+ \@afterheading
+}
+
+\newif\if@pptocpage
+ \@pptocpagetrue
+\newcommand{\noappendicestocpagenum}{\@pptocpagefalse}
+\newcommand{\appendicestocpagenum}{\@pptocpagetrue}
+\newcommand{\addappheadtotoc}{%
+ \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
+}
+
+\providecommand{\theH@pps}{\alph{@pps}}
+
+\newcommand{\@resets@pp}{\par
+ \@ppsavesec
+ \stepcounter{@pps}
+ \setcounter{section}{0}%
+ \if@chapter@pp
+ \setcounter{chapter}{0}%
+ \renewcommand\@chapapp{\appendixname}%
+ \renewcommand\thechapter{\@Alph\c@chapter}%
+ \else
+ \setcounter{subsection}{0}%
+ \renewcommand\thesection{\@Alph\c@section}%
+ \fi
+ \if@pphyper
+ \if@chapter@pp
+ \renewcommand{\theHchapter}{\theH@pps.\Alph{chapter}}%
+ \else
+ \renewcommand{\theHsection}{\theH@pps.\Alph{section}}%
+ \fi
+ \def\Hy@chapapp{\appendixname}%
+ \fi
+ \restoreapp
+}
+
+\newenvironment{appendices}{%
+ \@resets@pp
+ \if@dotoc@pp
+ \if@dopage@pp % both page and toc
+ \if@chapter@pp % chapters
+ \clear@ppage
+ \fi
+ \appendixpage
+ \else % toc only
+ \if@chapter@pp % chapters
+ \clear@ppage
+ \fi
+ \addappheadtotoc
+ \fi
+ \else
+ \if@dopage@pp % page only
+ \appendixpage
+ \fi
+ \fi
+ \if@chapter@pp
+ \if@dotitletoc@pp \@redotocentry@pp{chapter} \fi
+ \else
+ \if@dotitletoc@pp \@redotocentry@pp{section} \fi
+ \if@dohead@pp
+ \def\sectionmark##1{%
+ \if@twoside
+ \markboth{\@formatsecmark@pp{##1}}{}
+ \else
+ \markright{\@formatsecmark@pp{##1}}{}
+ \fi}
+ \fi
+ \if@dotitle@pp
+ \def\sectionname{\appendixname}
+ \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }%
+ \csname the##1\endcsname\quad}
+ \fi
+ \fi}{%
+ \@ppsaveapp\@pprestoresec}
+
+\newcommand{\setthesection}{\thechapter.\Alph{section}}
+\newcommand{\setthesubsection}{\thesection.\Alph{subsection}}
+
+\newcommand{\@resets@ppsub}{\par
+ \stepcounter{@pps}
+ \if@chapter@pp
+ \setcounter{section}{0}
+ \renewcommand{\thesection}{\setthesection}
+ \else
+ \setcounter{subsection}{0}
+ \renewcommand{\thesubsection}{\setthesubsection}
+ \fi
+ \if@pphyper
+ \if@chapter@pp
+ \renewcommand{\theHsection}{\theH@pps.\setthesection}%
+ \else
+ \renewcommand{\theHsubsection}{\theH@pps.\setthesubsection}%
+ \fi
+ \def\Hy@chapapp{\appendixname}%
+ \fi
+}
+
+\newenvironment{subappendices}{%
+ \@resets@ppsub
+ \if@chapter@pp
+ \if@dotitletoc@pp \@redotocentry@pp{section} \fi
+ \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}{}
+
+\newcommand{\@formatsecmark@pp}[1]{%
+ \MakeUppercase{\appendixname\space
+ \ifnum \c@secnumdepth >\z@
+ \thesection\quad
+ \fi
+ #1}}
+\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
+\oldacl@pp{##1}{##2}{\appendixname\space ##3}%
+ \else
+ \oldacl@pp{##1}{##2}{##3}%
+ \fi
+ \else
+ \oldacl@pp{##1}{##2}{##3}%
+ \fi}
+}
+
+\endinput
+%%
+%% End of file `appendix.sty'.