Skip to content

Commit

Permalink
Fix for gh1336 (#1338)
Browse files Browse the repository at this point in the history
* fixing unnecessary rollback errors

* mumble

* mumble squared

* don't undefine unprefixed luatex primitives on rollback

* looks good but now the test changes (of course)

* drop \NeedsTeXFormat

* some cleanupup as suggested

---------

Co-authored-by: David Carlisle <d.p.carlisle@gmail.com>
  • Loading branch information
FrankMittelbach and davidcarlisle authored May 23, 2024
1 parent 03e7141 commit a94150a
Show file tree
Hide file tree
Showing 23 changed files with 752 additions and 70 deletions.
8 changes: 7 additions & 1 deletion base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ not part of the distribution.
Drop temp fixing for footnotes in function and variable envs.
Supported by l3doc since l3kernel 2023-10-10 (latex3 gh/1266)

2024-04-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* doc.dtx:
Do not error with "suspicous date" when rolling back to
early years of LaTeX2e (gh/1336)

2024-04-24 Yukai Chou <muzimuzhi@gmail.com>

* lttextcomp.dtx
* lttextcomp.dtx
Load the 2018 version when rolling back prior to 2018-08-11 (gh/1333)
Clean up \providecommand lines

Expand Down
8 changes: 4 additions & 4 deletions base/doc.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
%\catcode`\<=14
%<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%<+package>
%<+package>\providecommand\DeclareRelease[3]{}
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
% Any rollback request before 2016-02-15 we try to fullfil with the 2016 version:
%<+package>\DeclareRelease{}{1994-06-01}
%<+package> {doc-2016-02-15.sty}
%<+package>\DeclareRelease{v2.1g}{2016-02-15}
%<+package> {doc-2016-02-15.sty}
%<+package>\DeclareRelease{v2}{2021-06-01}
Expand All @@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
%<+package|shortvrb> [2024/02/08 v3.0o
%<+package|shortvrb> [2024/04/26 v3.0p
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
Expand Down
23 changes: 23 additions & 0 deletions base/doc/ltnews39.tex
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,29 @@ \subsection{Behavior of loading \pkg{textcomp} without options}
\githubissue{1333}


\subsection{Rollback improvements}

When requesting a rollback of the \LaTeX{} kernel and/or packages
several packages produced the error \enquote{Suspicous rollback date}
because their rollback section contained only data about recent
releases even if the package, such as \pkg{array}, was available since
the first release of \LaTeXe{} in 1994. We now suppress this error and
load the first release that is still part of the distribution (and
hope for the best). This change was implemented for the packages
\pkg{amsmath},
\pkg{array},
\pkg{doc},
\pkg{graphics},
\pkg{longtable},
\pkg{multicol},
\pkg{showkeys},
\pkg{textcomp}, and
\pkg{varioref}.
%
\githubissue{1333}



\section{Documentation improvements}

\subsection{Further updates to the guides}
Expand Down
23 changes: 4 additions & 19 deletions base/ltdirchk.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@
% In current formats enable primitives with unprefixed names.
% the \textsf{latexrelease} guards allow the primitives to be
% defined with a |\luatex| prefix if older formats are specified.
%
% The unprefixed forms are \emph{not} undefined for improved
% compatibility with external packages when rolling back
% the format.
% \begin{macrocode}
%</initex>
%</dircheck>
Expand All @@ -280,25 +284,6 @@
%<latexrelease> "luatex",
%<latexrelease> tex.extraprimitives("core","omega", "aleph", "luatex")
%<latexrelease> )
%<latexrelease> local i
%<latexrelease> local t = { }
%<latexrelease> for _,i in pairs(tex.extraprimitives("luatex")) do
%<latexrelease> if not string.match(i,"^U") then
%<latexrelease> if not string.match(i, "^luatex") then
%<latexrelease> table.insert(t,i)
%<latexrelease> end
%<latexrelease> else
%<latexrelease> if string.match(i,"^Uchar$") then
%<latexrelease> table.insert(t,i)
%<latexrelease> end
%<latexrelease> end
%<latexrelease> end
%<latexrelease> for _,i in pairs(t) do
%<latexrelease> tex.print(
%<latexrelease> "\noexpand\\let\noexpand\\" .. i
%<latexrelease> .. "\noexpand\\undefined"
%<latexrelease> )
%<latexrelease> end
%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\fi
Expand Down
14 changes: 14 additions & 0 deletions base/testfiles/github-1336.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

\RequirePackage[2000-01-01]{latexrelease}

\documentclass{article}

\input{test2e}

\START

\usepackage{doc}
\usepackage{textcomp}

\END

107 changes: 107 additions & 0 deletions base/testfiles/github-1336.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
(doc.sty
Rollback for package 'doc' requested -> date ....-..-...
Best approximation is the release introduced on ....-..-...
(doc-....-..-...sty
Package: doc ....-..-.. v... Standard LaTeX documentation package (FMi)
\c@StandardModuleDepth=\count...
\guard@level=\count...
\MacrocodeTopsep=\skip...
\MacroIndent=\dimen...
\macro@cnt=\count...
\MacroTopsep=\skip...
\index@excludelist=\toks...
\IndexMin=\dimen...
\c@IndexColumns=\count...
Can't find multicol.sty -- will use normal index layout if necessary.
\GlossaryMin=\dimen...
\c@GlossaryColumns=\count...
\check@sum=\count...
\bslash@cnt=\count...
\wrong@table=\toks...
\c@CodelineNo=\count...
)) (textcomp.sty
Rollback for package 'textcomp' requested -> date ....-..-...
Best approximation is the release introduced on ....-..-...
(textcomp-....-..-...sty
Package: textcomp ....-..-.. v... Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp) 5 = only ISO-Adobe without \textcurrency
(textcomp) 4 = 5 + \texteuro
(textcomp) 3 = 4 + \textohm
(textcomp) 2 = 3 + \textestimated + \textcurrency
(textcomp) 1 = TS1 - \textcircled - \t
(textcomp) 0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Changing ? sub-encoding to TS1/1 on input line ....
(ts1enc.def
File: ts1enc.def ....-..-.. v... (jk/car/fm) Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding TS1 on input line ....
)
LaTeX Info: Redefining \oldstylenums on input line ....
Package textcomp Info: Changing cmr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing cmss sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing cmtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing cmvtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing cmbr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing cmtl sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing ccr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing ptm sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing pcr sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing phv sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing ppl sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing pag sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing pbk sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing pnc sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing pzc sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing bch sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing put sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing uag sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing ugq sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing ul8 sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing ul9 sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing augie sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing dayrom sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing dayroms sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing pxr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing pxss sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing pxtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing txr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing txss sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing txtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmdh sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmss sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmssq sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmvtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing lmtt sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qhv sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qag sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qbk sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qcr sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qcs sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qpl sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qtm sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qzc sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing qhvc sub-encoding to TS1/0 on input line ....
Package textcomp Info: Changing futs sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing futx sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing futj sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing hlh sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing hls sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing hlst sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing hlct sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing hlx sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing hlce sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing hlcn sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing hlcw sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing hlcf sub-encoding to TS1/5 on input line ....
Package textcomp Info: Changing pplx sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing pplj sub-encoding to TS1/3 on input line ....
Package textcomp Info: Changing ptmx sub-encoding to TS1/4 on input line ....
Package textcomp Info: Changing ptmj sub-encoding to TS1/4 on input line ....
))
9 changes: 4 additions & 5 deletions required/amsmath/amsmath.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,16 @@ Bug reports can be opened (category \texttt{#1}) at\\%
[1994/12/01]% LaTeX date must be December 1994 or later
% \end{macrocode}
%
% Providing a rollback to earlier version(s)
% Providing a rollback to earlier version(s). Anything prior to
% 2018 we attempt to fulfill by using the version from 2018.
% \begin{macrocode}
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
%
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
\DeclareCurrentRelease{}{2019-04-01}
% \end{macrocode}
%
% \begin{macrocode}
\ProvidesPackage{amsmath}[2024/05/09 v2.17p AMS math features]
\ProvidesPackage{amsmath}[2024/05/23 v2.17q AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
Expand Down
6 changes: 6 additions & 0 deletions required/amsmath/changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* amsmath.dtx:
Do not error with "suspicous date" when rolling back to
early years of LaTeX2e (gh/1336)

2024-03-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* amsmath.dtx (subsection{The \env{gather} environment}):
Expand Down
6 changes: 6 additions & 0 deletions required/graphics/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================

2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* graphics.dtx:
Do not error with "suspicous date" when rolling back to
early years of LaTeX2e (gh/1336)

2024-04-28 David Carlisle <David.Carlisle@latex-project.org>

* grfguide.tex: add \resizebox* example for gh/1339
Expand Down
6 changes: 3 additions & 3 deletions required/graphics/graphics.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
\ProvidesFile{graphics.dtx}
%</dtx>
%<+package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%<+package>\providecommand\DeclareRelease[3]{}
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
% Try to fulfill rollback requests to early years by using the 2017 version:
%<+package>\DeclareRelease{}{1994-06-01}{graphics-2017-06-25.sty}
%<+package>\DeclareRelease{}{2017-06-25}{graphics-2017-06-25.sty}
%<+package>\DeclareCurrentRelease{}{2019-10-01}
%<+package>
%<+package>\ProvidesPackage{graphics}
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
[2024/01/14 v1.4e Standard LaTeX Graphics (DPC,SPQR)]
[2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
Expand Down
5 changes: 0 additions & 5 deletions required/tools/array-2020-02-10.sty
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
%% Package `array' to use with LaTeX 2e
%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}

