From 5087e3ce03180bb60398a5a5f493904645daa813 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 10 Mar 2014 20:56:03 +0000 Subject: tocvsec2 (10mar14) git-svn-id: svn://tug.org/texlive/trunk@33146 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/tocvsec2/tocvsec2.sty | 51 ++++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'Master/texmf-dist/tex/latex/tocvsec2') 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 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 and I'll continue.} + {I'll ignore it. Type \space 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{% -- cgit v1.2.3