summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-18 00:16:31 +0000
committerKarl Berry <karl@freefriends.org>2010-06-18 00:16:31 +0000
commitd9bd4cc7bc00bbe2637957dc1a44d9c949a6dbdc (patch)
tree0c8c9198b304f16b1b46962eef236c6bd290815a /Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
parent643866a0f27297875ee40ee641aa090114b87e51 (diff)
koma-script update (17jun10)
git-svn-id: svn://tug.org/texlive/trunk@19027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/tocbasic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/tocbasic.sty219
1 files changed, 214 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
index 0a68e5881b1..151f251a7c5 100644
--- a/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/tocbasic.sty
@@ -39,12 +39,14 @@
%% standard classes created by The LaTeX3 Project 1994-1996.
%%
%%% From File: tocbasic.dtx
-\def\tocbasicversion{2010/01/05 v3.04b}
+\def\tocbasicversion{2010/06/09 v3.06}
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{tocbasic}
[\tocbasicversion\space KOMA-Script package
(handling toc-files)%
]
+\ProcessOptions\relax
+\RequirePackage{keyval}
\newcommand*{\tb@listoftocs}{}
\newcommand{\ifattoclist}[1]{%
\begingroup
@@ -238,7 +240,7 @@
\ifx\relax#1\relax
\g@addto@macro\tocbasic@@before@hook{#2}%
\else
- \scr@ifundefinedorrelax{tb@#1@before@hook}{%
+ \@ifundefined{tb@#1@before@hook}{%
\PackageInfo{tocbasic}{defining new hook before starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@before@hook\endcsname
\@empty
@@ -250,7 +252,7 @@
\ifx\relax#1\relax
\g@addto@macro\tocbasic@@after@hook{#2}%
\else
- \scr@ifundefinedorrelax{tb@#1@after@hook}{%
+ \@ifundefined{tb@#1@after@hook}{%
\PackageInfo{tocbasic}{defining new hook after starting `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@after@hook\endcsname
\@empty
@@ -286,6 +288,14 @@
}%
}{}%
\tocbasic@listhead{#1}%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname microtypesetup\endcsname\relax
+ \else
+ \iftocfeature{\@currext}{noprotrusion}{}{%
+ \microtypesetup{protrusion=false}%
+ \PackageInfo{tocbasic}{character protrusion at \@currext\space deactivated}%
+ }%
+ \fi
\tocbasic@starttoc{#2}%
\endgroup
}
@@ -360,7 +370,7 @@
\csname tb@@afterhead@hook\endcsname
}
\newcommand{\BeforeTOCHead}[2][]{%
- \scr@ifundefinedorrelax{tb@#1@beforehead@hook}{%
+ \@ifundefined{tb@#1@beforehead@hook}{%
\PackageInfo{tocbasic}{defining new hook before heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@beforehead@hook\endcsname
\@empty
@@ -368,7 +378,7 @@
\expandafter\g@addto@macro\csname tb@#1@beforehead@hook\endcsname{#2}%
}
\newcommand{\AfterTOCHead}[2][]{%
- \scr@ifundefinedorrelax{tb@#1@afterhead@hook}{%
+ \@ifundefined{tb@#1@afterhead@hook}{%
\PackageInfo{tocbasic}{defining new hook after heading of `#1'}%
\expandafter\global\expandafter\let\csname tb@#1@afterhead@hook\endcsname
\@empty
@@ -432,6 +442,205 @@
}%
}%
}
+\define@key{tocbasic}{type}{%
+ \tb@ifvalueisnotempty{type}{#1}{\edef\tb@nt@type{#1}}%
+}
+\define@key{tocbasic}{counterwithin}{%
+ \edef\tb@nt@counterwithin{#1}%
+}
+\define@key{tocbasic}{types}{%
+ \tb@ifvalueisnotempty{types}{#1}{\edef\tb@nt@types{#1}}%
+}
+\define@key{tocbasic}{extension}{%
+ \tb@ifvalueisnotempty{extension}{#1}{\edef\tb@nt@ext{#1}}%
+}
+\define@key{tocbasic}{owner}{%
+ \tb@ifvalueisnotempty{owner}{#1}{\edef\tb@nt@owner{#1}}%
+}
+\define@key{tocbasic}{name}{%
+ \tb@ifvalueisnotempty{name}{#1}{\edef\tb@nt@name{#1}}%
+}
+\define@key{tocbasic}{listname}{%
+ \tb@ifvalueisnotempty{listname}{#1}{\edef\tb@nt@listname{#1}}%
+}
+\newif\iftb@forcenames
+\define@key{tocbasic}{forcenames}[true]{%
+ \lowercase{\tb@boolkey{#1}}{forcenames}%
+}
+\define@key{tocbasic}{level}{%
+ \tb@ifvalueisnotempty{level}{#1}{\tb@numkey\tb@nt@level{#1}}%
+}
+\define@key{tocbasic}{indent}{%
+ \tb@ifvalueisnotempty{indent}{#1}{\tb@dimkey\tb@nt@indent{#1}}%
+}
+\define@key{tocbasic}{hang}{%
+ \tb@ifvalueisnotempty{hang}{#1}{\tb@dimkey\tb@nt@hang{#1}}%
+}
+\newif\iftb@float
+\define@key{tocbasic}{float}[true]{%
+ \lowercase{\tb@boolkey{#1}}{float}%
+}
+\newif\iftb@nonfloat
+\define@key{tocbasic}{nonfloat}[true]{%
+ \lowercase{\tb@boolkey{#1}}{nonfloat}%
+}
+\define@key{tocbasic}{floattype}{%
+ \tb@ifvalueisnotempty{floattype}{#1}{\tb@numkey\tb@nt@floattype{#1}}%
+}
+\define@key{tocbasic}{floatpos}{%
+ \tb@ifvalueisnotempty{floatpos}{#1}{\edef\tb@nt@floatpos{#1}}%
+}
+\newcommand*{\DeclareNewTOC}[2][]{%
+ \tb@floatfalse
+ \tb@nonfloatfalse
+ \tb@forcenamesfalse
+ \def\tb@nt@floattype{\tb@nt@autofloattype}%
+ \def\tb@nt@floatpos{tbp}%
+ \def\tb@nt@ext{#2}%
+ \def\tb@nt@type{#2}%
+ \def\tb@nt@types{\tb@nt@type s}%
+ \def\tb@nt@owner{float}%
+ \def\tb@nt@name{\expandafter\MakeUppercase\tb@nt@type}%
+ \def\tb@nt@listname{List of \expandafter\MakeUppercase\tb@nt@types}%
+ \def\tb@nt@level{1}%
+ \def\tb@nt@indent{1em}%
+ \def\tb@nt@hang{1.5em}%
+ \let\tb@nt@counterwithin\@empty%
+ \setkeys{tocbasic}{#1}%
+ \expandafter\newcommand\csname ext@\tb@nt@type\endcsname{}%
+ \expandafter\let\csname ext@\tb@nt@type\endcsname\tb@nt@ext
+ \addtotoclist[\tb@nt@owner]{\csname ext@\tb@nt@type\endcsname}%
+ \@ifundefined{\tb@nt@type name}{%
+ \expandafter\let\csname \tb@nt@type name\endcsname\tb@nt@name
+ }{%
+ \iftb@forcenames
+ \expandafter\let\csname \tb@nt@type name\endcsname\tb@nt@name
+ \fi
+ }%
+ \@ifundefined{list\tb@nt@type name}{%
+ \expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
+ }{%
+ \iftb@forcenames
+ \expandafter\let\csname list\tb@nt@type name\endcsname\tb@nt@listname
+ \fi
+ }%
+ \expandafter\newcommand\csname listof\tb@nt@ext name\expandafter\endcsname
+ \expandafter{\csname list\tb@nt@type name\endcsname}%
+ \begingroup\edef\@tempa{\endgroup
+ \noexpand\newcommand*\csname listof\tb@nt@types\endcsname{%
+ \noexpand\listoftoc{\tb@nt@ext}%
+ }%
+ }\@tempa
+ \begingroup\edef\@tempa{\endgroup
+ \noexpand\newcommand*\csname l@\tb@nt@type\endcsname{%
+ \noexpand\@dottedtocline{\tb@nt@level}{\tb@nt@indent}{\tb@nt@hang}%
+ }%
+ }\@tempa
+ \begingroup\edef\@tempa{\endgroup
+ \noexpand\newcommand*\csname setup\tb@nt@types\endcsname{%
+ \noexpand\setuptoc{\tb@nt@ext}%
+ }%
+ }\@tempa
+ \@tempswafalse
+ \iftb@float
+ \expandafter\newcommand\expandafter*\csname fps@\tb@nt@type\expandafter
+ \endcsname{\tb@nt@floatpos}%
+ \expandafter\newcommand\expandafter*\csname ftype@\tb@nt@type\expandafter
+ \endcsname{\tb@nt@floattype}%
+ \begingroup
+ \edef\@tempa{%
+ \noexpand\endgroup
+ \noexpand\newenvironment{\tb@nt@type}{%
+ \noexpand\@float{\tb@nt@type}%
+ }{%
+ \noexpand\end@float
+ }%
+ \noexpand\newenvironment{\tb@nt@type*}{%
+ \noexpand\@dblfloat{\tb@nt@type}%
+ }{%
+ \noexpand\end@dblfloat
+ }%
+ }%
+ \@tempa
+ \@tempswatrue
+ \fi
+ \iftb@nonfloat
+ \begingroup
+ \edef\@tempa{%
+ \noexpand\endgroup
+ \noexpand\newenvironment{\tb@nt@type-}{%
+ \noexpand\trivlist\noexpand\item\noexpand\relax
+ \noexpand\minipage{\noexpand\linewidth}%
+ \noexpand\def\noexpand\@captype{\tb@nt@type}%
+ }{%
+ \noexpand\endminipage\noexpand\endtrivlist
+ }%
+ }%
+ \@tempa
+ \@tempswatrue
+ \fi
+ \if@tempswa
+ \@ifundefined{c@\tb@nt@type}{%
+ \newcounter{\tb@nt@type}%
+ }{%
+ \PackageWarning{tocbasic}{using already defined counter `\tb@nt@type'}%
+ }%
+ \ifx\tb@nt@counterwithin\@empty\else
+ \@addtoreset{\tb@nt@type}{\tb@nt@counterwithin}%
+ \begingroup\edef\@tempa{%
+ \noexpand\endgroup
+ \noexpand\renewcommand*\expandafter\noexpand
+ \csname the\tb@nt@type\endcsname{%
+ \expandafter\noexpand\csname the\tb@nt@counterwithin\endcsname
+ .\noexpand\arabic{\tb@nt@type}%
+ }%
+ }\@tempa
+ \fi
+ \begingroup
+ \edef\@tempa{%
+ \noexpand\endgroup
+ \noexpand\newcommand*\expandafter\noexpand
+ \csname \tb@nt@type format\endcsname{%
+ \expandafter\noexpand\csname \tb@nt@type name\endcsname
+ \noexpand\nobreakspace
+ \expandafter\noexpand\csname the\tb@nt@type\endcsname
+ \csname autodot\endcsname
+ }%
+ \noexpand\newcommand*\expandafter\noexpand
+ \csname fnum@\tb@nt@type\endcsname{%
+ \expandafter\noexpand\csname \tb@nt@type format\endcsname
+ }%
+ }%
+ \@tempa
+ \fi
+}
+\newcommand*{\tb@ifvalueisnotempty}[2]{%
+ \begingroup
+ \edef\@tempa{#2}\ifx\@tempa\@empty
+ \PackageError{tocbasic}{empty value for key `#1'}{%
+ The argument of key `#1' may not by empty!}%
+ \aftergroup\@gobble
+ \else
+ \aftergroup\@firstofone
+ \fi
+ \endgroup
+}
+\newcommand*{\tb@boolkey}[2]{%
+ \csname tb@#2\ifx\relax#1\relax true\else#1\fi\endcsname
+}
+\newcommand*{\tb@dimkey}[2]{%
+ \begingroup
+ \@defaultunits\@tempdima#2pt\relax\@nnil
+ \edef\@tempa{\noexpand\endgroup\noexpand\def\noexpand#1{\the\@tempdima}}
+ \@tempa
+}
+\newcommand*{\tb@numkey}[2]{%
+ \begingroup
+ \afterassignment\remove@to@nnil\@tempcnta#2\relax\@nnil
+ \edef\@tempa{\noexpand\endgroup\noexpand\def\noexpand#1{\the\@tempcnta}}
+ \@tempa
+}
+\newcommand*{\tb@nt@autofloattype}{16}
%%% From File: scrlogo.dtx
\@ifundefined{KOMAScript}{%
\DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%