[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Clearly documentation on \AtBeginDvi and \AtEndDvi (575fe6a9)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Jan 6 18:02:28 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/575fe6a93000a8e58e0ede9972c9197722b0756b

>---------------------------------------------------------------

commit 575fe6a93000a8e58e0ede9972c9197722b0756b
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Jan 6 18:02:28 2022 +0100

    Clearly documentation on \AtBeginDvi and \AtEndDvi


>---------------------------------------------------------------

575fe6a93000a8e58e0ede9972c9197722b0756b
 base/lthooks.dtx   |  5 +----
 base/ltshipout.dtx | 25 +++++++++++++++----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 672d118c..e07658fa 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -32,7 +32,7 @@
 %
 %    \begin{macrocode}
 \def\lthooksversion{v1.0s}
-\def\lthooksdate{2021/12/31}
+\def\lthooksdate{2022/01/06}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1489,9 +1489,6 @@
 %   Like \cs{AtBeginDocument} but for the \hook{enddocument} hook.
 % \end{function}
 %
-%    There is also \cs{AtBeginDvi}  which is discussed in conjunction
-%    with the shipout hooks.
-%
 %    \bigskip
 %
 %    The few hooks that existed previously in \LaTeXe{} used internally
diff --git a/base/ltshipout.dtx b/base/ltshipout.dtx
index 950770f2..8c99ab98 100644
--- a/base/ltshipout.dtx
+++ b/base/ltshipout.dtx
@@ -32,8 +32,8 @@
 %%% From File: ltshipout.dtx
 %
 %    \begin{macrocode}
-\providecommand\ltshipoutversion{v1.0k}
-\providecommand\ltshipoutdate{2021/11/17}
+\providecommand\ltshipoutversion{v1.0l}
+\providecommand\ltshipoutdate{2022/01/06}
 %    \end{macrocode}
 %
 %<*driver>
@@ -335,15 +335,18 @@
 %    \cs{AtEndDvi} is the counterpart that was not available in the
 %    kernel but only through the package \pkg{atenddvi}. It fills the
 %    \hook{shipout/lastpage} hook.
+%
 % \end{function}
 %
 %    As these two wrappers have been available for a long time we
-%    continue offering them. However, for new code we suggest using
-%    the high-level hook management commands directly instead of
-%    ``randomly-named'' wrappers.  This will lead to code that is
-%    easier to understand and to maintain.  For this reason we do not
-%    provide any other wrapper commands for the above hooks in the
-%    kernel.
+%    continue offering them (but not enhancing them by providing
+%    support for code labels, for example).
+%
+%    For new code we suggest using the high-level hook management
+%    commands directly instead of ``randomly-named'' wrappers.  This
+%    will lead to code that is easier to understand and to maintain.
+%    For this reason we do not provide any other wrapper commands for
+%    the above hooks in the kernel.
 %
 %
 % \subsection{Special commands for use inside the hooks}
@@ -1966,15 +1969,17 @@
 %
 %
 %  \begin{macro}{\AtEndDvi}
-%    This package has only one public command to simulating it is easy
+%    This package has only one public command, so simulating it is easy
 %    and actually sensible to provide as part of the kernel.
+% \changes{v1.0l}{2022/01/06}{Correctly simulate \cs{AtEndDvi} without
+%    extending the syntax}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\AtEndDvi}{atenddvi emulation}%
 \ExplSyntaxOn
-\cs_new_protected:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
+\cs_new_protected:Npn \AtEndDvi #1 {\AddToHook{shipout/lastpage}{#1}}
 \ExplSyntaxOff
 %    \end{macrocode}
 %    As the package is integrate we prevent loading (no need to roll that back):





More information about the latex3-commits mailing list.