Skip to content

Commit

Permalink
Merge branch 'develop' into tlc3-errata
Browse files Browse the repository at this point in the history
# Conflicts:
#	base/doc/tlc3.err
  • Loading branch information
FrankMittelbach committed Aug 7, 2024
2 parents 2ff074b + 1b54868 commit ca48ab6
Show file tree
Hide file tree
Showing 58 changed files with 1,099 additions and 306 deletions.
18 changes: 18 additions & 0 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================

2024-07-27 Ulrike Fischer <[email protected]>
* lttagging.dtx: (subsection{Paragraph sockets}): A socket and plug to restore paragraph
setting added.

2024-07-13 Ulrike Fischer <[email protected]>
* lttagging.dtx: (subsection{Tagging sockets}): toc-related tagging sockets added.

2024-07-13 Frank Mittelbach <[email protected]>

* lttagging.dtx (subsection{Tagging support for table/tabular packages}):
Sockets for \cs{cline} leaders added (tagging/134)

2024-07-10 Frank Mittelbach <[email protected]>

* ltmiscen.dtx (subsection{Environments}):
Drop code chunks before adding them to avoid duplication in
rollback (gh/1407)

2024-07-06 Yukai Chou <[email protected]>

* ltcmd.dtx (subsection{User functions}):
Expand Down
10 changes: 7 additions & 3 deletions base/doc/ltnews39.tex
Original file line number Diff line number Diff line change
Expand Up @@ -728,12 +728,15 @@ \subsection{Struts at the end of footnotes or \texttt{p} columns}
\subsection{Fix a ``missing \cs{item}'' rollback error}

If \LaTeX{} is rolled back to a date between 2023/06/01 (inclusive) and
2024/06/01 (exclusive), any list-based environment would raise an error
2024/06/01 (exclusive), any list-based environment would raise an
error:
%(shown on two lines for \textsl{TUGboat}):
\begin{verbatim}
! LaTeX Error: Something's wrong--perhaps a missing \item.
! LaTeX Error: Something's wrong--perhaps
a missing \item.
\end{verbatim}
This has now been corrected as a hotfix in patch level 2, by enhancing
a 2023/06/01 version rollback code of new paragraph mechanism.
the 2023/06/01 version rollback code of the new paragraph mechanism.
%
\githubissue{1386}

Expand Down Expand Up @@ -825,6 +828,7 @@ \subsection{\pkg{showkeys}:\ Allow \cs{newline} in \pkg{amsthm} to work}
%
\githubissue{1123}

\tubcommand{\newpage}
\subsection{\pkg{xr}:\ Support links and properties}
%
The \pkg{xr} package implements a system for eXternal References.
Expand Down
78 changes: 72 additions & 6 deletions base/doc/ltnews40.tex
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,22 @@
{github issue#1 #2}%
)}%
\par\smallskip}


% same for issues in the tagging repository:

\providecommand\taggingissue[2][]{\ifhmode\unskip\fi
\quad\penalty500\strut\nobreak\hfill
\mbox{\small\slshape(%
\href{https://github.com/latex3/tagging-project/issues/\getfirstgithubissue#2 \relax}%
{github tagging issue#1 #2}%
)}%
\par\smallskip}

%% But Chris has to mostly disable \href for his TEXPAD app:
%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine

% simple solution right now (just link to the first issue if there are more)
% simple solution right now (just link to the first issue if there are several)
\def\getfirstgithubissue#1 #2\relax{#1}

\providecommand\sxissue[1]{\ifhmode\unskip
Expand All @@ -96,6 +108,8 @@
)}%
\par}



