diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/tableof/README | 88 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tableof/README.md | 34 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/tableof/tableof.pdf | bin | 99422 -> 48585 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/tableof/tableof.dtx | 139 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/tableof/tableof.ins | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tableof/tableof.sty | 30 |
6 files changed, 219 insertions, 78 deletions
diff --git a/Master/texmf-dist/doc/latex/tableof/README b/Master/texmf-dist/doc/latex/tableof/README new file mode 100644 index 00000000000..da6cef7d425 --- /dev/null +++ b/Master/texmf-dist/doc/latex/tableof/README @@ -0,0 +1,88 @@ + +ABSTRACT + + +- Package: tableof (Tables of tagged contents) +- Version: 1.4 (2015/02/20) +- License: LPPL 1.3c +- Copyright (C) 2012-2015 Jean-Francois Burnol + +The commands \toftagstart, \toftagstop, \toftagthis, \tofuntagthis are +used to tag chapters, sections or any other sectioning units destined to +end up in the table(s) of contents. Then: + + \nexttocwithtags{req. 1, req. 2, ... }{excl. 1, excl. 2, ... } + \tableofcontents % or equivalent command + + +specifies which tags are to be required and which ones are to be +excluded from the typeset TOC. + +For documents with classes where \tableofcontents is only single-use, +the package provides: + + \tableoftaggedcontents{req. 1, req. 2, ... }{excl. 1, excl. 2, ... } + +which does not have this restriction. + + + +INSTALLATION + + +For extracting the style file: + + latex tableof.dtx + +Files tableof.sty, tableof.ins and tableoftest.tex are generated on the +first latex run. Move tableof.sty to a suitable location within the TeX +installation: + + tableof.sty -> <TDS>/tex/latex/tableof/ + +To produce the documentation: + + latex tableof.dtx (a second time) + dvipdfmx tableof.dvi + +tableof.ins is for TeX distributions expecting it. + +tableoftest.tex is an example of use of the package commands. Run latex +twice on it to see examples of tagged tables of contents. + + + +CHANGE HISTORY + + +- v1.4 (2015/02/20) under the hood code improvements. + +- v1.3 (2015/02/11) comma separated lists of tags now allow spaces. + +- v1.2 (2013/03/04) added command \tableoftaggedcontents. + +- v1.1 (2012/12/13) added command \nexttocwithtags. + +- v1.0 (2012/12/06) first release. + + + +LICENSE + + + This Work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either + version 1.3c of this license or (at your option) any later + version. This version of this license is in + +http://www.latex-project.org/lppl/lppl-1-3c.txt + + and 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 2005/12/01 or later. + + The Author of this Work is: + Jean-Francois Burnol <jfbu at free dot fr> diff --git a/Master/texmf-dist/doc/latex/tableof/README.md b/Master/texmf-dist/doc/latex/tableof/README.md index 59068fe241c..99e7b661304 100644 --- a/Master/texmf-dist/doc/latex/tableof/README.md +++ b/Master/texmf-dist/doc/latex/tableof/README.md @@ -2,23 +2,24 @@ Abstract ======== - Package: tableof (Tables of tagged contents) -- Version: 1.3 (2015/02/11) +- Version: 1.4 (2015/02/20) - License: LPPL 1.3c - Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr> -The commands `\toftagstart`, `\toftagstop`, `\toftagthis`, -`\tofuntagthis` are used to tag chapters or sections. Then: +The commands `\toftagstart`, `\toftagstop`, `\toftagthis`, `\tofuntagthis` +are used to tag chapters, sections or any other sectioning units destined +to end up in the table(s) of contents. Then: - \nexttocwithtags{required1, requ.2, ...}{excluded1, excl.2, ...} + \nexttocwithtags{req. 1, req. 2, ... }{excl. 1, excl. 2, ... } \tableofcontents % or equivalent command specifies which tags are to be required and which ones are to be excluded from the typeset TOC. -For document with classes where `\tableofcontents` is only single-use, +For documents with classes where `\tableofcontents` is only single-use, the package provides: - \tableoftaggedcontents{required1, requ.2, ...}{excluded1, excl.2, ...} + \tableoftaggedcontents{req. 1, req. 2, ... }{excl. 1, excl. 2, ... } which does not have this restriction. @@ -26,14 +27,21 @@ which does not have this restriction. Installation ============ - latex tableof.dtx or pdflatex tableof.dtx +For extracting the style file: -Run twice to get the bookmarks right. `tableof.sty`, `tableof.ins` and -`tableoftest.tex` are generated on the first latex run. Move `tableof.sty` to -a suitable location within the TeX installation: + latex tableof.dtx + +Files `tableof.sty`, `tableof.ins` and `tableoftest.tex` are generated on +the first latex run. Move `tableof.sty` to a suitable location within the +TeX installation: tableof.sty -> <TDS>/tex/latex/tableof/ +To produce the documentation: + + latex tableof.dtx (a second time) + dvipdfmx tableof.dvi + `tableof.ins` is for TeX distributions expecting it. `tableoftest.tex` is an example of use of the package commands. Run @@ -43,13 +51,15 @@ latex twice on it to see examples of tagged tables of contents. Change History ============== -* v1.3 (2015/02/11) spaces now allowed in tags. +* v1.4 (2015/02/20) under the hood code improvements. + +* v1.3 (2015/02/11) comma separated lists of tags now allow spaces. * v1.2 (2013/03/04) added command `\tableoftaggedcontents`. * v1.1 (2012/12/13) added command `\nexttocwithtags`. -* v1.0 (2012/12/06) +* v1.0 (2012/12/06) first release. License diff --git a/Master/texmf-dist/doc/latex/tableof/tableof.pdf b/Master/texmf-dist/doc/latex/tableof/tableof.pdf Binary files differindex 115930090e6..056c0439f6e 100644 --- a/Master/texmf-dist/doc/latex/tableof/tableof.pdf +++ b/Master/texmf-dist/doc/latex/tableof/tableof.pdf diff --git a/Master/texmf-dist/source/latex/tableof/tableof.dtx b/Master/texmf-dist/source/latex/tableof/tableof.dtx index d03f2fc8765..cf0eda06a61 100644 --- a/Master/texmf-dist/source/latex/tableof/tableof.dtx +++ b/Master/texmf-dist/source/latex/tableof/tableof.dtx @@ -1,13 +1,13 @@ % -*- coding: iso-latin-1; -*- %<*none> -{\def\doctimestamp {Time-stamp <11-02-2015 23:14:33 CET>}% +{\def\doctimestamp {Time-stamp: <20-02-2015 23:02:03 CET>}% \def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}% \xdef\tofdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}% -\def\docdate{2015/02/11} +\def\docdate{2015/02/20} %</none> %% %% Package: tableof -%% Version: 1.3 (2015/02/11) +%% Version: 1.4 (2015/02/20) %% License: LPPL 1.3c %% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr> %% @@ -41,8 +41,8 @@ % %<*ins> \def\pkgname {tableof} -\def\pkgdate {2015/02/11} -\def\pkgversion {v1.3} +\def\pkgdate {2015/02/20} +\def\pkgversion {v1.4} \def\pkgdescription {Tables of tagged contents (jfB)} %</ins> %<*none> @@ -255,6 +255,16 @@ A,B,C %</test> %<*none> \fi +\makeatletter + \@for\@tempa:=hyperref,bookmark,graphicx,color\do + {\PassOptionsToPackage{dvipdfmx}\@tempa} + % + \PassOptionsToPackage{dvipdfm}{geometry} + \PassOptionsToPackage{bookmarks=true}{hyperref} + \PassOptionsToPackage{dvipdfmx-outline-open}{hyperref} + \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark} + % +\makeatother \documentclass[a4paper,fontsize=11pt,abstract]{scrdoc} \pagestyle{headings} \usepackage[latin1]{inputenc} @@ -378,20 +388,21 @@ pdfpagemode=UseOutlines} \begin{abstract} The commands \csa{toftagstart}, \csa{toftagstop}, \csa{toftagthis}, -\csa{tofuntagthis} are used to tag chapters or sections. Then: +\csa{tofuntagthis} are used to tag chapters, sections or any other sectioning +units destined to end up in the table(s) of contents. Then: \begin{quote} - \csa{nexttocwithtags}\{required1, requ.2, ...\}\{excluded1, - excl.2, ...\}\\ + \csa{nexttocwithtags}\{req. 1, req. 2, ...\}\{excl. 1, + excl. 2, ...\}\\ \csa{tableofcontents} |% or equivalent command| \end{quote} specifies which tags are to be required and which ones are to be excluded from the typeset TOC. -For document with classes where \csa{tableofcontents} is only single-use, +For documents with classes where \csa{tableofcontents} is only single-use, the package provides: \begin{quote} - \csa{tableoftaggedcontents}\{required1, requ.2, ...\}\{excluded1, - excl.2, ...\} + \csa{tableoftaggedcontents}\{req. 1, req. 2, ...\}\{excl. 1, + excl. 2, ...\} \end{quote} which does not have this restriction. \end{abstract} @@ -533,20 +544,27 @@ The contents of the |.toc| file (if it already exists) are read into memory by \tableof once, at the time of |\begin{document}|.\footnote{New with |1.3|. Earlier versions read the |.toc| file at the time of \csa{usepackage\{tableof\}}. But this could cause a problem if the |.toc| - file used characters not yet activated by Babel.} -This is only of relevance if the \csa{tableoftaggedcontents}, -\csa{tableof} or \csa{tablenotof} are made use of in the document. + file used characters not yet activated by Babel.} +Notice that this reading of the |.toc| file into memory is only of relevance +if the document makes use of one of the \csa{tableoftaggedcontents}, +\csa{tableof} or \csa{tablenotof} commands. The creation of the |.toc| file is \emph{not} dealt with by \tableof itself: either this will be done by a standard \csa{tableofcontents} command somewhere in the document, or, one may use the package provided command \csa{tofOpenTocFileForWrite} which does not display anything and just does -what its name indicates. This command can be used also in the preamble. +what its name indicates. This command should \textbf{not} be used in the +preamble, however +\begin{verbatim} + \usepackage{tableof} + \AtBeginDocument{\tofOpenTocFileForWrite} +\end{verbatim} +is possible. -Again: this command should \emph{not} be used when the document makes use of its -own \csa{tableofcontents} or equivalent. It is provided only for the case where -the document uses exclusively \csa{tableoftaggedcontents}, \csa{tableof} and -\csa{tablenotof}. +Please consider: this command should \emph{not} be used when the + document makes use of its own \csa{tableofcontents} or equivalent. It is + provided \emph{only} for the case where the document uses \emph{exclusively} + \csa{tableoftaggedcontents}, \csa{tableof} and \csa{tablenotof}. \subsection{Compatibility with other packages} @@ -554,41 +572,39 @@ the document uses exclusively \csa{tableoftaggedcontents}, \csa{tableof} and lines in the |.toc| file (and this must be taken into account). This check is done at the \csa{begin}|{document}| so the order of loading is not important. +\tableof requires that the document |.toc| file uses the |\contentsline| macro +(possibly patched by other packages). It is thus incompatible with the +|beamer| class. However, if |beamer| is used in an article mode, i.e., with +the article class in conjunction with the |beamerarticle| package, then \tableof +should work (not tested\dots). + \tableof adds the tag data to the |.toc| file, but this data self-defines itself to do nothing when not activated by \tableof's own commands. Since release |1.3|, these redefinitions are done in \emph{one single} line of the |.toc| file to circumvent \emph{crazy} interference of |biblatex| which adds commands to the |.toc| line on every other line (thus, potentially right in -the middle of multi-line commands \verb+:-(+. - -% Hence the generated |.toc| file may be imported for use -% by other \TeX{} documents.\footnote{this import must do \csa{makeatletter} and -% also the new document must use |hyperref| if the original did so.} +the middle of multi-line commands \verb+:-(+.) No testing has actually been done of compatibility with packages manipulating tables of contents, apart from -\etoc.\footnote{\url{http://www.ctan.org/pkg/etoc}} It went fine.\footnote{but - that was a long time ago\dots} - -\subsection{(old) TODO (never to be done ?)} - -Create a parser for arbitrary iterated boolean combinations of tags . . . but -this kind of thing must have been done a zillion times already, as it belongs to -the basics in computer science! ... and it surely is no easy task in \TeX{}! -so I cautiously retreated from re-doing something difficult which has already -been done somewhere by someone ... +\etoc.\footnote{\url{http://www.ctan.org/pkg/etoc}} It went fine. \subsection{Version History} \begingroup \parindent0pt \makeatletter -\settowidth{\dimen@}{\ttfamily 2015/02/11 v1.3: i.\space} +\settowidth{\dimen@}{\ttfamily 2015/02/20 v1.4: i.\space} \everypar\expandafter{\expandafter\hangindent\the\dimen@ \hangafter1 } \makeatother -|2015/02/11 v1.3: i. |comma separated tags now allow spaces (they are removed). +|2015/02/20 v1.4: i. |some code efficiency improvements (some +|\edef|'s replaced by a bunch of |\expandafter|'s.) + +| ii. |improved documentation. + +|2015/02/11 v1.3: i. |comma separated lists of tags now allow spaces. | ii. |only one line used for the |.toc| code silently unactivating |tableof| if its |\usepackage{tableof}| has been removed from the @@ -616,16 +632,14 @@ document uses standard |\tableofcontents| or like commands. \section{Generating the package file and the test file} -Running |latex| (or |pdflatex|) on |tableof.dtx| generates: +Running |latex| on |tableof.dtx| generates: {1})~the package file |tableof.sty| (which should be moved to a suitable location within the \TeX{} installation), -{2})~|tableof.ins| for \TeX{} -distributions expecting such a file, -{3})~|tableoftest.tex| which -demonstrates the package features (one should run |latex| twice on it), -and -{4})~the documentation itself (run |pdflatex| twice to get the -bookmarks.) +{2})~|tableof.ins| for \TeX{} distributions expecting such a file, +{3})~|tableoftest.tex| which demonstrates the package features (one should run +|latex| twice on it), and +{4})~the documentation itself. After running |latex| twice, use |dvipdfmx| to +produce the pdf documentation. \section{Implementation} @@ -671,8 +685,6 @@ release. \NeedsTeXFormat{LaTeX2e} \DeclareOption*{\PackageWarning{tableof}{Option `\CurrentOption' is unknown.}} \ProcessOptions\relax -% \end{macrocode} -% \begin{macrocode} \newtoks\tof@toctoks % \end{macrocode} % |1.3| codes this |\tof@readtoc| slightly better (copied from etoc.dtx). @@ -745,6 +757,7 @@ release. \def\tof@secondiffalse#1% {\csname tofsw@#1\endcsname\else\let\tof@next\@secondoftwo\fi} % \end{macrocode} +% placeholder for comments % \begin{macrocode} \def\tof@setflags #1{\let\tof@next\@firstoftwo \@for\@tempa:=#1\do {\tof@true {\@tempa}}% @@ -752,18 +765,33 @@ release. \@for\@tempa:=\tof@tags@tmp\do {\tof@false{\@tempa}}% \@for\@tempa:=\tof@untags@tmp\do{\tof@true {\@tempa}}} % \end{macrocode} +% Release |1.4| uses here a bunch of |\expandafter|'s in place of some +% |\edef|'s. % \begin{macrocode} \def\tof@filter#1#2{\ifx#1#2\else - \ifx\tof@tmptags\@empty\edef\tof@tmptags{#2}\else - \edef\tof@tmptags{\tof@tmptags,#2}\fi\fi} + \ifx\tof@tmptags\@empty + \expandafter\def\expandafter\tof@tmptags\expandafter{#2}% + \else + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\tof@tmptags + \expandafter\expandafter\expandafter{\expandafter + \tof@tmptags\expandafter,#2}% + \fi\fi} \def\tof@@starttags#1{% - \ifx\tof@tags\@empty\edef\tof@tags{#1}\else - \edef\tof@tags{\tof@tags,#1}\fi} + \ifx\tof@tags\@empty + \def\tof@tags{#1}% + \else + \expandafter\def\expandafter\tof@tags\expandafter{\tof@tags,#1}% + \fi } \def\tof@@stoptags#1{% - \@for\@tempa:=#1\do{\def\tof@tmptags{}% - \@for\@tempb:=\tof@tags\do{\tof@filter\@tempa\@tempb}% - \edef\tof@tags{\tof@tmptags}}} + \@for\@tempa:=#1\do{% + \def\tof@tmptags{}% + \@for\@tempb:=\tof@tags\do{\tof@filter\@tempa\@tempb}% + \expandafter\def\expandafter\tof@tags\expandafter{\tof@tmptags}% + }% + } % \end{macrocode} +% placeholder for comments % \begin{macrocode} \def\tof@init#1{% \def\tof@begin{% @@ -786,6 +814,7 @@ release. \def\tof@cleanspaces #1#2{\edef\tof@tmp {{\tof@zapspaces #2 \@gobble}}% \expandafter #1\tof@tmp } % \end{macrocode} +% placeholder for comments % \begin{macrocode} \def\tof@and #1{% \tof@init{\tof@setflags{#1}\def\tof@tags@tmp{}\def\tof@untags@tmp{}% @@ -812,6 +841,7 @@ release. \newcommand*\tablenotof{\@ifstar{\tof@cleanspaces\tof@nand} {\tof@cleanspaces\tof@nor}} % \end{macrocode} +% placeholder for comments % \begin{macrocode} \def\tof@nextof@or #1{\toks@{\tof@setflags{#1}% \@for\@tempa:=#1\do{\tof@secondiffalse{\@tempa}}% @@ -846,6 +876,7 @@ release. \@ifstar{\tof@cleanspaces\tof@nextof@or} {\tof@cleanspaces\tof@nextof@and}} % \end{macrocode} +% placeholder for comments % \begin{macrocode} \newcommand*\toftagthis[1] {\addtocontents{toc}{\string\tof@tagthis {\tof@zapspaces #1 \@gobble }}} @@ -874,7 +905,7 @@ release. Grave accent \` Left brace \{ Vertical bar \| Right brace \} Tilde \~} -\CheckSum{485} +\CheckSum{505} \Finale %% diff --git a/Master/texmf-dist/source/latex/tableof/tableof.ins b/Master/texmf-dist/source/latex/tableof/tableof.ins index 7337c871904..af6d6597489 100644 --- a/Master/texmf-dist/source/latex/tableof/tableof.ins +++ b/Master/texmf-dist/source/latex/tableof/tableof.ins @@ -1,12 +1,12 @@ %% %% Package: tableof -%% Version: 1.3 (2015/02/11) +%% Version: 1.4 (2015/02/20) %% License: LPPL 1.3c %% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr> %% \def\pkgname {tableof} -\def\pkgdate {2015/02/11} -\def\pkgversion {v1.3} +\def\pkgdate {2015/02/20} +\def\pkgversion {v1.4} \def\pkgdescription {Tables of tagged contents (jfB)} %% This file `tableof.ins' is provided for compatibility with TeX %% distributions expecting to find it for installation of `tableof.sty'. diff --git a/Master/texmf-dist/tex/latex/tableof/tableof.sty b/Master/texmf-dist/tex/latex/tableof/tableof.sty index 73d4b1a944f..855ada6d8d3 100644 --- a/Master/texmf-dist/tex/latex/tableof/tableof.sty +++ b/Master/texmf-dist/tex/latex/tableof/tableof.sty @@ -22,10 +22,10 @@ %% in the same archive or directory.) %% \ProvidesPackage{tableof} - [2015/02/11 v1.3 Tables of tagged contents (jfB)] + [2015/02/20 v1.4 Tables of tagged contents (jfB)] %% %% Package: tableof -%% Version: 1.3 (2015/02/11) +%% Version: 1.4 (2015/02/20) %% License: LPPL 1.3c %% Copyright (C) 2012-2015 Jean-Francois Burnol <jfbu at free dot fr> %% @@ -83,15 +83,27 @@ \@for\@tempa:=\tof@tags@tmp\do {\tof@false{\@tempa}}% \@for\@tempa:=\tof@untags@tmp\do{\tof@true {\@tempa}}} \def\tof@filter#1#2{\ifx#1#2\else - \ifx\tof@tmptags\@empty\edef\tof@tmptags{#2}\else - \edef\tof@tmptags{\tof@tmptags,#2}\fi\fi} + \ifx\tof@tmptags\@empty + \expandafter\def\expandafter\tof@tmptags\expandafter{#2}% + \else + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\tof@tmptags + \expandafter\expandafter\expandafter{\expandafter + \tof@tmptags\expandafter,#2}% + \fi\fi} \def\tof@@starttags#1{% - \ifx\tof@tags\@empty\edef\tof@tags{#1}\else - \edef\tof@tags{\tof@tags,#1}\fi} + \ifx\tof@tags\@empty + \def\tof@tags{#1}% + \else + \expandafter\def\expandafter\tof@tags\expandafter{\tof@tags,#1}% + \fi } \def\tof@@stoptags#1{% - \@for\@tempa:=#1\do{\def\tof@tmptags{}% - \@for\@tempb:=\tof@tags\do{\tof@filter\@tempa\@tempb}% - \edef\tof@tags{\tof@tmptags}}} + \@for\@tempa:=#1\do{% + \def\tof@tmptags{}% + \@for\@tempb:=\tof@tags\do{\tof@filter\@tempa\@tempb}% + \expandafter\def\expandafter\tof@tags\expandafter{\tof@tmptags}% + }% + } \def\tof@init#1{% \def\tof@begin{% \begingroup |