texlive[72313] Master/texmf-dist: tableof (17sep24)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 17 21:55:44 CEST 2024


Revision: 72313
          https://tug.org/svn/texlive?view=revision&revision=72313
Author:   karl
Date:     2024-09-17 21:55:44 +0200 (Tue, 17 Sep 2024)
Log Message:
-----------
tableof (17sep24)

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

Modified: trunk/Master/texmf-dist/doc/latex/tableof/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tableof/README.md	2024-09-17 19:55:33 UTC (rev 72312)
+++ trunk/Master/texmf-dist/doc/latex/tableof/README.md	2024-09-17 19:55:44 UTC (rev 72313)
@@ -2,9 +2,9 @@
 =======
 
 - Package: tableof (Tables of tagged contents)
-- Version: 1.4c (2021/07/05)
+- Version: 1.4d (2024/09/17)
 - License: LPPL 1.3c
-- Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+- Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
 
 Provides `\toftagstart{}`, `\toftagstop{}`, `\toftagthis{}`, `\tofuntagthis{}`
 to tag chapters, sections or any other sectioning units destined to end up in
@@ -31,6 +31,10 @@
 Change History
 ==============
 
+* v1.4d (2024/09/17) reestablishes compatibility with `hyperref`,
+  which got broken at the latter `v7.01c` release.  The package now
+  requires LaTeX 2020-10-01.  Thanks to Ekkart Kleinod for report.
+
 * v1.4c (2021/07/05) additional efforts for `biblatex` compatibility.
   Allow style file extraction via `etex`, reword the abstract. Use utf8
   source encoding.

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

Modified: trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex	2024-09-17 19:55:33 UTC (rev 72312)
+++ trunk/Master/texmf-dist/doc/latex/tableof/tableoftest.tex	2024-09-17 19:55:44 UTC (rev 72313)
@@ -22,9 +22,9 @@
 %% in the same archive or directory.)
 %%
 %% Package: tableof
-%% Version: 1.4c (2021/07/05)
+%% Version: 1.4d (2024/09/17)
 %% License: LPPL 1.3c
-%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
 %%
 %% This file `tableoftest.tex' serves to demontrate the use of the
 %% commands from the package `tableof'.

Modified: trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx	2024-09-17 19:55:33 UTC (rev 72312)
+++ trunk/Master/texmf-dist/source/latex/tableof/tableof.dtx	2024-09-17 19:55:44 UTC (rev 72313)
@@ -1,14 +1,14 @@
 % -*- coding: utf-8; -*-
 %<*none>
-{\def\doctimestamp {Time-stamp: <05-07-2021 14:42:11 CEST>}%
+{\def\doctimestamp {Time-stamp: <17-09-2024 10:15:25 CEST>}%
  \def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}%
  \xdef\tofdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}%
 %</none>
 %%
 %% Package: tableof
-%% Version: 1.4c (2021/07/05)
+%% Version: 1.4d (2024/09/17)
 %% License: LPPL 1.3c
-%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
 %%
 % See README.md for installation instructions
 %
@@ -22,8 +22,8 @@
 % The Author of this Work is: Jean-Francois Burnol <jfbu at free dot fr> 
 %<*none>
 \def\pkgname        {tableof}
-\def\pkgdate        {2021/07/05}
-\def\pkgversion     {v1.4c}
+\def\pkgdate        {2024/09/17}
+\def\pkgversion     {v1.4d}
 \def\pkgdescription {Tables of tagged contents (JFB)}
 \begingroup
 \input docstrip.tex
@@ -237,11 +237,85 @@
 %   \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
    %
 \makeatother
