texlive[59837] Master: tableof (5jul21)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 5 22:50:37 CEST 2021


Revision: 59837
          http://tug.org/svn/texlive?view=revision&revision=59837
Author:   karl
Date:     2021-07-05 22:50:36 +0200 (Mon, 05 Jul 2021)
Log Message:
-----------
tableof (5jul21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tableof/README.md
    trunk/Master/texmf-dist/doc/latex/tableof/tableof.pdf
    trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx
    trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/tableof/tableof.ins

Modified: trunk/Master/texmf-dist/doc/latex/tableof/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tableof/README.md	2021-07-04 23:48:47 UTC (rev 59836)
+++ trunk/Master/texmf-dist/doc/latex/tableof/README.md	2021-07-05 20:50:36 UTC (rev 59837)
@@ -1,56 +1,40 @@
-Abstract
-========
+tableof
+=======
 
 - Package: tableof (Tables of tagged contents)
-- Version: 1.4b (2018/10/02)
+- Version: 1.4c (2021/07/05)
 - License: LPPL 1.3c
-- Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
+- Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
 
-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:
+Provides `\toftagstart{}`, `\toftagstop{}`, `\toftagthis{}`, `\tofuntagthis{}`
+to tag chapters, sections or any other sectioning units destined to end up in
+the table(s) of contents. Then each one of
 
-    \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.
+    \tableof{required tags}
+    or \tablenotof{excluded tags}
+    or \tableoftaggedcontents{required tags}{excluded tags}
 
-For documents with classes where `\tableofcontents` is only single-use,
-the package provides:
+typesets a table of contents (with no heading) obeying the conditions.  These
+macros can each be used multiple times in the document with varying arguments.
 
-    \tableoftaggedcontents{req. 1, req. 2, ... }{excl. 1, excl. 2, ... }
+If the document contains no usage of `\tableofcontents`, the preamble should
+also contain an additional `\AtBeginDocument{\tofOpenTocFileForWrite}`.
 
-which does not have this restriction.
+The main `\tableofcontents` can also be influenced by tags like this:
 
+    \nexttocwithtags{required tags}{excluded tags}
+    \tableofcontents
 
-Installation
-============
+Depending on the document class and packages `\tableofcontents` however may be
+usable only once, contrarily to the `\tableof{}` et al. package macros.
 
-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.4c (2021/07/05) additional efforts for `biblatex` compatibility.
+  Allow style file extraction via `etex`, reword the abstract. Use utf8
+  source encoding.
+
 * v1.4b (2018/10/02) fix to bug when a document ended with `\clearpage`
   before the `\end{document}`. `tableof` now requires `atveryend` package.
 
@@ -67,12 +51,31 @@
 * v1.0  (2012/12/06) first release.
 
 
+Installation
+============
+
+Extractions:
+
+      etex tableof.dtx
+
+Move `tableof.sty` to a suitable location within the TeX installation:
+
+      tableof.sty -> <TDS>/tex/latex/tableof/
+
+The `tableoftest.tex` file is provided as an example of use of the package.
+
+To generate the documentation, execute:
+
+    latexmk tableof.dtx
+    dvipdfmx tableof.dvi
+ 
+
 License
 =======
 
     This Work may be distributed and/or modified under the
-    conditions of the LaTeX Project Public License,
-    version 1.3c.  This version of this license is in
+    conditions of the version 1.3c of the LaTeX Project Public License.
+    This version of this license is in
 	
 <http://www.latex-project.org/lppl/lppl-1-3c.txt>
 

Modified: trunk/Master/texmf-dist/doc/latex/tableof/tableof.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex	2021-07-05 20:50:36 UTC (rev 59837)
@@ -0,0 +1,190 @@
+%%
+%% This is file `tableoftest.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% tableof.dtx  (with options: `test')
+%% 
+%% IMPORTANT NOTICE:
+%% 
+%% For the copyright see the source file.
+%% 
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from tableoftest.tex.
+%% 
+%% For distribution of the original source see the terms
+%% for copying and modification in the file tableof.dtx.
+%% 
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%%
+%% Package: tableof
+%% Version: 1.4c (2021/07/05)
+%% License: LPPL 1.3c
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+%%
+%% This file `tableoftest.tex' serves to demontrate the use of the
+%% commands from the package `tableof'.
+%%
+%% (run on it `latex' or `pdflatex' twice.)
+%%
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage[colorlinks,linkcolor=blue]{hyperref}
+\usepackage{tableof}
+%%\usepackage{etoc} % for testing
+\DeclareRobustCommand\lowast{\raisebox{-.25\height}{*}}
+\begin{document}
+%% \etoctoclines % (if using package etoc)
+%%
+%% we don't need here \tofOpenTocFileForWrite
+%% as the document has \tableofcontents a few lines down.
+%%
+\section*{\string\tableof\{\}}
+\tableof{}
+\section*{\string\tableof\lowast\{A,B,C,D,E,F\}}
+\tableof*{  A, B,C , D , E, F  }
+\section*{\string\tableof\{A\}}
+\tableof{A}
+\section*{\string\tableof\lowast\{A\}}
+\tableof*{A}
+\section*{\string\tableof\{A,C\}}
+\tableof{  A ,C }
+\section*{\string\tableof\lowast\{A,C\}}
+\tableof*{A, C }
+\section*{\string\tableoftaggedcontents\lowast\{A,D\}\{B,F\}}
+\tableoftaggedcontents*{ A,D}{B, F}
+\renewcommand\contentsname{\string\nexttocwithtags\lowast\{A,D\}\lowast\{B,F\}\string\tableofcontents}
+\nexttocwithtags*{ A , D}*{B ,F}
+\tableofcontents
+%% requires package etoc
+%% \etoctocstyle{1}{with A and D and without B and without F}
+%% \nexttocwithtags{A,D}{B,F}\tableofcontents
+%% \etoctocstyle{1}{with (A or D) and without B and without F}
+%% \nexttocwithtags*{A,D}{B,F}\tableofcontents
+%% \etoctocstyle{1}{with A and D and (without B or without F)}
+%% \nexttocwithtags{A,D}*{B,F}\tableofcontents
+\section*{with B or with C (using \string\tableoftaggedcontents)}
+\tableoftaggedcontents*{B, C}{}
+\section*{with B or with C (using \string\tableof\lowast)}
+\tableof*{B, C}
+\section*{with A and with B and with C}
+\tableof{A,  B,  C}
+\section*{with A or with B or with C}
+\tableof*{   A,B ,C  }
+\section*{without B (and) (using \string\tableoftaggedcontents)}
+\tableoftaggedcontents{}{B}
+\section*{without A and without B (using \string\tableoftaggedcontents)}
+\tableoftaggedcontents{}{A  ,  B}
+\section*{without A or without C}
+\tablenotof*{  A,  C}
+\section*{without A and without B and without C}
+\tablenotof{ A  ,  B , C}
+\section*{without A or without B or without C}
+\tablenotof*{A,  B,C   }
+\section*{with D and with E}
+\tableof{D,E}
+\section*{with E}
+\tableof{E}
+\section*{without D}
+\tablenotof{D}
+\section*{ecology and rabbits}
+\tableof{     ecology        ,        rabbits      }
+\section*{rabbits and not ecology}
+\tableoftaggedcontents{  rabbits   }{     ecology  }
+\section*{kitchenware and not rabbits}
+\tableoftaggedcontents{   kitchenware }{ rabbits}
+\clearpage
+\section{no tag}
+nothing
+\begin{verbatim}
+\toftagstart{D,E,F}
+\toftagthis{A}
+\end{verbatim}
+\toftagstart{   D,  E,  F }
+\toftagthis{A}
+\section{A,D,E,F}
+A,D,E,F
+\begin{verbatim}
+\toftagthis{B}
+\end{verbatim}
+\toftagthis{B}
+\section{B,D,E,F}
+B,D,E,F
+\begin{verbatim}
+\toftagthis{C}
+\end{verbatim}
+\toftagthis{  C  }
+\section{C,D,E,F}
+C,D,E,F
+\begin{verbatim}
+\toftagstop{F}
+\toftagthis{A,B}
+\end{verbatim}
+\toftagstop{F}
+\toftagthis{      A,B}
+\section{A,B,D,E}
+A,B,D,E
+\begin{verbatim}
+\toftagthis{B,C}
+\end{verbatim}
+\toftagthis{B,       C}
+\section{B,C,D,E}
+B,C,D
+\begin{verbatim}
+\toftagthis{A,C}
+\toftagstop{E}
+\end{verbatim}
+\toftagthis{   A,   C}
+\toftagstop{     E}
+\section{A,C,D}
+A,C,D
+\begin{verbatim}
+\toftagstop{D}
+\toftagthis{A,B,C}
+\end{verbatim}
+\toftagstop{D     }
+\toftagthis{A,B,C     }
+\section{A,B,C}
+A,B,C
+\begin{verbatim}
+\toftagstop{A,B,C,D,E,F}
+\toftagstart{kitchenware,rabbits}
+\end{verbatim}
+\toftagstop{A,B,       C,D,E,F}
+\toftagstart{       kitchenware,rabbits}
+\section{Knives and rabbits}
+\begin{verbatim}
+\tofuntagthis{kitchenware}
+\end{verbatim}
+\tofuntagthis{kitchenware}
+\subsection{Hunting rabbits}
+\begin{verbatim}
+\tofuntagthis{rabbits}
+\end{verbatim}
+\tofuntagthis{rabbits}
+\subsection{Best knives for cooking}
+\subsection{Eating rabbits}
+\begin{verbatim}
+\toftagstart{ecology}\tofuntagthis{rabbits}
+\end{verbatim}
+\toftagstart{ecology}\tofuntagthis{        rabbits}
+\section{Knives and global climate}
+\begin{verbatim}
+\toftagstop{kitchenware}
+\end{verbatim}
+\toftagstop{kitchenware      }
+\section{The rabbit in the wild}
+\subsection{Impact of the rabbit on global climate}
+\begin{verbatim}
+\toftagstop{rabbits}
+\end{verbatim}
+\toftagstop{      rabbits}
+\section{Other species of interest for cooking}
+\end{document}\endinput
+\endinput
+%%
+%% End of file `tableoftest.tex'.


Property changes on: trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx	2021-07-04 23:48:47 UTC (rev 59836)
+++ trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx	2021-07-05 20:50:36 UTC (rev 59837)
@@ -1,53 +1,30 @@
-% -*- coding: iso-latin-1; -*-
+% -*- coding: utf-8; -*-
 %<*none>
-{\def\doctimestamp {Time-stamp: <02-10-2018 11:43:43 CEST>}% 
+{\def\doctimestamp {Time-stamp: <05-07-2021 14:42:11 CEST>}%
  \def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}%
  \xdef\tofdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}%
-\def\docdate{2018/10/02}
 %</none>
 %%
 %% Package: tableof
-%% Version: 1.4b (2018/10/02)
+%% Version: 1.4c (2021/07/05)
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
 %%
+% See README.md for installation instructions
+%
 %     This Work may be distributed and/or modified under the
-%     conditions of the LaTeX Project Public License, either
-%     version 1.3c of this license. This version of this license is in 
+%     conditions of the version 1.3c of the LaTeX Project Public License.
+%     This version of this license is in 
 %          http://www.latex-project.org/lppl/lppl-1-3c.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> 
-% 
-%  Installation:
-%  ============
-%
-%       latex tableof.dtx
-%
-% `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/
-%
-% `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.
-%
-% To generate the documentation, run once more latex on tableof.dtx,
-% then run dvipdfmx on tableof.dvi
-%
-%<*ins>
+%<*none>
 \def\pkgname        {tableof}
-\def\pkgdate        {2018/10/02}
-\def\pkgversion     {v1.4b}
+\def\pkgdate        {2021/07/05}
+\def\pkgversion     {v1.4c}
 \def\pkgdescription {Tables of tagged contents (JFB)}
-%</ins>
-%<*none>
-\ProvidesFile{\pkgname.dtx}%
-  [\pkgname source and documentation (\tofdtxtimestamp)]
 \begingroup
 \input docstrip.tex
 \askforoverwritefalse
@@ -54,41 +31,35 @@
 \def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
 \string\ProvidesPackage{\pkgname}^^J%
 \space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\nopreamble
-\file{\pkgname.ins}{\from{\pkgname.dtx}{ins}}
-\usepreamble\defaultpreamble
+\generate{\usepreamble\defaultpreamble
 \file{\pkgname test.tex}{\from{\pkgname.dtx}{test}}
 \usepreamble\pkgpreamble
 \file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
 \endgroup
+\ifdefined\documentclass\else
+\newlinechar13 \catcode13 12 \immediate\write128{%
+********************************************************************
+*
+* To finish the installation you have to move the following
+* file into a repertory searched by TeX:
+*
+* \space\space\space\space    tableof.sty
+*
+* To produce the tableof.pdf documentation, run "latexmk"
+* on tableof.dtx then "dvipdfmx" on tableof.dvi
+* (or latex thrice then dvipdfmx)
+*
+* Notice that this will again extract tableof.sty in the current
+* repertory.
+*
+* Happy TeXing!
+*
+********************************************************************}%
+\endinput\expandafter\end\fi%
+\ProvidesFile{\pkgname.dtx}%
+  [\pkgname source and documentation (\tofdtxtimestamp)]
 \iffalse
 %</none>
-%<*ins>
-%-------------------------------------------------------------------------------
-%% This file `tableof.ins' is provided for compatibility with TeX
-%% distributions expecting to find it for installation of `tableof.sty'.
-%%
-%% As usual `tex tableof.ins' produces `tableof.sty' from the source
-%% `tableof.dtx'
-%%
-%% (an already existing `tableof.sty' in the same repertory will be
-%% overwritten)
-%% 
-%% Move `tableof.sty' to a suitable location within the TeX installation:
-%% tableof.sty -> <TDS>/tex/latex/tableof/
-%%
-%% The generated auxiliary files may be discarded. 
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
-\endbatchfile
-%-------------------------------------------------------------------------------
-%</ins>
 %<*test>
 %-------------------------------------------------------------------------------
 %% This file `tableoftest.tex' serves to demontrate the use of the
@@ -111,7 +82,7 @@
 \section*{\string\tableof\{\}}
 \tableof{}
 \section*{\string\tableof\lowast\{A,B,C,D,E,F\}}
-% v\xE9rifions que c'est bon avec les espaces: (1.3 de 2015/02/11)
+% vérifions que c'est bon avec les espaces: (1.3 de 2015/02/11)
 \tableof*{  A, B,C , D , E, F  }
 \section*{\string\tableof\{A\}}
 \tableof{A}
@@ -262,12 +233,12 @@
    \PassOptionsToPackage{dvipdfm}{geometry}
    \PassOptionsToPackage{bookmarks=true}{hyperref}
    \PassOptionsToPackage{dvipdfmx-outline-open}{hyperref}
-   \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
+% obsolete
+%   \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
    %
 \makeatother
 \documentclass[a4paper,fontsize=11pt,abstract]{scrdoc}
 \pagestyle{headings}
-\usepackage[latin1]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[hscale=0.66,vscale=0.76]{geometry}
 
@@ -329,13 +300,14 @@
 
 \usepackage[english]{babel}
 
-\usepackage[pdfencoding=pdfdoc]{hyperref}
+% pdfencoding = unicode maintenant défaut
+\usepackage{hyperref}
 
 \hypersetup{%
 linktoc=all,%
 breaklinks=true,%
 hidelinks,%
-pdfauthor={Jean-Fran\c cois Burnol},%
+pdfauthor={Jean-François Burnol},%
 pdftitle={The tableof package},%
 pdfsubject={LaTeX, table of contents},%
 pdfkeywords={LaTeX, table of contents},%
@@ -368,7 +340,7 @@
     \texorpdfstring{{\color{niceone}\ttfamily\bfseries etoc}}
                    {etoc}\xspace}
 
-\frenchspacing
+%\frenchspacing
 
 \renewcommand\familydefault\sfdefault
 
@@ -379,33 +351,40 @@
 
 \begin{center}
   {\normalfont\Large The \tableof  package}\\
-  \textsc{Jean-Fran\xE7ois Burnol}\par
+  \bigskip
   \footnotesize \ttfamily 
-  jfbu (at) free (dot) fr\\
   Package version: \pkgversion\ (\pkgdate)\\
-  Documentation generated from the source file\\
-  with timestamp ``\tofdtxtimestamp''
+  Documentation generated from tableof.dtx
+  with timestamp \tofdtxtimestamp\\
+  \textcopyright 2012, 2013, 2015, 2018, 2021 Jean-François Burnol
+  <jfbu (at) free (dot) fr>
 \end{center}
 
 \begin{abstract}
-The commands \csa{toftagstart}, \csa{toftagstop}, \csa{toftagthis},
-\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}\{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.
+  Provides |\toftagstart{}|, |\toftagstop{}|, |\toftagthis{}|,
+  |\tofuntagthis{}| to tag chapters, sections or any other sectioning units
+  destined to end up in the table(s) of contents. Then each one of
+\begin{verbatim}
+  \tableof{required tags}
+  or \tablenotof{excluded tags}
+  or \tableoftaggedcontents{required tags}{excluded tags}
+\end{verbatim}
+  typesets a table of contents (with no heading) obeying the conditions. These
+  macros can each be used multiple times in the document with varying
+  arguments.
 
-For documents with classes where \csa{tableofcontents} is only single-use,
-the package provides:
-\begin{quote}
-  \csa{tableoftaggedcontents}\{req. 1, req. 2, ...\}\{excl. 1,
-    excl. 2, ...\}
-\end{quote}
-which does not have this restriction.
+  If the document contains no usage of |\tableofcontents|, the preamble should
+  also contain an additional |\AtBeginDocument{\tofOpenTocFileForWrite}|.
+
+  The main |\tableofcontents| can also be influenced by tags like this:
+\begin{verbatim}
+  \nexttocwithtags{required tags}{excluded tags}
+  \tableofcontents
+\end{verbatim}
+
+  Depending on the document class and packages, |\tableofcontents| however may
+  be usable only once, contrarily to the |\tableof{}| et al.\@ package macros.
+
 \end{abstract}
 
 \tableofcontents
@@ -463,7 +442,7 @@
 \subsection{Spaces}
 
 Spaces in tags and around commas in tag lists are transparently removed.
-(\emph{new with release} |1.3|). Tags may be macros, they are completely
+Tags may be macros, they are completely
 expanded before use.
 
 \section{Table of contents commands}
@@ -606,10 +585,17 @@
                                   \hangafter1 }
 \makeatother
 
