diff options
author | Karl Berry <karl@freefriends.org> | 2007-08-15 18:44:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-08-15 18:44:25 +0000 |
commit | a3e65cf58603aec6b27742b833f880c0f3372020 (patch) | |
tree | 4da1825a845000efd2cd9f1a9ca1a3e4099456ad /Master/texmf-dist/tex/latex/titlesec/titletoc.sty | |
parent | 91b4a01237a390c7baa513e9a4117de577a1d49a (diff) |
titlesec 2.7 (11aug07)
git-svn-id: svn://tug.org/texlive/trunk@4731 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/titlesec/titletoc.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/titlesec/titletoc.sty | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty index 8f01805fc50..2bd15c3cfe7 100644 --- a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty +++ b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty @@ -2,16 +2,23 @@ % | Documentation is in the titlesec.tex file. | % +---------------------------------------------+ % -% Copyright (c) 1998-2005 by Javier Bezos. +% Copyright (c) 1998-2007 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.6 +% This file is part of the titlesec distribution release 2.8 % ----------------------------------------------------------- % -% This program can be redistributed and/or modified under the terms -% of the LaTeX Project Public License Distributed from CTAN -% archives in directory macros/latex/base/lppl.txt; either -% version 1 of the License, or any later version. +% It 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 this 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/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% The Current Maintainer of this work is Javier Bezos. % History of v1.1 % ~~~~~~~~~~~~~~~ @@ -78,7 +85,13 @@ % huge definition and to ease patching. % 05/01/22: Work on partial lists finished (but to be resumed). -\ProvidesPackage{titletoc}[2005/01/22 v1.5 TOC entries] +% History of 1.6 +% ~~~~~~~~~~~~~~ +% 07/05/04: Added the patch 2005/05/03 which fixed a wrong +% result with \included (F. Mittelbach) +% 07/07/14: Removed the patch mechanism. + +\ProvidesPackage{titletoc}[2007/08/12 v1.6 TOC entries] % The following tags are used: % ttl@ : the generic one, shared with titlesec @@ -94,6 +107,7 @@ \newif\ifttl@label \newif\ifttl@fromblock +\newdimen\ttl@leftsep \providecommand\titleline{% \@ifstar{\ttl@line@i{\hb@xt@\titlewidth}}% @@ -181,6 +195,7 @@ % \dimen@\wd\z@ % \let\thecontentslabel\ttl@a % \hspace*{-\dimen@}\hb@xt@\dimen@{#1\hfil} +% \show\ttl@b \show\ttl@a \hspace*{-#2}\hb@xt@#2{#1\hfil}}} \DeclareOption{rightlabels}{% @@ -501,10 +516,10 @@ \newcommand\startlist[2][default]{% \expandafter\ttl@xstartlist\csname ttl@partial#2\endcsname - \@ifundefined{ttl@#2@#1}% - {\expandafter\newcount\csname ttl@#2@#1\endcsname}% + \@ifundefined{c@ttl@#2@#1}% + {\newcounter{ttl@#2@#1}}% {\stoplist[#1]{#2}}% - \global\advance\csname ttl@#2@#1\endcsname\@ne + \stepcounter{ttl@#2@#1}% \resumelist[#1]{#2}} \newcommand\stopcontents[1][default]{\stoplist[#1]{toc}} @@ -512,14 +527,14 @@ \newcommand\stoplist[2][default]{% \protected@write\@auxout{}{% \string\ttl@writefile{\csname ttl@partial#2\endcsname}{% - \string\ttl@stoptoc{#1@\the\csname ttl@#2@#1\endcsname}}}} + \string\ttl@stoptoc{#1@\arabic{ttl@#2@#1}}}}} \newcommand\resumecontents[1][default]{\resumelist[#1]{toc}} \newcommand\resumelist[2][default]{% \protected@write\@auxout{}{% \string\ttl@writefile{\csname ttl@partial#2\endcsname}{% - \string\ttl@starttoc{#1@\the\csname ttl@#2@#1\endcsname}}}} + \string\ttl@starttoc{#1@\arabic{ttl@#2@#1}}}}} \def\ttl@starttoc#1{% \ifx\@writefile\@gobbletwo\else % Is this test necessary? @@ -547,11 +562,11 @@ \newcommand\ttl@printlist[5][default]{% \begingroup - \@ifundefined{ttl@#2@#1}% + \@ifundefined{c@ttl@#2@#1}% {\PackageError{titletoc}{No partial #2 named #1}% {You must start before a partial toc/list\MessageBreak with \string/startcontents/\string\startlist.}}{}% - \edef\ttl@ptoc{#1@\the\csname ttl@#2@#1\endcsname}% + \edef\ttl@ptoc{#1@\arabic{ttl@#2@#1}}% \def\ttl@toctop{#4}% #5% \let\ttl@xcontentsline\contentsline @@ -621,9 +636,5 @@ \advance\@tempskipa-\@tocrmarg \edef\ttl@corr{-\the\@tempskipa} -% Load patches if necessary - -\InputIfFileExists{titletoc.new}{}{} - \endinput |