-\documentclass[a4paper,fontsize=11pt,abstract]{scrdoc}
+\documentclass[a4paper,fontsize=11pt,abstract]{scrartcl}
+\makeatletter
+%%% START OF CUSTOM doc.sty LOADING (May 21, 2022 in xint.dtx)
+%%% (August 26, 2022 in etoc.dtx, comments trimmed)
+%%% (September 17, 2024 here, some unneeded stuff removed,
+%%%  I do not have time to do the syntax coloring as in etoc.pdf,
+%%%  and in particular there is here no reason to use doc=v2)
+
+
+% At 1.4d I wanted to use doc v3, but hypdoc is causing too much trouble.
+% - a warning in the log about hyperref already loaded,
+% - an overwrite of my hidelinks option,
+% - an impact on placement of codeline numbers in implementation part.
+\usepackage{doc}[=v2]
+% As explained above I was formerly using scrdoc hence ltxdoc indirectly.
+% Let's emulate here the little I appear to need from ltxdoc.cls and
+% srcdoc.cls.
+%
+\AtBeginDocument{\MakeShortVerb{\|}}
+\DeclareFontShape{OT1}{cmtt}{bx}{n}{<-> ssub * cmtt/m/n}{}
+\DeclareFontFamily{OMS}{cmtt}{\skewchar\font 48}  % '60
+\DeclareFontShape{OMS}{cmtt}{m}{n}{<-> ssub * cmsy/m/n}{}
+\DeclareFontShape{OMS}{cmtt}{bx}{n}{<-> ssub * cmsy/b/n}{}
+\DeclareFontShape{OT1}{cmss}{m}{it}{<->ssub*cmss/m/sl}{}
+\CodelineNumbered
+% \EnableCrossrefs  % but this will be hacked
+% \setcounter{StandardModuleDepth}{1} % we don't use this mechanism currently
+\def\cmd#1{\cs{\expandafter\cmd at to@cs\string#1}}
+\def\cmd at to@cs#1#2{\char\number`#2\relax}
+% Here I am loading doc=v2 but formerly I was using ltxdoc via scrdoc
+% which I dropped at release 1.4l (2022-05-29) and without much
+% thinking I had kept this.
+\DeclareRobustCommand\cs[1]{\texttt{\bslash#1}}
+% As I may have the * active, or macro names with _ or ^, I should
+% add \detokenize.  But see below for a redefinition anyhow.
+%
+% More urgent is that I am also using hyperref and this definition gives wrong
+% bookmarks if \cs is used in section titles.  As I had very very few usags of
+% \cs in the whole of xint.dtx, it took me a while to realize the problem
+% here.  Turns out that doc=v3 by default loads hypdoc which includes this
+% configuration for hyperref compatibility:
+\AtBeginDocument{%
+\pdfstringdefDisableCommands{\def\cs#1{\textbackslash\detokenize{#1}}}%
+}%
+% As I have not loaded hyperref yet I must delay it to AtBeginDocument.
+\providecommand\marg[1]{%
+  {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+\providecommand\oarg[1]{%
+  {\ttfamily[}\meta{#1}{\ttfamily]}}
+\providecommand\parg[1]{%
+  {\ttfamily(}\meta{#1}{\ttfamily)}}
+% \@addtoreset{CodelineNo}{part}% No need for this here
+% \def\partname{File}% \partname is "fixed" somewhere further down anyhow
+% No need for this, anyhow I don't build the indices
+% \gdef\codeline at wrindex#1{\if at filesw
+%       \begingroup
+%         \let\protect\noexpand
+%         \immediate\write\@indexfile
+%             {\string\indexentry{#1}%
+%             {\filesep\number\c at CodelineNo}}%
+%       \endgroup\fi}
+% \let\filesep\@empty
+
+% There is very little we seem to need from the scrdoc extras: page geometry
+% is set by geometry package and a4paper option from xint.tex file.  So it
+% seems I only need the hologo loading:
+\usepackage{hologo}
+%\DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}%
+%\DeclareRobustCommand*{\LuaTeX}{\hologo{LuaTeX}}%
+%
+\makeatother
+%%% end of ltxdoc+srcdoc emulation from June 2022 xint.dtx,
+%%% copied over almost verbatim to etoc.dtx on 2022/08/26,
+%%% and copied and trimmed for tableof.dtx 2024/09/17.
+
 \pagestyle{headings}
 \usepackage[T1]{fontenc}
 \usepackage[hscale=0.66,vscale=0.76]{geometry}
-
+\usepackage{centeredline}
 \usepackage{txfonts}
 \DeclareFontFamily{T1}{txtt}{}
 \DeclareFontShape{T1}{txtt}{m}{n}{	%medium
@@ -314,6 +388,15 @@
 pdfstartview=FitH,%
 pdfpagemode=UseOutlines}
 
+
+% Finally 1.4d uses doc=v2
+% % Attention que hypdoc fait
+% % Package hyperref Info: Option `colorlinks' set `true' on input line 75.
+% % Package hyperref Info: Option `plainpages' set `false' on input line 75.
+% % Package hyperref Info: Option `bookmarksopen' set `true' on input line 75.
+% % Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 75.
+% \AtBeginDocument{\hypersetup{hidelinks}}% fix de l'effet de hypdoc
+
 \usepackage{bookmark}
 
 \DeclareRobustCommand\csa[1]{{\ttfamily\char`\\#1}}
@@ -356,7 +439,7 @@
   Package version: \pkgversion\ (\pkgdate)\\
   Documentation generated from tableof.dtx
   with timestamp \tofdtxtimestamp\\
-  \textcopyright 2012, 2013, 2015, 2018, 2021 Jean-François Burnol
+  \textcopyright 2012, 2013, 2015, 2018, 2021, 2024 Jean-François Burnol
   <jfbu (at) free (dot) fr>
 \end{center}
 
@@ -554,10 +637,6 @@
 
 \section{Compatibility with other packages}
 
-\tableof checks if |hyperref| is loaded as |hyperref| modifies the format of the
-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 the document |.toc| file to use 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
@@ -585,6 +664,10 @@
                                   \hangafter1 }
 \makeatother
 
+|2024/09/17 v1.4d:    |reestablish compatibility with |hyperref|,
+which got broken at the latter |v7.01c| release.  The package now
+requires \LaTeX{} |2020-10-01|.  Thanks to Ekkart Kleinod for report.
+
 |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|).
@@ -696,7 +779,7 @@
 %</none>
 %<*package>
 %    \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{atveryend}
 \DeclareOption*{\PackageWarning{tableof}{Option `\CurrentOption' is unknown.}}
 \ProcessOptions\relax
@@ -738,7 +821,8 @@
 % 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}
+\AtBeginDocument{%
+  \IfFileExists{\jobname.toc}
     {{\endlinechar\m at ne
         \makeatletter
         \newread\tof at tf
@@ -746,7 +830,9 @@
         \tof at toctoks{\tof at begingroup}%
         \tof at readtoc
         \global\tof at toctoks=\expandafter{\the\tof at toctoks\tof at endgroup}%
-        \closein\tof at tf}}{}}
+        \closein\tof at tf}}
+    {}%
+}
 %    \end{macrocode}
 % The trick is that |\@ifundefined| chooses the undefined branch if the
 % meaning is |\relax|. Thus it is possible for \tableof to define and use
@@ -771,7 +857,7 @@
 % |1.4c| replaces |{}| (last argument of |\@ifundefined|) by |\relax|. No
 % strong reason. We and \etoc use |\endlinechar-1| anyhow.
 %    \begin{macrocode}
-\AtBeginDocument{
+\AtBeginDocument{%
     \addtocontents{toc}{\string\@ifundefined{tof at begin}%
        {\global\let\string\tof at begin\relax
         \global\let\string\tof at finish\string\@empty
@@ -778,19 +864,32 @@
         \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}\relax}
-    \addtocontents{toc}{\string\tof at begin}
+        \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.
+% \textbf{Now obsolete hyperref-related remark (see next paragraph)}:
+% {\itshape\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.
+% No urgency here, only mentioning for the record.}
+%
+% |hyperref| stopped defining its |\hyper at last| at its |7.01c| release in fall
+% of 2023, but \tableof tested for it, if |hyperref| was found to be present,
+% in case a document previously not using |hyperref| started using it on
+% second compilation, hence with a wrong |.toc| file format (in earlier
+% years).  As \tableof was doing
+% \centeredline{|\ifx\hyper at last\@undefined\tof at toctoks{}\fi|} it now
+% unconditionally emptied |\tof at toctoks| in presence of |hyperref|.  This is
+% the same problem which impacted \etoc and got fixed at its |1.2c| release
+% but unfortunately \tableof was not updated then.  Belatedly fixed at |1.4d|
+% of |2024/09/17|.
+%
+% Formerly this was a short macro, but it doesn't look like a problem
+% to simply alias it to the long |\@gobblefour|.
 %    \begin{macrocode}
-    \@ifpackageloaded{hyperref}
-       {\def\tof at gobblethree@orfour#1#2#3#4{}%
-        \ifx\hyper at last\@undefined\tof at toctoks{}\fi}
-       {\def\tof at gobblethree@orfour#1#2#3{}}}
+\let\tof at gobblethree@orfour\@gobblefour
 %    \end{macrocode}
 % |1.4b| (belatedly) fixes issue with |\tof at finish| getting lost due
 % to a final |\clearpage| before |\end{document}|. Indeed, formerly
@@ -999,24 +1098,6 @@
 \endinput
 %    \end{macrocode}
 % \MakePercentComment
-\CharacterTable
- {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-  Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-  Digits        \0\1\2\3\4\5\6\7\8\9
-  Exclamation   \!     Double quote  \"     Hash (number) \#
-  Dollar        \$     Percent       \%     Ampersand     \&
-  Acute accent  \'     Left paren    \(     Right paren   \)
-  Asterisk      \*     Plus          \+     Comma         \,
-  Minus         \-     Point         \.     Solidus       \/
-  Colon         \:     Semicolon     \;     Less than     \<
-  Equals        \=     Greater than  \>     Question mark \?
-  Commercial at \@     Left bracket  \[     Backslash     \\
-  Right bracket \]     Circumflex    \^     Underscore    \_
-  Grave accent  \`     Left brace    \{     Vertical bar  \|
-  Right brace   \}     Tilde         \~}
-
-\CheckSum{559}
-
 \Finale
 %%
 %% End of file `tableof.dtx'.

Modified: trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty	2024-09-17 19:55:33 UTC (rev 72312)
+++ trunk/Master/texmf-dist/tex/latex/tableof/tableof.sty	2024-09-17 19:55:44 UTC (rev 72313)
@@ -22,14 +22,14 @@
 %% in the same archive or directory.)
 %%
 \ProvidesPackage{tableof}
- [2021/07/05 v1.4c Tables of tagged contents (JFB)]
+ [2024/09/17 v1.4d Tables of tagged contents (JFB)]
 %%
 %% Package: tableof
-%% Version: 1.4c (2021/07/05)
+%% Version: 1.4d (2024/09/17)
 %% License: LPPL 1.3c
-%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021, 2024 Jean-Francois Burnol <jfbu at free dot fr>
 %%
-\NeedsTeXFormat{LaTeX2e}
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
 \RequirePackage{atveryend}
 \DeclareOption*{\PackageWarning{tableof}{Option `\CurrentOption' is unknown.}}
 \ProcessOptions\relax
@@ -42,7 +42,8 @@
        {\expandafter\the\expandafter\tof at toctoks\tof at buffer}%
      \expandafter\tof at readtoc
   \fi }
-\AtBeginDocument{\IfFileExists{\jobname.toc}
+\AtBeginDocument{%
+  \IfFileExists{\jobname.toc}
     {{\endlinechar\m at ne
         \makeatletter
         \newread\tof at tf
@@ -50,8 +51,10 @@
         \tof at toctoks{\tof at begingroup}%
         \tof at readtoc
         \global\tof at toctoks=\expandafter{\the\tof at toctoks\tof at endgroup}%
-        \closein\tof at tf}}{}}
-\AtBeginDocument{
+        \closein\tof at tf}}
+    {}%
+}
+\AtBeginDocument{%
     \addtocontents{toc}{\string\@ifundefined{tof at begin}%
        {\global\let\string\tof at begin\relax
         \global\let\string\tof at finish\string\@empty
@@ -58,12 +61,10 @@
         \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}\relax}
-    \addtocontents{toc}{\string\tof at begin}
-    \@ifpackageloaded{hyperref}
-       {\def\tof at gobblethree@orfour#1#2#3#4{}%
-        \ifx\hyper at last\@undefined\tof at toctoks{}\fi}
-       {\def\tof at gobblethree@orfour#1#2#3{}}}
+        \global\let\string\tof at untagthis\string\@gobble}\relax}%
+    \addtocontents{toc}{\string\tof at begin}%
+}
+\let\tof at gobblethree@orfour\@gobblefour
 \AfterLastShipout
     {\immediate\write\@auxout{\string\@writefile{toc}{\string\tof at finish}}}
 \let\tof at global     \@empty



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