summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/etoc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-02-02 22:45:32 +0000
committerKarl Berry <karl@freefriends.org>2013-02-02 22:45:32 +0000
commit05feb8ba1f91b7ff8d584fcc7b8497e76b58be5c (patch)
tree3d7a288e8f06d25912f73ca6e2af536c075d53db /Master/texmf-dist/tex/latex/etoc
parent9b3767f46c94fc4e2fcef2b019d38a74be4bc671 (diff)
etoc 1.07 (2feb13)
git-svn-id: svn://tug.org/texlive/trunk@29011 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoc')
-rw-r--r--Master/texmf-dist/tex/latex/etoc/etoc.sty69
1 files changed, 35 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/etoc/etoc.sty b/Master/texmf-dist/tex/latex/etoc/etoc.sty
index b17bd0c9730..8cd106db3a8 100644
--- a/Master/texmf-dist/tex/latex/etoc/etoc.sty
+++ b/Master/texmf-dist/tex/latex/etoc/etoc.sty
@@ -22,14 +22,14 @@
%% in the same archive or directory.)
%%
\ProvidesPackage{etoc}
- [2013/01/29 v1.07 easily customizable TOCs (jfB)]
+ [2013/02/02 v1.07b easily customizable TOCs (jfB)]
%%
%% Package `etoc' by Jean-Francois Burnol
%% Copyright (C) 2012, 2013 by Jean-Francois Burnol
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{multicol}
-\RequirePackage{xspace}
+%% \RequirePackage{xspace} %% REMOVED (1.07b)
\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
\newtoks\Etoc@toctoks
@@ -283,16 +283,17 @@
\Etoc@next
\@firstoftwo{\Etoc@swa{#1}}{\Etoc@swb{#1}}}
\def\Etoc@lxyz #1#2{%
- \@namedef{etocpage }{\leavevmode #2\xspace}%
- \Etoc@getthepage #2\etoc@
- \@namedef{etocname }{\leavevmode #1\xspace}%
- \def\etocthename{#1}%
- \Etoc@getnb #1\relax\relax\etoc@
- \ifEtoc@number\else
+ \@namedef{etoclink }##1{##1}% fall-back if no links
+ \@namedef{etocpage }{\leavevmode #2}%
+ \Etoc@getthepage #2\etoc@
+ \@namedef{etocname }{\leavevmode #1}%
+ \def\etocthename{#1}%
+ \Etoc@getnb #1\relax\relax\etoc@
+ \ifEtoc@number\else
\ifEtoc@part
\Etoc@getit #1\hspace\relax\etoc@
\fi
- \fi}
+ \fi}
\def\Etoc@getnb #1{\let\Etoc@next\Etoc@getnb@nohyp
\ifEtoc@hyperref\ifx #1\hyper@linkstart
\let\Etoc@next\Etoc@getnb@hyp
@@ -314,16 +315,16 @@
\def\etocthepage{#4}}
\def\Etoc@getnb@nohyp #1#2#3\etoc@{%
\def\Etoc@getname ##1\relax\relax\etoc@{%
- \@namedef{etocname }{\leavevmode ##1\xspace}%
+ \@namedef{etocname }{\leavevmode ##1}%
\def\etocthename{##1}%
}%
\ifx #1\numberline
- \@namedef{etocnumber }{\leavevmode #2\xspace}%
+ \@namedef{etocnumber }{\leavevmode #2}%
\def\etocthenumber{#2}%
\Etoc@numbertrue
\Etoc@getname #3\etoc@
\else
- \@namedef{etocnumber }{\leavevmode\xspace}%
+ \@namedef{etocnumber }{\leavevmode}%
\def\etocthenumber{}%
\Etoc@numberfalse
\fi
@@ -331,17 +332,17 @@
\def\Etoc@getnb@hyp #1#2#3#4#5#6\etoc@{%
\@namedef{etoclink }##1{#1{#2}{#3}{##1}#5}%
\def\Etoc@getname ##1\relax\relax\etoc@{%
- \@namedef{etocname }{\leavevmode #1{#2}{#3}{##1}#5\xspace}%
+ \@namedef{etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
\def\etocthename{##1}%
}%
\def\Etoc@getnbr ##1##2##3\etoc@{%
\ifx ##1\numberline
- \@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##2}#5\xspace}%
+ \@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##2}#5}%
\def\etocthenumber{##2}%
\Etoc@numbertrue
\Etoc@getname ##3\etoc@
\else
- \@namedef{etocnumber }{\leavevmode\xspace}%
+ \@namedef{etocnumber }{\leavevmode}%
\def\etocthenumber{}%
\Etoc@numberfalse
\def\etocthename{#4}%
@@ -350,11 +351,11 @@
}
\def\Etoc@getit@nohyp #1\hspace#2#3\etoc@{%
\def\Etoc@getname ##1\hspace\relax\etoc@{%
- \@namedef{etocname }{\leavevmode ##1\xspace}%
+ \@namedef{etocname }{\leavevmode ##1}%
\def\etocthename{##1}%
}%
\ifx\relax#2\else
- \@namedef{etocnumber }{\leavevmode #1\xspace}%
+ \@namedef{etocnumber }{\leavevmode #1}%
\def\etocthenumber{#1}%
\Etoc@numbertrue
\Etoc@getname #3\etoc@
@@ -362,12 +363,12 @@
}
\def\Etoc@getit@hyp #1#2#3#4#5#6\etoc@{%
\def\Etoc@getname ##1\hspace\relax\etoc@{%
- \@namedef{etocname }{\leavevmode #1{#2}{#3}{##1}#5\xspace}%
+ \@namedef{etocname }{\leavevmode #1{#2}{#3}{##1}#5}%
\def\etocthename{##1}%
}%
\def\Etoc@getnbr ##1\hspace##2##3\etoc@{%
\ifx\relax##2\else
- \@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##1}#5\xspace}%
+ \@namedef{etocnumber }{\leavevmode #1{#2}{#3}{##1}#5}%
\def\etocthenumber{##1}%
\Etoc@numbertrue
\Etoc@getname ##3\etoc@
@@ -528,7 +529,7 @@
\def\localtable@fcontents{%
\refstepcounter{etoc@tocid}%
\addtocontents{toc}
- {\string\etoc@startlocaltoc\string{\arabic{etoc@tocid}\string}}%
+ {\string\etoc@startlocaltoc{\arabic{etoc@tocid}}}%
\Etoc@tocwithidtrue
\futurelet\Etoc@nexttoken\Etoc@t@bleofcontents}
\newcommand*\etocaftertitlehook{}
@@ -603,7 +604,7 @@
\newcommand*\etocabbrevpagename{p.~}
\newcommand*\etocpartname{\partname}
\newcommand*\etocbookname{Book}
-\def\etoctoclines{\Etoc@standardfalse
+\def\etocdefaultlines{\Etoc@standardfalse
\etoc@setstyle{@minustwo}{\etocskipfirstprefix}{\pagebreak[3]}
{\begingroup \etocfontminustwo
\addvspace{\etocsepminustwo}%
@@ -646,7 +647,7 @@
\parindent \z@ \parfillskip \z@
\setbox\z@\vbox{\parfillskip\@flushglue
\etocname\par\setbox\tw@\lastbox
-\global\setbox\@ne\hbox{\unhbox\tw@}}%
+\global\setbox\@ne\hbox{\unhbox\tw@\ }}%
\dimen\z@=\wd\@ne
\setbox\z@=\etoctoclineleaders
\advance\dimen\z@\wd\z@
@@ -655,12 +656,12 @@
{\setbox\tw@\hbox{\etocabbrevpagename\etocpage}}%
\advance\dimen\z@\wd\tw@
\ifdim\dimen\z@ < \linewidth
- \vbox{\etocname\nobreak
+ \vbox{\etocname~% modified in 1.07b (after removal of \xspace)
\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadone\baselineskip\par}
\else
- \vbox{\etocname\nobreak
- \ifdim\wd\@ne<\linewidth\leaders\copy\z@\hfil\break\fi
+ \vbox{\etocname~% modified in 1.07b
+ \leaders\copy\z@\hfil\break
\hbox{}\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadone\baselineskip\par}
\fi
@@ -684,12 +685,12 @@
{\setbox\tw@\hbox{\etocabbrevpagename\etocpage}}%
\advance\dimen\z@\wd\tw@
\ifdim\dimen\z@ < \linewidth
- \vbox{\etocname\nobreak
+ \vbox{\etocname~%
\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadtwo\baselineskip\par}
\else
- \vbox{\etocname\nobreak
- \ifdim\wd\@ne<\linewidth\leaders\copy\z@\hfil\break\fi
+ \vbox{\etocname~%
+ \leaders\copy\z@\hfil\break
\hbox{}\leaders\box\z@\hfil\box\tw@
\baselineskip\etocbaselinespreadtwo\baselineskip\par}
\fi
@@ -703,7 +704,7 @@
\nointerlineskip\noindent
\etocskipfirstprefix}
{\allowbreak\,--\,}
-{\etocname\unskip} % \xspace in \etocname
+{\etocname}
{.\hfil\begingroup
\baselineskip\etocbaselinespreadthree\baselineskip
\par\endgroup
@@ -1028,7 +1029,6 @@
\etocmemoirtoctotocfmt{chapter}{\contentsname}%
\renewcommand*\etocstandarddisplaystyle{\etocmemoirstyle}
\Etoc@redefetocstyle{chapter}}{}
-\newcommand*\etocstandardlines{\Etoc@standardtrue}
\def\Etoc@addtocontents #1#2%
{\ifEtoc@hyperref
\addtocontents {toc}{\protect\contentsline
@@ -1043,10 +1043,11 @@
\addcontentsline {toc}{#1}{#2}}
\DeclareRobustCommand*{\etoctoccontentsline}
{\@ifstar{\Etoc@addcontentsline@}{\Etoc@addtocontents}}
-\etoctoclines
-\AtBeginDocument{
-\etocstandardlines
-\etocstandarddisplaystyle}
+\newcommand*\etocstandardlines{\Etoc@standardtrue}
+\newcommand*\etoctoclines{\Etoc@standardfalse} % 1.07b
+\etocdefaultlines % for initialization
+\etocstandardlines % removed silly AtBeginDocument temporarily added for 1.07
+\etocstandarddisplaystyle
\endinput
%%
%% End of file `etoc.sty'.