\let\cls\pkg
\providecommand\env[1]{\texttt{#1}}
\providecommand\acro[1]{\textsc{#1}}
Expand Down Expand Up @@ -225,10 +239,12 @@ \subsection{Fix wrong file type in a rollback warning}
package with minimum date requirement \meta{date2} is to be loaded, a
rollback warning is raised if \meta{date2} is later than \meta{date1}:
\begin{verbatim}
LaTeX Warning: Suspicious rollback/min-date date given
A minimal date of YYYY-MM-DD has been specified for package
'<pkgname>'.
But this is in conflict with a rollback request to YYYY-MM-DD.
LaTeX Warning: Suspicious rollback/min-date
date given.
A minimal date of YYYY-MM-DD has been
specified for package '<pkgname>'.
But this is in conflict with a rollback
request to YYYY-MM-DD.
\end{verbatim}

In some cases this message showed a wrong file type, i.e.,
Expand Down Expand Up @@ -273,11 +289,61 @@ \section{Improvement to \XeTeX\ \cs{showhyphens}}
%
\githubissue{1380}

%\section{Changes to packages in the \pkg{amsmath} category}

\section{Avoid code duplication in rollback}

When the kernel uses \cs{AddToHook} in a region that might be
rolled back (which happens in a few places) and a document requests a
rollback, then we have the situation that the hook already contains code to which we added the same
(or slightly different) code during the
rollback; this results in code duplication or, worse, in errors. This has
now been corrected by dropping any such code chunk (if there is one) prior to
adding the rollback code.
%
\githubissue{1407}




\section{Changes to packages in the \pkg{amsmath} category}

\section{Extend support for \cs{dots}}

The implementation of \cs{dots} in \pkg{amsmath} has the feature that
it selects different dots depending on the symbol that follows: e.g.,
dots between commas would normally be on the baseline, while dots
between binary or relational symols would be raised. However, when symbols such
as \cs{cong} were protected from expansion in moving arguments (so
that they worked in places such as headings) it had the unfortunate
side-effect that the \cs{dots} magic stopped working for them. This
has now been corrected.
%
\githubissue{1265}



%\section{Changes to packages in the \pkg{graphics} category}

\section{Changes to packages in the \pkg{tools} category}


\subsection{\pkg{array}: Tagging support for \cs{cline}}

In the last release we added tagging support for \pkg{array},
\pkg{longtable} and other tabular packages, but we overlooked that the
kernel definition for \cs{cline} also needs modification because the
rule generated by the command needs to be tagged as an
artifact. Furthermore, the processing of a \cs{cline} looks to the
algorithm as if another row is added (which is technically what
happens), thus it was also necessary to decrement the internal row
counter to get a correct row count. This has now been corrected in
\pkg{array} which is automatically loaded for tagging, so that all
these packages are now fully compatible with the tagging code if it is
turned on.
%
\taggingissue{134}


\subsection{\pkg{longtable}: Extend caption type}

The \pkg{longtable} has been extended and now provides the command \cs{LTcaptype}
Expand Down
29 changes: 28 additions & 1 deletion base/ltmiscen.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
[2024/06/23 v1.2d LaTeX Kernel (Misc. Environments)]
[2024/07/10 v1.2e LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
Expand Down Expand Up @@ -276,6 +276,21 @@
% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
% \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)}
% \begin{macrocode}
% \end{macrocode}
% If we roll back we have to drop stuff before adding chunks,
% otherwise the code will just be appended, and thus doubled.
% This would result in a harmless warning during the format
% generation, because in that case the code chunk label doesn't
% exist, and therefore can't be dropped.
% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
% avoid duplication in rollback (gh/1407)}
% \begin{macrocode}
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
% \end{macrocode}
%
% \begin{macrocode}
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
\AddToHook{enddocument/info}[kernel/release]{%
Expand Down Expand Up @@ -389,6 +404,18 @@
%<latexrelease>\NewHook{enddocument/afteraux}
%<latexrelease>\NewHook{enddocument/info}
%<latexrelease>\NewHook{enddocument/end}
% \end{macrocode}
% If we roll back we have to drop stuff before adding chunks,
% otherwise the code will just be appended, and thus doubled.
% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
% avoid duplication in rollback (gh/1407)}
% \begin{macrocode}
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
% \end{macrocode}
%
% \begin{macrocode}
%<latexrelease>\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
%<latexrelease>\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
%<latexrelease>\AddToHook{enddocument/info}[kernel/release]{%
Expand Down
94 changes: 83 additions & 11 deletions base/lttagging.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{lttagging.dtx}
[2024/07/12 v1.0b LaTeX Kernel (tagging support)]
[2024/07/27 v1.0e LaTeX Kernel (tagging support)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttagging.dtx}
Expand Down Expand Up @@ -61,11 +61,6 @@
% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
%
%
% \section{}
%
%
%
% \MaybeStop{}
%
% \begin{macrocode}
%<*2ekernel|latexrelease>
Expand Down Expand Up @@ -142,6 +137,12 @@
% of the CamelCase command.
%
%
% \MaybeStop{}
%
%
% \section{Implementation}
%
%
%
% \begin{macro}{\SuspendTagging,\ResumeTagging}
%
Expand Down Expand Up @@ -213,16 +214,75 @@
}
\ERRORusetaggingsocket % that should get a proper error message
}
\ExplSyntaxOff
% \end{macrocode}
%
% \end{macro}
%
% \subsection{Tagging sockets}
% This collects tagging sockets that should be generally available
% so that they can also be used even if the tagging code is not loaded.
%
% \subsubsection{Tagging support for paragraph setup}
%
% Paragraphs are tagged through the code in the para/hooks. This code is sometimes
% adjusted, e.g. to produce a \enquote{flattened} paragraph or to use a different tag.
% Sockets related to such code parts are collected here.
%
% \begin{socketdecl}{tagsupport/para/restore}
% This socket restores the para related settings to their default. It
% should be used in places where ``normal'' paragraph tagging must be ensured, for example
% at the begin of a footnote.
% \begin{macrocode}
\NewSocket{tagsupport/para/restore}{0}
% \end{macrocode}
% \end{socketdecl}
%
% \begin{plugdecl}{default}
% \begin{macrocode}
\NewSocketPlug{tagsupport/para/restore}{default}
{
\tl_set:Nn \l__tag_para_main_tag_tl {text-unit}
\tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
\bool_set_false:N\l__tag_para_flattened_bool
}
\AssignSocketPlug{tagsupport/para/restore}{default}
\ExplSyntaxOff
% \end{macrocode}
% \end{plugdecl}

% \subsubsection{Tagging sockets for toc}

% \begin{socketdecl}{tagsupport/toc/contentsline/before,
% tagsupport/toc/contentsline/after}
% Tagging sockets at the begin and end of contentsline.
% They receive \emph{all} contentsline arguments as one argument
% in four brace groups. The socket code should then use the parts it needs.
% \begin{macrocode}
\NewSocket{tagsupport/toc/contentsline/before}{1}
\NewSocket{tagsupport/toc/contentsline/after}{1}
% \end{macrocode}
% \end{socketdecl}
%
%
%
%
% \begin{socketdecl}{tagsupport/toc/starttoc/before,
% tagsupport/toc/starttoc/after}
% Tagging sockets for the begin and end of start of \cs{@starttoc}.
% They take one argument, the extension.
% \begin{macrocode}
\NewSocket{tagsupport/toc/starttoc/before}{1}
\NewSocket{tagsupport/toc/starttoc/after}{1}
% \end{macrocode}
% \end{socketdecl}
%
% \begin{socketdecl}{tagsupport/toc/leaders/before,
% tagsupport/toc/leaders/after}
% Tagging sockets to make the dot leaders an artifact.
% They do not take an argument.
% \begin{macrocode}
\NewSocket{tagsupport/toc/leaders/before}{0}
\NewSocket{tagsupport/toc/leaders/after}{0}
% \end{macrocode}
% \end{socketdecl}
%
% \subsection{Tagging support for table/tabular packages}
%
% The code uses a number of sockets to inject the tagging
Expand Down Expand Up @@ -335,6 +395,18 @@
% \end{socketdecl}
%
%
% \begin{socketdecl}{tagsupport/tbl/leaders/begin,
% tagsupport/tbl/leaders/end}
% Sockets around leaders such as rules or dotted lines, that should
% be tagged as artifacts, used, for example, in \cs{cline}.
% \changes{v1.0c}{2024/07/13}{Sockets for \cs{cline} leaders added (tagging/134)}
% \begin{macrocode}
\NewSocket{tagsupport/tbl/leaders/begin}{0}
\NewSocket{tagsupport/tbl/leaders/end}{0}
% \end{macrocode}
% \end{socketdecl}
%
%
%
%
%
Expand Down Expand Up @@ -729,7 +801,7 @@
% \end{macrocode}
% Even if we are at the start of a row we my have to do a \cs{cr},
% so we do a \cs{crcr} always at the end.
% \changes{v1.ob}{2024/06/10}
% \changes{v1.0b}{2024/06/10}
% {Always issue a \cs{crcr} even if we are at the start of a
% row to avoid problems with tabulary and similar code}
% \begin{macrocode}
Expand Down
2 changes: 1 addition & 1 deletion base/testfiles/github-0944.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ LaTeX Warning: Reference `unknown' on page 1 undefined on input line ....
] (github-0944.aux)
***********
-formatname- <-formatversion-> patch level -2
L3 programming layer <2024-06-19>
L3 programming layer <2024-07-20>
***********
*File List*
-show the file list here-
Expand Down
13 changes: 13 additions & 0 deletions base/testfiles/github-1407-rollback.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
\RequirePackage[2023-11-01]{latexrelease}

\documentclass{article}

\input{test2e}


\START

\typeout{--> Code should not be doubled in chunks}

\ShowHook{enddocument/info}
\END
Loading

0 comments on commit ca48ab6

Please sign in to comment.