[latex3-commits] [git/LaTeX3-latex3-latex2e] gh479: Simplify ltnews entry (8062c99e)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Mar 20 02:09:12 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh479
Link       : https://github.com/latex3/latex2e/commit/8062c99e177ed177102dc7c9f393c61342b35371

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

commit 8062c99e177ed177102dc7c9f393c61342b35371
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Mar 19 22:09:12 2021 -0300

    Simplify ltnews entry


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

8062c99e177ed177102dc7c9f393c61342b35371
 base/doc/ltnews33.tex | 53 ++++++++++++++-------------------------------------
 1 file changed, 14 insertions(+), 39 deletions(-)

diff --git a/base/doc/ltnews33.tex b/base/doc/ltnews33.tex
index bdf75e2e..34a4407e 100644
--- a/base/doc/ltnews33.tex
+++ b/base/doc/ltnews33.tex
@@ -473,45 +473,20 @@ hook management system by loading the \pkg{latexrelease} package.
 
 However rolling back from a later release to the 2020-10-01 release didn't quite
 work because it would try to define all the commands from \pkg{lthooks} again,
-and that would result in hundreds of errors.
-
-To solve this issue, now \pkg{latexrelease} has a new command,
-\cs{NewModuleRelease} (and \cs{EndModuleRelease}) so that completely new modules
-can be defined, and then when rolling back or forward, \pkg{latexrelease} will
-know if the code of the module has to be read or completely ignored.
-Additionally, changes to such module can still be declared with the well-known
-\cs{IncludeInRelease} command, and these changes will be applied when necessary.
-
-An example new module can be created with:
-\begin{verbatim}
-\NewModuleRelease{mymodule}{2020-10-01}
-\newcommand\cmdA{foo}
-
-\newcommand\cmdB{}
-\IncludeInRelease{2020-05-01}{\cmdB}
-                 {Change \cmdB}
-\renewcommand\cmdB{changed version of cmdB}
-\EndIncludeInRelease
-
-\IncludeInRelease{2020-10-01}{\cmdB}
-                 {Change \cmdB}
-\renewcommand\cmdB{bar}
-\EndIncludeInRelease
-
-\IncludeInRelease{0000-00-00}{mymodule}
-                 {Undefine module 'mymodule'}
-\let\cmdA\@undefined
-\let\cmdB\@undefined
-\EndModuleRelease
-\end{verbatim}
-In this example, the module \texttt{mymodule} is declared from 2020-10-01
-onwards, and a command \cs{cmdA} is defined with \cs{newcommand}, and this
-definition is only read if rolling forward from before the declared date, so
-there will be no \enquote{command already defined} issues here.  Then, \cs{cmdB}
-gets a dummy definition, to make sure it exists if rolling forward, then two
-versions are declared, in which it is redefined with \cs{renewcommand}.
-Finally, a chunk of code dated 0000-00-00 is declared to undefine the module
-(this part is optional), and the module ends with \cs{EndModuleRelease}.
+and that would result in errors, as usual with commands defined with
+\cs{newcommand} or in the case of \pkg{lthooks}, \cs{cs\_new:Npn}.
+
+To solve this issue, now completely new modules can be defined in
+\pkg{latexrelease} using two new commands:
+\begin{quote}
+\cs{NewModuleRelease}\verb|{|\meta{name}\verb|}{|\meta{release date}\verb|}|\\
+\null\quad\meta{module code}\\
+\cs{EndModuleRelease}
+\end{quote}
+and then when rolling back or forward \pkg{latexrelease} will know if the code
+of the module has to be read or completely ignored. Additionally, changes to
+such module can still be declared with the well-known \cs{IncludeInRelease}
+command, and these changes will be applied accordingly.
 %
 \githubissue{479}
 





More information about the latex3-commits mailing list.