\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
\DeclareCurrentRelease{}{2019-10-01}

\ProvidesPackage{array}
[2020/02/10 v2.4m Tabular extension package (FMi)]
Expand Down
6 changes: 0 additions & 6 deletions required/tools/array-2023-11-01.sty
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@
%% Package `array' to use with LaTeX 2e
%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}

\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
\DeclareCurrentRelease{}{2020-10-01}

\ProvidesPackage{array}
[2023/10/16 v2.5g Tabular extension package (FMi)]
Expand Down
7 changes: 4 additions & 3 deletions required/tools/array.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
%% Package `array' to use with LaTeX 2e
%% Copyright (C) 1989-1998 Frank Mittelbach, all rights reserved.
%<+package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<+package>\providecommand\DeclareRelease[3]{}
%<+package>\providecommand\DeclareCurrentRelease[2]{}
%<+package>
% For anything before 2016-10-06 we load the 2016 version and hope for the best:
%<+package>\DeclareRelease{}{1994-06-01}{array-2016-10-06.sty}
%
%<+package>\DeclareRelease{}{2016-10-06}{array-2016-10-06.sty}
%<+package>\DeclareRelease{v2.4}{2020-02-10}{array-2020-02-10.sty}
%<+package>\DeclareRelease{v2.5}{2023-11-01}{array-2023-11-01.sty}
Expand All @@ -38,7 +39,7 @@
% \begin{macrocode}
%<+package>\NeedsTeXFormat{LaTeX2e}[2024/06/01]
%<+package>\ProvidesPackage{array}
%<+package> [2024/04/08 v2.6b Tabular extension package (FMi)]
%<+package> [2024/05/23 v2.6c Tabular extension package (FMi)]
%
% \fi
%
Expand Down
10 changes: 10 additions & 0 deletions required/tools/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================

