[latex3-commits] [git/LaTeX3-latex3-latex2e] gh186: change cs names (0b5fb1b1)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Apr 9 12:17:10 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : gh186
Link       : https://github.com/latex3/latex2e/commit/0b5fb1b116836b0d4d61e722d4c79d566b1aef6e

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

commit 0b5fb1b116836b0d4d61e722d4c79d566b1aef6e
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Apr 9 12:17:10 2020 +0200

    change cs names


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

0b5fb1b116836b0d4d61e722d4c79d566b1aef6e
 base/changes.txt               |  5 ++++-
 base/doc/ltnews32.tex          | 11 +++++++++--
 base/ltclass.dtx               | 32 ++++++++++++++++----------------
 base/testfiles/github-0186.lvt | 16 ++++++++--------
 4 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index d41921c9..50492f21 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -7,8 +7,11 @@
 2020-04-07  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltclass.dtx (section{Implementation}):
-	Add \@ifformatlater to test if the current format is equal or later than
+	Add \IfFormAtLeastTF to test if the current format is equal or later than
 	the given date (gh/168)
+	Also add \IfClassAtLeastTF and \IfPackageAtLeastTF as a suggested
+	alternative to \@ifpackagelater and \@ifclasslater (which have a wrong
+	name, because it is really "later or equal") (gh/186)
 	Use different method to ignore unprocessed options (gh/22)
 
 
diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index cb4d42d7..2b7411f1 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -296,9 +296,16 @@ has finally be fixed.
 \subsection{Added test for format date}
 
 \emph{to write}
-\cs{@ifformatlater}
+
+	Add \cs{IfFormAtLeastTF} to test if the current format is
+        equal or later than the given date.  Also add
+        \cs{IfClassAtLeastTF} and \cs{IfPackageAtLeastTF} as a
+        suggested alternative to \cs{@ifpackagelater} and
+        \cs{@ifclasslater} (which have a wrong name because it is
+        really ``later or equal'').
+
 %
-\githubissue{168}
+\githubissue{186}
 
 
 
diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 22980d93..ae020afe 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -637,11 +637,11 @@
 % \end{macro}
 %
 %
-
-%  \begin{macro}{\@ifpackageatleast}
-%  \begin{macro}{\@ifclassatleast}
-%  \begin{macro}{\@ifformatatleast}
-% |\@ifformatatleast{YYYY/MM/DD}{|\meta{true
+%
+%  \begin{macro}{\IfPackageAtLeastTF}
+%  \begin{macro}{\IfClassAtLeastTF}
+%  \begin{macro}{\IfFormatAtLeastTF}
+% |\IfFormatAtLeastTF{YYYY/MM/DD}{|\meta{true
 %    code}|}{|\meta{false code}|}|
 %    Test if the format is later or equal to the given date.
 % \changes{v1.3k}{2020/04/07}{Macro added; also in rollback (gh/168)}
@@ -649,23 +649,23 @@
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2020/10/01}%
-%<latexrelease>                 {\@ifformatatleast}{Test format date}%
-\def\@ifformatatleast{\@ifl at t@r\fmtversion}
-\let\@ifpackageatleast\@ifpackagelater
-\let\@ifclassatleast\@ifclasslater
-\@onlypreamble\@ifformatatleast
-\@onlypreamble\@ifpackageatleast
-\@onlypreamble\@ifclassatleast
+%<latexrelease>                 {\IfFormatAtLeastTF}{Test format date}%
+\def\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+\let\IfPackageAtLeastTF\@ifpackagelater
+\let\IfClassAtLeastTF\@ifclasslater
+\@onlypreamble\IfFormatAtLeastTF
+\@onlypreamble\IfPackageAtLeastTF
+\@onlypreamble\IfClassAtLeastTF
 %    \end{macrocode}
 %    For rollback pretend it was available since the beginning of dawn.
 %    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\@ifformatatleast}{Test format date}%
-%<latexrelease>\def\@ifformatatleast{\@ifl at t@r\fmtversion}
-%<latexrelease>\let\@ifpackageatleast\@ifpackagelater
-%<latexrelease>\let\@ifclassatleast\@ifclasslater
+%<latexrelease>                 {\IfFormatAtLeastTF}{Test format date}%
+%<latexrelease>\def\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
+%<latexrelease>\let\IfPackageAtLeastTF\@ifpackagelater
+%<latexrelease>\let\IfClassAtLeastTF\@ifclasslater
 %<latexrelease>\EndIncludeInRelease
 %<*2ekernel>
 %    \end{macrocode}
diff --git a/base/testfiles/github-0186.lvt b/base/testfiles/github-0186.lvt
index 90a98f42..72ceba2f 100644
--- a/base/testfiles/github-0186.lvt
+++ b/base/testfiles/github-0186.lvt
@@ -8,11 +8,11 @@
 
 \makeatletter
 
-\@ifformatatleast{2020/10/01}{\typeout{GOOD: 2020-10 or later}}
-                             {\typeout{BAD}}
+\IfFormatAtLeastTF{2020/10/01}{\typeout{GOOD: 2020-10 or later}}
+                              {\typeout{BAD}}
 
-\@ifpackageatleast{fltrace}{2100/01/01}{\typeout{BAD: 2100-01  will be dead by then}}
-                                       {\typeout{GOOD: still alive}}
+\IfPackageAtLeastTF{fltrace}{2100/01/01}{\typeout{BAD: 2100-01  will be dead by then}}
+                                        {\typeout{GOOD: still alive}}
 
 % roll back somewhat ...
 
@@ -20,12 +20,12 @@
 \RequirePackage[2018/12/01]{latexrelease}
 \TIMO
  
-\@ifformatatleast{2020/10/01}{\typeout{BAD}}
-                             {\typeout{GOOD: 2018-12 (\fmtversion) now}}
+\IfFormatAtLeastTF{2020/10/01}{\typeout{BAD}}
+                              {\typeout{GOOD: 2018-12 (\fmtversion) now}}
 
 
-\@ifclassatleast{article}{2015/01/01}{\typeout{GOOD: let's hope so}}
-                                     {\typeout{BAD: really?}}
+\IfClassAtLeastTF{article}{2015/01/01}{\typeout{GOOD: let's hope so}}
+                                      {\typeout{BAD: really?}}
 
 
 \END





More information about the latex3-commits mailing list.