[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Add full release date to ltnews (#984) (f20706f5)

GitHub noreply at github.com
Sat Jan 21 21:59:56 CET 2023


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

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

commit f20706f5bf1866ed8e1573f2256bd4eec8a2b607
Author: muzimuzhi <muzimuzhi at gmail.com>
Date:   Sun Jan 22 04:59:56 2023 +0800

    Add full release date to ltnews (#984)


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

f20706f5bf1866ed8e1573f2256bd4eec8a2b607
 base/changes.txt      |  7 +++++++
 base/doc/ltnews.tex   | 16 +++-------------
 base/doc/ltnews19.tex |  1 +
 base/doc/ltnews20.tex |  1 +
 base/doc/ltnews27.tex |  1 +
 base/doc/ltnews31.tex |  1 +
 base/doc/ltnews34.tex |  1 +
 base/doc/ltnews37.tex |  1 +
 base/ltnews.cls       | 27 ++++++++++++++++++++++++++-
 9 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 468b6643..e28029ef 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,13 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2023-01-16 Yukai Chou <muzimuzhi at gmail.com>
+
+	* ltnews.cls:
+	Added full release date yyyy-mm-dd to _all_ ltnews issues.
+	Added \publicationday{<day>} to specify day in a month in ltnews<n>.tex.
+	<day> defaults to 01.
+
 ================================================================================
 All changes above are only part of the development branch for the next release.
 ================================================================================
diff --git a/base/doc/ltnews.tex b/base/doc/ltnews.tex
index 9a8de244..6790c4ce 100644
--- a/base/doc/ltnews.tex
+++ b/base/doc/ltnews.tex
@@ -113,22 +113,11 @@
    \renewcommand{\@evenfoot}{\@indiciafont\@indicia\hfill --\thepage}%
 }
 
-\newcommand*{\MonthJanuary}{01}
-\newcommand*{\MonthFebruary}{02}
-\newcommand*{\MonthMarch}{03}
-\newcommand*{\MonthApril}{04}
-\newcommand*{\MonthMay}{05}
-\newcommand*{\MonthJune}{06}
-\newcommand*{\MonthJuly}{07}
-\newcommand*{\MonthAugust}{08}
-\newcommand*{\MonthSeptember}{09}
-\newcommand*{\MonthOctober}{10}
-\newcommand*{\MonthNovember}{11}
-\newcommand*{\MonthDecember}{12}
 \newcommand*{\printissue}{%
   Issue %
   \texorpdfstring{\number\value{issue}}{\theissue}, %
-  \texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}%
+  \texorpdfstring{\@month\space\@year\space(\publicationdate)}
+    {\@year/\@julianmonthtonum{\@month}}%
 }
 \let\l at part\l at section
 \let\l at section\l at subsection
@@ -303,6 +292,7 @@
   \loop
   \ifnum\value{issue}<\lastissue
     \stepcounter{issue}%
+    \publicationday{01}%
     \input{ltnews\theissue}%
   \repeat
   \stepcounter{issue}%
diff --git a/base/doc/ltnews19.tex b/base/doc/ltnews19.tex
index 43d388b2..2558b7b9 100644
--- a/base/doc/ltnews19.tex
+++ b/base/doc/ltnews19.tex
@@ -36,6 +36,7 @@
 
 \usepackage{lmodern,url}
 
+\publicationday{24}
 \publicationmonth{September}
 \publicationyear{2009}
 
diff --git a/base/doc/ltnews20.tex b/base/doc/ltnews20.tex
index 89d166b4..aeab3fae 100644
--- a/base/doc/ltnews20.tex
+++ b/base/doc/ltnews20.tex
@@ -36,6 +36,7 @@
 
 \usepackage{lmodern,url}
 
+\publicationday{27}
 \publicationmonth{June}
 \publicationyear{2011}
 
diff --git a/base/doc/ltnews27.tex b/base/doc/ltnews27.tex
index 03c8c042..5c0d7fd8 100644
--- a/base/doc/ltnews27.tex
+++ b/base/doc/ltnews27.tex
@@ -35,6 +35,7 @@
 
 \usepackage{lmodern,url,hologo}
 
+\publicationday{15}
 \publicationmonth{April}
 \publicationyear{2017}
 
diff --git a/base/doc/ltnews31.tex b/base/doc/ltnews31.tex
index 8bb6e638..1dff7298 100644
--- a/base/doc/ltnews31.tex
+++ b/base/doc/ltnews31.tex
@@ -119,6 +119,7 @@
 \fi
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+\publicationday{02}
 \publicationmonth{February}
 \publicationyear{2020}
 
diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 04d1c25b..51785683 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -116,6 +116,7 @@
 \providecommand\tubcommand[1]{}
 \tubcommand{\input{tubltmac}}
 
+\publicationday{15}
 \publicationmonth{November}
 \publicationyear{2021}
 
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 453379cf..3fb6847d 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -122,6 +122,7 @@
 \providecommand\tubcommand[1]{}
 \tubcommand{\input{tubltmac}}
 
+% \publicationday{01} % change this if it's not released on 1st of a month
 \publicationmonth{June}
 \publicationyear{2023  --- DRAFT version for upcoming release}
 
diff --git a/base/ltnews.cls b/base/ltnews.cls
index 9271b56f..f55165d4 100644
--- a/base/ltnews.cls
+++ b/base/ltnews.cls
@@ -429,6 +429,30 @@
 \newcommand{\@year}{\ClassError{ltnews}
    {No \protect\publicationyear~given}\@eha}
 
+\newcommand{\publicationday}{\renewcommand{\@day}}
+\newcommand{\@day}{01} % most releases happen on 1st of a month
+
+\newcommand{\publicationdate}{%
+  % support draft ltnews, \publicationyear{2023 --- DRAFT ...}
+  \expandafter\@gobblenonyear\@year\@nil
+  -\@julianmonthtonum\@month-\two at digits\@day}
+
+\newcommand{\@julianmonthtonum}[1]{\@nameuse{@juliantonum#1}}
+\def\@juliantonumJanuary  {01}
+\def\@juliantonumFebruary {02}
+\def\@juliantonumMarch    {03}
+\def\@juliantonumApril    {04}
+\def\@juliantonumMay      {05}
+\def\@juliantonumJune     {06}
+\def\@juliantonumJuly     {07}
+\def\@juliantonumAugust   {08}
+\def\@juliantonumSeptember{09}
+\def\@juliantonumOctober  {10}
+\def\@juliantonumNovember {11}
+\def\@juliantonumDecember {12}
+
+\long\def\@gobblenonyear#1#2#3#4#5\@nil{#1#2#3#4}
+
 \newcommand{\publicationissue}{\renewcommand{\@issue}}
 \newcommand{\@issue}{\ClassError{ltnews}
    {No \protect\publicationissue~given}\@eha}
@@ -449,7 +473,8 @@
    \twocolumn[{%
       \parbox[t][7\baselineskip]{\textwidth}{%
          \@titlefont\@title\\[\medskipamount]
-         \normalfont\normalsize\issuename~\@issue, \@month~\@year
+         \normalfont\normalsize\issuename~\@issue,
+         \@month~\@year~(\publicationdate)%
       }%
    }]%
    \thispagestyle{titlepage}





More information about the latex3-commits mailing list.