2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>

* array.dtx:
* longtable.dtx:
* multicol.dtx:
* showkeys.dtx:
* varioref.dtx:
Do not error with "suspicous date" when rolling back to
early years of LaTeX2e (gh/1336)

2024-05-09 Yukai Chou <muzimuzhi@gmail.com>

* amsmath.dtx:
Expand Down
7 changes: 4 additions & 3 deletions required/tools/longtable.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
\ProvidesFile{longtable.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<package>\providecommand\DeclareRelease[3]{}
%<package>\providecommand\DeclareCurrentRelease[2]{}
%<package>
% Try the 2020 version for any rollback before that date:
%<package>\DeclareRelease{}{1994-06-01}{longtable-2020-01-07.sty}
%<package>
%<package>\DeclareRelease{v4.13}{2020-01-02}{longtable-2020-01-07.sty}
%<package>\DeclareCurrentRelease{}{2020-02-07}
Expand All @@ -37,7 +38,7 @@
%<driver> \ProvidesFile{longtable.drv}
% \fi
% \ProvidesFile{longtable.dtx}
[2023-12-16 v4.19 Multi-page Table package (DPC)]
[2024-04-26 v4.20 Multi-page Table package (DPC)]
%
% \iffalse
%<*driver>
Expand Down
8 changes: 0 additions & 8 deletions required/tools/multicol-2019-10-01.sty
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@
%%
%% Frank.Mittelbach@latex-project.org
%%
\NeedsTeXFormat{LaTeX2e}[2018-04-01]

\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}

\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
\DeclareCurrentRelease{}{2018-04-01}

\ProvidesPackage{multicol}
[2019/12/09 v1.8y multicolumn formatting (FMi)]
%%
Expand Down
Loading

0 comments on commit a94150a

Please sign in to comment.