summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/tocstyle.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/tocstyle.sty')
-rw-r--r--Master/texmf-dist/tex/latex/koma-script/tocstyle.sty94
1 files changed, 59 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/tocstyle.sty b/Master/texmf-dist/tex/latex/koma-script/tocstyle.sty
index d221819ca8e..ac668525223 100644
--- a/Master/texmf-dist/tex/latex/koma-script/tocstyle.sty
+++ b/Master/texmf-dist/tex/latex/koma-script/tocstyle.sty
@@ -7,7 +7,7 @@
%% tocstyle.dtx (with options: `package,trace,tocstyle')
%% scrlogo.dtx (with options: `logo')
%%
-%% Copyright (c) 2007 by Markus Kohm <komascript(at)gmx.info>
+%% Copyright (c) 2007-2008 by Markus Kohm <komascript(at)gmx.info>
%%
%% Copyright (c) 1994-2007
%% Markus Kohm and any individual authors listed elsewhere in this file.
@@ -50,7 +50,7 @@
%%% From File: tocstyle.dtx
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{tocstyle}
- [2007/12/21 v0.2alpha LaTeX2e KOMA-Script package (versatile toc styles)]
+ [2008/10/20 v0.2c-alpha LaTeX2e KOMA-Script package (versatile toc styles)]
\PackageWarningNoLine{tocstyle}{%
THIS IS AN ALPHA VERSION!\MessageBreak
USAGE OF THIS VERSION IS ON YOUR OWN RISK!\MessageBreak
@@ -123,15 +123,19 @@
toctextentriesleft}
\ProcessOptions\relax
\ifcsname if@tocleft\endcsname
- \if@tocleft
- \PackageWarningNoLine{tocstyle}{%
- You should not use class option `tocleft'!\MessageBreak
- This may result in errors or unexpected results.\MessageBreak
- I'll try to deactivate `tocleft', now.\MessageBreak
- You may use options `tocflat' and\MessageBreak
- `tocindentauto' instead of `tocleft'}%
- \csname @tocleftfalse\endcsname
- \fi
+ \expandafter\let\csname if@tempswa\expandafter\endcsname
+ \csname if@tocleft\endcsname
+\else
+ \@tempswafalse
+\fi
+\if@tempswa
+ \PackageWarningNoLine{tocstyle}{%
+ You should not use class option `toc=flat'!\MessageBreak
+ This may result in errors or unexpected results.\MessageBreak
+ I'll try to deactivate `toc=flat', now.\MessageBreak
+ You may use package options `tocflat' and\MessageBreak
+ `tocindentauto' instead of `toc=flat'}%
+ \csname @tocleftfalse\endcsname
\fi
\newcommand*\tocstyle@saved@starttoc{}
\let\tocstyle@saved@starttoc\@starttoc
@@ -638,30 +642,47 @@
}
\newcommand*{\tocstyle@feature@excludelist}{}
\newcommand*{\usetocstyle}[2][]{%
- \@ifundefined{tocstyle@style@#2}{%
- \PackageError{tocstyle}{unknown TOC style `#2'}{%
- You've told me to use TOC style `#2',\MessageBreak
- but there's no TOC style `#2' defined.}%
- }{%
- \def\settocfeature{%
- \@ifnextchar[ {\@@settocfeature[{#1}]}{\@@settocfeature[{#1}][]}%
+ \@ifundefined{tocstyle@deprecated@style@#2}{%
+ \@ifundefined{tocstyle@style@#2}{%
+ \PackageError{tocstyle}{unknown TOC style `#2'}{%
+ You've told me to use TOC style `#2',\MessageBreak
+ but there's no TOC style `#2' defined.}%
+ }{%
+ \def\settocfeature{%
+ \@ifnextchar[ {\@@settocfeature[{#1}]}{\@@settocfeature[{#1}][]}%
+ }%
+ \let\settocstylefeature\settocfeature
+ \expandafter\ifx\csname tocstyle@commandlist@#1\endcsname\relax
+ \else
+ \expandafter\expandafter\expandafter\@for
+ \expandafter\expandafter\expandafter\@tempa
+ \expandafter\expandafter\expandafter:%
+ \expandafter\expandafter\expandafter=%
+ \csname tocstyle@commandlist@#1\endcsname
+ \do{%
+ \expandafter\let\csname \@tempa\endcsname\relax
+ }%
+ \expandafter\let\csname tocstyle@commandlist@#1\endcsname\relax
+ \fi
+ \@usetocstyle{#2}%
+ \let\settocfeature\@settocfeature
+ \let\settocstylefeature\@settocstylefeature
}%
- \let\settocstylefeature\settocfeature
- \expandafter\ifx\csname tocstyle@commandlist@#1\endcsname\relax
+ }{%
+ \expandafter\ifx\csname tocstyle@deprecated@style@#2\endcsname\@empty
+ \PackageWarning{tocstyle}{%
+ deprecated TOC style `#2'!\MessageBreak
+ You should not longer use this style,\MessageBreak
+ because it will be removed soon.\MessageBreak
+ You should select another TOC style}%
+ \usetocstyle[{#1}]{deprecated@#2}%
\else
- \expandafter\expandafter\expandafter\@for
- \expandafter\expandafter\expandafter\@tempa
- \expandafter\expandafter\expandafter:%
- \expandafter\expandafter\expandafter=%
- \csname tocstyle@commandlist@#1\endcsname
- \do{%
- \expandafter\let\csname \@tempa\endcsname\relax
- }%
- \expandafter\let\csname tocstyle@commandlist@#1\endcsname\relax
+ \PackageWarning{tocstyle}{%
+ deprecated TOC style `#2'!\MessageBreak
+ You should use TOC style '\csname
+ tocstyle@deprecated@style@#2\endcsname'\MessageBreak
+ instead of `#2'}%
\fi
- \@usetocstyle{#2}%
- \let\settocfeature\@settocfeature
- \let\settocstylefeature\@settocstylefeature
}%
}
\newcommand*{\@usetocstyle}[1]{%
@@ -731,10 +752,11 @@
}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname sectfont\endcsname\relax
- \newtocstyle{KOMAScript}{%
+ \newtocstyle{KOMAlike}{%
\settocfeature{dothook}{\normalfont}%
\settocfeature[-1]{entryhook}{\sffamily\bfseries}%
\settocfeature[-1]{entryvskip}{2.25em\@plus\p@}%
+ \settocfeature[-1]{leaders}{\hfill}%
\settocfeature[0]{entryvskip}{1em\@plus\p@}%
\settocfeature[0]{leaders}{\hfill}%
\settocfeature[0]{entryhook}{%
@@ -756,10 +778,11 @@
\fi
}
\else
- \newtocstyle{KOMAScript}{%
+ \newtocstyle{KOMAlike}{%
\settocfeature{dothook}{\normalfont}%
\settocfeature[-1]{entryhook}{\sectfont}%
\settocfeature[-1]{entryvskip}{2.25em\@plus\p@}%
+ \settocfeature[-1]{leaders}{\hfill}%
\settocfeature[0]{entryvskip}{1em\@plus\p@}%
\settocfeature[0]{leaders}{\hfill}%
\settocfeature[0]{entryhook}{%
@@ -781,7 +804,8 @@
\fi
}
\fi
-\newtocstyle[KOMAScript]{classic}{%
+\newcommand*{\tocstyle@deprecated@style@KOMAScript}{KOMAlike}%
+\newtocstyle[KOMAlike]{classic}{%
\settocfeature{pagenumberhook}{\normalfont\normalcolor}%
\settocfeature{raggedhook}{\raggedright}%
}