diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-10 20:56:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-10 20:56:03 +0000 |
commit | 5087e3ce03180bb60398a5a5f493904645daa813 (patch) | |
tree | 3e7db8c94fec3bbb13e3e4e80eb1cb1e99507cf8 /Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty | |
parent | 24edadbfd5d45a97ab89a24622b103eb479b7b6d (diff) |
tocvsec2 (10mar14)
git-svn-id: svn://tug.org/texlive/trunk@33146 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty b/Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty index 8c90735738a..659a164dbff 100644 --- a/Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty +++ b/Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty @@ -23,7 +23,7 @@ %% This work consists of the files listed in the README file. %% ----------------------------------------------------------------- \ProvidesPackage{tocvsec2} - [2011/08/07 v1.3 variable ToC section entries] + [2014/03/10 v1.3a variable ToC section entries] \RequirePackage{ifthen} \newif\ift@cchapter \t@cchapterfalse @@ -34,75 +34,75 @@ {\t@cchaptertrue} \newif\if@knownsect@c -\newcommand{\@setseccntt@c}[2]{ +\newcommand{\@setseccntt@c}[2]{% \@knownsect@cfalse \ifthenelse{\equal{#1}{none}}{\setcounter{#2}{-10} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{part}}{\ift@cchapter \setcounter{#2}{-1} \else \setcounter{#2}{0} \fi - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{chapter}}{\setcounter{#2}{0} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{section}}{\setcounter{#2}{1} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{subsection}}{\setcounter{#2}{2} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{subsubsection}}{\setcounter{#2}{3} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{paragraph}}{\setcounter{#2}{4} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{subparagraph}}{\setcounter{#2}{5} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{all}}{\setcounter{#2}{100} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \if@knownsect@c\else \PackageError{tocvsec2}{% Unknown sectioning command name (#1) }{% I'll ignore it. Type \space <return> and I'll continue.\MessageBreak - If you haven't mistyped the name then use \protect\setcounter\space instead.} + If you haven't mistyped the name then use \protect\setcounter\space instead.}% \fi } \newcommand{\settocdepth}[1]{% \@knownsect@cfalse \ifthenelse{\equal{#1}{none}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{-10}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{part}}{% \ift@cchapter \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{-1}} \else \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{0}} \fi - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{chapter}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{0}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{section}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{1}} - \@knownsect@ctrue}{} - \ifthenelse{\equal{#1}{subsection}}{ + \@knownsect@ctrue}{}% + \ifthenelse{\equal{#1}{subsection}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{2}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{subsubsection}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{3}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{paragraph}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{4}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{subparagraph}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{5}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \ifthenelse{\equal{#1}{all}}{% \addtocontents{toc}{\save@tocdepth\protect\setcounter{tocdepth}{100}} - \@knownsect@ctrue}{} + \@knownsect@ctrue}{}% \if@knownsect@c\else \PackageError{tocvsec2}{% Unknown sectioning command name (#1)}% - {I'll ignore it. Type \space <return> and I'll continue.} + {I'll ignore it. Type \space <return> and I'll continue.}% \fi } \newcounter{max@tocdepth} @@ -117,7 +117,8 @@ } \newcommand{\setsecnumdepth}[1]{% \save@secnumdepth - \@setseccntt@c{#1}{secnumdepth}} + \@setseccntt@c{#1}{secnumdepth}% +} \newcounter{max@secnumdepth} \setcounter{max@secnumdepth}{\value{secnumdepth}} \newcommand{\maxsecnumdepth}[1]{% @@ -141,7 +142,7 @@ \afterassignment\gobble@secnumdepth \expandafter\c@secnumdepth\expandafter\numexpr\stack@secnumdepth\@nil \fi - } + }% } \let\stack@tocdepth\@empty \protected\def\save@tocdepth{% |