+|2021/07/05 v1.4c:    |ensure the added scope-limiting group for |\tableof{}|
+and alike macros encompasses all contents of the |.toc| file even in presence
+of packages hacking into these contents (in particular |biblatex|).
+%! https://tex.stackexchange.com/questions/603540/tableof-package-erases-citations/
+
 |2018/10/02 v1.4b:    |fix for situations when a |\clearpage| before
 the |\end{document}| resulted in the loss of the |\tof at finish| token from |.toc|
-file, causing the package to misbehave (cf.
-\url{https://tex.stackexchange.com/q/358014/4686}). The package
+file, causing the package to misbehave.
+%! (cf.
+%! \url{https://tex.stackexchange.com/q/358014/4686}).
+The package
 |atveryend| is now required.\footnote{\url{http://www.ctan.org/pkg/atveryend}}
 
 |2015/03/10 v1.4a: i. |changes in the code to make it more easily patchable by
@@ -620,8 +606,7 @@
 
 |                 ii. |improved sectioning of the documentation.
 
-|2015/02/20 v1.4:  i. |some code efficiency improvements (some
-|\edef|'s replaced by a bunch of |\expandafter|'s.)
+|2015/02/20 v1.4:  i. |some code efficiency improvements (perhaps...).
 
 |                 ii. |improved documentation.
 
@@ -649,20 +634,8 @@
 
 \endgroup
 
-\bigskip % pourquoi le faut-il?
+\bigskip
 
-\section{Generating the package file and the test file}
-
-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. After running |latex| twice, use |dvipdfmx| to
-produce the pdf documentation.
-
-
 \section{Implementation}
 
 \makeatletter
@@ -669,21 +642,29 @@
 \StopEventually{\check at checksum\end{document}}
 \makeatother
 
-% Suite \xE0 m\xE9saventure le 9 mars 2015 dans etoc.dtx:
+% % Suite à mésaventure le 9 mars 2015 dans etoc.dtx:
+%
+% % ATTENTION QU'AVANT DE COMMENCER DES MACROCODE IL FAUT OBLIGATOIREMENT UN
+% % PARAGRAPHE APRÈS \section (SINON ESPACEMENTS VERTICAUX POST MACROCODE
+% % SUPPRIMÉS :((((( )
+%
+% % ceci faisait donc l'affaire :
+%
+% % Writing-up source code comments is hopefully for a future
+% % release. 
+%
+% % maintenant je fais:
+% %
+% \indent
+%
+% Finalement, j'ai fait un bug report en 2021 et trouvé un
+% workaround
+% https://github.com/latex3/latex2e/issues/563
+\makeatletter
+\AddToHook{env/macrocode/begin}{\partopsep0pt\relax}
+\AddToHook{env/macrocode/after}{\@nobreakfalse}
+\makeatother
 
-% ATTENTION QU'AVANT DE COMMENCER DES MACROCODE IL FAUT OBLIGATOIREMENT UN
-% PARAGRAPHE APR\xC8S \section (SINON ESPACEMENTS VERTICAUX POST MACROCODE
-% SUPPRIM\xC9S :((((( )
-
-% ceci faisait donc l'affaire :
-
-% Writing-up source code comments is hopefully for a future
-% release. 
-
-% maintenant je fais:
-
-\indent
-
 \makeatletter
 \begingroup
 \topsep\MacrocodeTopsep
@@ -724,7 +705,7 @@
 % |1.3| codes this |\tof at readtoc| slightly better (copied from \etoc.dtx).
 %    \begin{macrocode}
 \def\tof at readtoc {%
-  \ifeof \tof at tf
+  \ifeof\tof at tf
   \else
      \read\tof at tf to \tof at buffer
      \tof at toctoks\expandafter\expandafter\expandafter
@@ -738,6 +719,24 @@
 % though that this is irrelevant if the document uses |tableof| only via its
 % tagging abilities, and has standard |\tableofcontents| command to print the
 % TOC.
+%
+% |1.4c| injects |\tof at begingroup| and |\tof at endgroup| to wrap the gathered
+% the contents of the toc file, rather than having them arise from expansion
+% of |\tof at begin| and respectively |\tof at finish|. This avoids a problem with
+% |biblatex| additions to the |.toc| file happening before |\tof at begin|. They
+% need to have their scope limited. The |\tableof{}| macro and variants will
+% thus achieve this automatically via the |\tof at begingroup/\tof at endgroup| pair
+% now explicitly added to |\tof at toctoks| contents.
+%
+% \etoc (a.t.t.o.w |1.09c 2020/05/15|) has some handling of
+% |\tof at begingroup/\tof at endgroup| which as far as I understand can
+% currently remain as it is. But there is something weird in \etoc with
+% a test of |\tof at finish| which probably is in need of revision (even
+% independently of changes here).
+%
+% These changes however mean for usage of |\nexttocwithtags| that whatever
+% macro is used to typeset the TOC, it is now the one bearing the
+% responsability for creating the scope-limiting group.
 %    \begin{macrocode}
 \AtBeginDocument{\IfFileExists{\jobname.toc}
     {{\endlinechar\m at ne
@@ -744,8 +743,9 @@
         \makeatletter
         \newread\tof at tf
         \openin\tof at tf\@filef at und
+        \tof at toctoks{\tof at begingroup}%
         \tof at readtoc
-        \global\tof at toctoks=\expandafter{\the\tof at toctoks}%
+        \global\tof at toctoks=\expandafter{\the\tof at toctoks\tof at endgroup}%
         \closein\tof at tf}}{}}
 %    \end{macrocode}
 % The trick is that |\@ifundefined| chooses the undefined branch if the
@@ -767,6 +767,9 @@
 % or |\relax| are all made global, because for compatibility with the fancy
 % things \etoc |1.08| will allow for TOC as table we need a global mode, and
 % the simplest is here to do the things global by default.
+%
+% |1.4c| replaces |{}| (last argument of |\@ifundefined|) by |\relax|. No
+% strong reason. We and \etoc use |\endlinechar-1| anyhow.
 %    \begin{macrocode}
 \AtBeginDocument{
     \addtocontents{toc}{\string\@ifundefined{tof at begin}%
@@ -775,8 +778,15 @@
         \global\let\string\tof at starttags\string\@gobble
         \global\let\string\tof at stoptags\string\@gobble
         \global\let\string\tof at tagthis\string\@gobble
-        \global\let\string\tof at untagthis\string\@gobble}{}}
+        \global\let\string\tof at untagthis\string\@gobble}\relax}
     \addtocontents{toc}{\string\tof at begin}
+%    \end{macrocode}
+% \LaTeX\ of 2020 or 2021 always has |\contentsline| with four arguments.
+% So an update should be done here to always gobble four, else in absence
+% of |hyperref| some |{}| are left. Does not seem to matter a lot except
+% if all is executed in math mode... thanks to \etoc for example.
+% No urgency here, only mentioning for the record.
+%    \begin{macrocode}
     \@ifpackageloaded{hyperref}
        {\def\tof at gobblethree@orfour#1#2#3#4{}%
         \ifx\hyper at last\@undefined\tof at toctoks{}\fi}
@@ -815,14 +825,19 @@
 \let\tof at global     \@empty
 \let\tof at begingroup \begingroup
 \let\tof at endgroup   \endgroup
+%    \end{macrocode}
+% No more |\tof at endgroup| here at |1.4c|. See above explanations.
+%    \begin{macrocode}
 \def\tof@@finish   {\tof at global\let\contentsline\tof at savedcontentsline
-                    \tof at endgroup\global\let\tof at begin\relax
-                                 \global\let\tof at tags\@empty }
+                    \global\let\tof at begin\relax
+                    \global\let\tof at tags\@empty }
 \def\tof@@tagthis   #1{\def\tof at tags@tmp{#1}}
 \def\tof@@untagthis #1{\def\tof at untags@tmp{#1}}
+%    \end{macrocode}
+% No more |\tof at begingroup| here at |1.4c|. See above explanations.
+%    \begin{macrocode}
 \def\tof at init#1{%
     \def\tof at begin{%
-        \tof at begingroup
         \tof at global\let\tof at tagthis  \tof@@tagthis
         \tof at global\let\tof at untagthis\tof@@untagthis
         \tof at global\let\tof at starttags\tof@@starttags
@@ -1000,7 +1015,7 @@
   Grave accent  \`     Left brace    \{     Vertical bar  \|
   Right brace   \}     Tilde         \~}
 
-\CheckSum{557}
+\CheckSum{559}
 
 \Finale
 %%

Deleted: trunk/Master/texmf-dist/source/latex/tableof/tableof.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/tableof/tableof.ins	2021-07-04 23:48:47 UTC (rev 59836)
+++ trunk/Master/texmf-dist/source/latex/tableof/tableof.ins	2021-07-05 20:50:36 UTC (rev 59837)
@@ -1,35 +0,0 @@
-%%
-%% Package: tableof
-%% Version: 1.4b (2018/10/02)
-%% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
-%%
-\def\pkgname        {tableof}
-\def\pkgdate        {2018/10/02}
-\def\pkgversion     {v1.4b}
-\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'.
-%%
-%% As usual `tex tableof.ins' produces `tableof.sty' from the source
-%% `tableof.dtx'
-%%
-%% (an already existing `tableof.sty' in the same repertory will be
-%% overwritten)
-%%
-%% Move `tableof.sty' to a suitable location within the TeX installation:
-%% tableof.sty -> <TDS>/tex/latex/tableof/
-%%
-%% The generated auxiliary files may be discarded.
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
-\endbatchfile
-\endinput
-%%
-%% End of file `tableof.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty	2021-07-04 23:48:47 UTC (rev 59836)
+++ trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty	2021-07-05 20:50:36 UTC (rev 59837)
@@ -22,12 +22,12 @@
 %% in the same archive or directory.)
 %%
 \ProvidesPackage{tableof}
- [2018/10/02 v1.4b Tables of tagged contents (JFB)]
+ [2021/07/05 v1.4c Tables of tagged contents (JFB)]
 %%
 %% Package: tableof
-%% Version: 1.4b (2018/10/02)
+%% Version: 1.4c (2021/07/05)
 %% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
 %%
 \NeedsTeXFormat{LaTeX2e}
 \RequirePackage{atveryend}
@@ -35,7 +35,7 @@
 \ProcessOptions\relax
 \newtoks\tof at toctoks
 \def\tof at readtoc {%
-  \ifeof \tof at tf
+  \ifeof\tof at tf
   \else
      \read\tof at tf to \tof at buffer
      \tof at toctoks\expandafter\expandafter\expandafter
@@ -47,8 +47,9 @@
         \makeatletter
         \newread\tof at tf
         \openin\tof at tf\@filef at und
+        \tof at toctoks{\tof at begingroup}%
         \tof at readtoc
-        \global\tof at toctoks=\expandafter{\the\tof at toctoks}%
+        \global\tof at toctoks=\expandafter{\the\tof at toctoks\tof at endgroup}%
         \closein\tof at tf}}{}}
 \AtBeginDocument{
     \addtocontents{toc}{\string\@ifundefined{tof at begin}%
@@ -57,7 +58,7 @@
         \global\let\string\tof at starttags\string\@gobble
         \global\let\string\tof at stoptags\string\@gobble
         \global\let\string\tof at tagthis\string\@gobble
-        \global\let\string\tof at untagthis\string\@gobble}{}}
+        \global\let\string\tof at untagthis\string\@gobble}\relax}
     \addtocontents{toc}{\string\tof at begin}
     \@ifpackageloaded{hyperref}
        {\def\tof at gobblethree@orfour#1#2#3#4{}%
@@ -69,13 +70,12 @@
 \let\tof at begingroup \begingroup
 \let\tof at endgroup   \endgroup
 \def\tof@@finish   {\tof at global\let\contentsline\tof at savedcontentsline
-                    \tof at endgroup\global\let\tof at begin\relax
-                                 \global\let\tof at tags\@empty }
+                    \global\let\tof at begin\relax
+                    \global\let\tof at tags\@empty }
 \def\tof@@tagthis   #1{\def\tof at tags@tmp{#1}}
 \def\tof@@untagthis #1{\def\tof at untags@tmp{#1}}
 \def\tof at init#1{%
     \def\tof at begin{%
-        \tof at begingroup
         \tof at global\let\tof at tagthis  \tof@@tagthis
         \tof at global\let\tof at untagthis\tof@@untagthis
         \tof at global\let\tof at starttags\tof@@starttags

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2021-07-04 23:48:47 UTC (rev 59836)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2021-07-05 20:50:36 UTC (rev 59837)
@@ -5931,7 +5931,7 @@
 
 sub PREHOOK_optexcount { # make executable zip, from their install.sh
   print "PREHOOK_$package - make executable zip\n";
-  &xsystem ("cp src/optexcount.py src/__main__.py");
+  &xsystem ("cp -p src/optexcount.py src/__main__.py");
   &xsystem ("zip -j tmp.zip src/*.py");
   &xsystem ("echo '#!/usr/bin/env python3' | cat - tmp.zip >optexcount");
   chmod (0755, "optexcount") || die "chmod(optexcount) failed: $!";



More information about the tex-live-commits mailing list.