texlive[72305] Master/texmf-dist: changelog (17sep24)
commits+karl at tug.org
commits+karl at tug.org
Tue Sep 17 21:54:22 CEST 2024
Revision: 72305
https://tug.org/svn/texlive?view=revision&revision=72305
Author: karl
Date: 2024-09-17 21:54:22 +0200 (Tue, 17 Sep 2024)
Log Message:
-----------
changelog (17sep24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/changelog/README.md
trunk/Master/texmf-dist/doc/latex/changelog/changelog.pdf
trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex
trunk/Master/texmf-dist/doc/latex/changelog/example.pdf
trunk/Master/texmf-dist/doc/latex/changelog/example.tex
trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty
Modified: trunk/Master/texmf-dist/doc/latex/changelog/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changelog/README.md 2024-09-17 19:54:14 UTC (rev 72304)
+++ trunk/Master/texmf-dist/doc/latex/changelog/README.md 2024-09-17 19:54:22 UTC (rev 72305)
@@ -2,12 +2,21 @@
[Available on CTAN as `changelog`][changelog]
-Changelogs are important. Unfortunately, there are few facilities
-for typesetting changelogs in LaTeX. `changelog` defines a `changelog`
+Changelogs are important. The `changelog` package defines a `changelog`
environment to make changelogs simple and intuitive.
Inspired by [keepachangelog.com].
+```latex
+\begin{changelog}[author=Rebecca Turner, simple, sectioncmd=\section*]
+\begin{version}[v=1.0.0, date=2018-12-28]
+ \item Cool features
+ \item Bug fixes
+\end{version}
+\shortversion{v=0.1.0, date=2018-10-25, changes=Initial beta}
+\end{changelog}
+```
+
File | Description
-----------------------------|-------------------------------
changelog.sty | The changelog package
Modified: trunk/Master/texmf-dist/doc/latex/changelog/changelog.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex 2024-09-17 19:54:14 UTC (rev 72304)
+++ trunk/Master/texmf-dist/doc/latex/changelog/changelog.tex 2024-09-17 19:54:22 UTC (rev 72305)
@@ -30,14 +30,13 @@
\author{Rebecca Turner\thanks{\email{rbt at sent.as}}}
\title{The \cl\ Package}
-\date{2.5.0 (2023/02/16)}
+\date{2.5.1 (2024/09/17)}
\begin{document}
\maketitle
\begin{abstract}
- Changelogs are important. Unfortunately, there are few facilities
- for typesetting changelogs in \LaTeX. \cl\ defines a |changelog|
- environment to make changelogs simple and intuitive.
+ Changelogs are important. \cl\ defines a |changelog|
+ environment to make writing changelogs declarative and easy.
For rationale, read \keepachangelog.
\end{abstract}
@@ -346,15 +345,27 @@
This is this package's actual changelog --- not an example!
\begin{changelog}[author=Rebecca Turner <\email{rbt at sent.as}>, section=false]
+\begin{version}[v=2.5.1, date=2024-09-17]
+\fixed
+ \item Fixed \href{https://github.com/9999years/latex-changelog/issues/13}{a
+ bug where a version with a date and no version number would display the
+ date twice}, like ``\textbf{2024-09-17} (2024-09-17)''. Now, the date will
+ correctly only be shown once.
+
+ \item Fixed a bug where a version with a version number but no date or author
+ would be indented.
+\end{version}
+
\begin{version}[v=2.5.0, date=2023-02-16]
\added
- \item Added the \cs{newchangelogsection} command to support custom
- sections.
+ \item Added the \cs{newchangelogsection} command to support custom
+ sections.
\item Added the |remark| and |remarks| keys to support custom remarks (like
``YANKED'') on versions.
\item Added the |\changelogremark| command, which renders the ``YANKED''
remark and other custom remarks.
\end{version}
+
\begin{version}[v=2.4.1, date=2023-02-14]
\changed
\item Converted the |changelog.sty| implementation to use the \ctan{expl3}
@@ -362,6 +373,7 @@
environment. I believe \ctan{expl3} is the future of programming in
\LaTeX, despite its verbosity.
\end{version}
+
\begin{version}[v=2.4.0, date=2020-09-02,
author={cmplstofB <\https{github.com/cmplstofB}>}]
\added
Modified: trunk/Master/texmf-dist/doc/latex/changelog/example.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/changelog/example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/changelog/example.tex 2024-09-17 19:54:14 UTC (rev 72304)
+++ trunk/Master/texmf-dist/doc/latex/changelog/example.tex 2024-09-17 19:54:22 UTC (rev 72305)
@@ -7,19 +7,30 @@
title=Example changelog]
\begin{version}
\critical
- \item A critical new feature
+ \item A critical new feature.
\added
- \item Really cool features
+ \item Really cool feature.
+ \item A second feature.
\end{version}
\begin{version}[date=2019-01-23, short]
- A version with only a date
+ A version with only a date.
\end{version}
+\begin{version}[date=2019-01-23]
+\added
+ \item A ``full'' version with only a date.
+\end{version}
+
\begin{version}[v=1.1.0, simple]
- \item A version with no date
+ \item A version with no date.
\end{version}
+\begin{version}[v=1.1.0, author=]
+\added
+ \item A version with no date or author.
+\end{version}
+
\begin{version}[v=1.0.3, remark=Remark, simple]
\item A version with a remark.
\end{version}
@@ -29,24 +40,24 @@
\end{version}
\begin{version}[v=1.0.1, yanked, simple]
- \item A version with a terrible bug
+ \item A version with a terrible bug.
\end{version}
\begin{version}[v=1.0.0, date=2018-10-26]
\added
- \item A cool feature
+ \item A cool feature.
\changed
- \item Some \textsc{api} detail
+ \item Some \textsc{api} detail.
\deprecated
- \item Something that was a bad idea in the first place
+ \item Something that was a bad idea in the first place.
\removed
- \item Something that was deprecated 3 versions ago
+ \item Something that was deprecated 3 versions ago.
\fixed
- \item A bug that would delete files instead of saving them
+ \item A bug that would delete files instead of saving them.
\security
- \item improved with addition of buffer bound checks
+ \item improved with addition of buffer bound checks.
\misc
- \item A change that doesn't fit into any other category
+ \item A change that doesn't fit into any other category.
\end{version}
\shortversion{v=0.1.0, date=2018-10-19,
Modified: trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty 2024-09-17 19:54:14 UTC (rev 72304)
+++ trunk/Master/texmf-dist/tex/latex/changelog/changelog.sty 2024-09-17 19:54:22 UTC (rev 72305)
@@ -1,5 +1,5 @@
\RequirePackage{expl3}
-\ProvidesExplPackage{changelog}{2023/02/16}{2.5.0}{Typesetting changelogs}
+\ProvidesExplPackage{changelog}{2024/09/17}{2.5.1}{Typesetting changelogs}
% Description: Provides the changelog environment for typesetting changelogs
% License: LPPL 1.3c
% Homepage: https://github.com/9999years/latex-changelog
@@ -210,24 +210,28 @@
{}
}
-\cs_set:Npn \changelog__short_version_define_date
+% Display the current version, which may be a version number, a date, or "Unreleased".
+\cs_set:Npn \changelog__display_version
{
- \tl_if_empty:NT \g__changelog_version_tl
+ \tl_if_empty:NTF \g__changelog_version_tl
{
\tl_if_empty:NTF \g__changelog_date_tl
{
- \tl_set:Nn \g__changelog_version_tl { \GetTranslation{changelog-Unreleased} }
+ \GetTranslation{changelog-Unreleased}
\tl_set:Nn \g__changelog_date_tl { \today }
}
{
- \tl_set_eq:NN \g__changelog_version_tl \g__changelog_date_tl
+ \tl_use:N \g__changelog_date_tl
}
}
+ {
+ \tl_use:N \g__changelog_version_tl
+ }
}
\cs_set:Npn \changelog__short_version_item
{
- \tl_use:N \g__changelog_version_tl
+ \changelog__display_version
\bool_if:NT \g__changelog_yanked_bool
{
\ \changelogyanked
@@ -247,12 +251,21 @@
\cs_set:Npn \changelog__short_version_author_date
{
+ % This might output nothing if there's no author and the date is being used
+ % as a version number, so make sure to `\leavevmode` to avoid a weird
+ % indent at the start of the item.
+ \mode_leave_vertical:
\tl_use:N \g__changelog_author_tl
\tl_if_empty:NF \g__changelog_date_tl
{
- \tl_if_empty:NF \g__changelog_author_tl
- { ~ }
- (\tl_use:N \g__changelog_date_tl)
+ % If no version number is given, the date is used instead, so we don't
+ % want to show the date twice.
+ \tl_if_empty:NF \g__changelog_version_tl
+ {
+ \tl_if_empty:NF \g__changelog_author_tl
+ { ~ }
+ (\tl_use:N \g__changelog_date_tl)
+ }
}
}
@@ -308,7 +321,6 @@
% environment
\cs_set:Npn \changelog__short_version
{
- \changelog__short_version_define_date
\bool_gset_true:N \g__changelog_seen_version_bool
\item[\changelog__short_version_item]
More information about the tex-live-commits
mailing list.