diff options
Diffstat (limited to 'macros/latex/contrib/changelog')
-rw-r--r-- | macros/latex/contrib/changelog/README.md | 13 | ||||
-rw-r--r-- | macros/latex/contrib/changelog/changelog.pdf | bin | 54725 -> 55176 bytes | |||
-rw-r--r-- | macros/latex/contrib/changelog/changelog.sty | 32 | ||||
-rw-r--r-- | macros/latex/contrib/changelog/changelog.tex | 24 | ||||
-rw-r--r-- | macros/latex/contrib/changelog/example.pdf | bin | 17624 -> 17536 bytes | |||
-rw-r--r-- | macros/latex/contrib/changelog/example.tex | 35 |
6 files changed, 74 insertions, 30 deletions
diff --git a/macros/latex/contrib/changelog/README.md b/macros/latex/contrib/changelog/README.md index ab16196d1e..6b7d251083 100644 --- a/macros/latex/contrib/changelog/README.md +++ b/macros/latex/contrib/changelog/README.md @@ -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 diff --git a/macros/latex/contrib/changelog/changelog.pdf b/macros/latex/contrib/changelog/changelog.pdf Binary files differindex c80cec01db..f0e2277664 100644 --- a/macros/latex/contrib/changelog/changelog.pdf +++ b/macros/latex/contrib/changelog/changelog.pdf diff --git a/macros/latex/contrib/changelog/changelog.sty b/macros/latex/contrib/changelog/changelog.sty index 4c95edd805..b58e33479a 100644 --- a/macros/latex/contrib/changelog/changelog.sty +++ b/macros/latex/contrib/changelog/changelog.sty @@ -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] diff --git a/macros/latex/contrib/changelog/changelog.tex b/macros/latex/contrib/changelog/changelog.tex index f4d0706350..9c949501fc 100644 --- a/macros/latex/contrib/changelog/changelog.tex +++ b/macros/latex/contrib/changelog/changelog.tex @@ -30,14 +30,13 @@ \author{Rebecca Turner\thanks{\email{rbt@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 @@ an email} and I'll incorporate the translation into \cl's next release! This is this package's actual changelog --- not an example! \begin{changelog}[author=Rebecca Turner <\email{rbt@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 @@ This is this package's actual changelog --- not an example! 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 diff --git a/macros/latex/contrib/changelog/example.pdf b/macros/latex/contrib/changelog/example.pdf Binary files differindex 110ae72c38..d31f6729c8 100644 --- a/macros/latex/contrib/changelog/example.pdf +++ b/macros/latex/contrib/changelog/example.pdf diff --git a/macros/latex/contrib/changelog/example.tex b/macros/latex/contrib/changelog/example.tex index 9db61a2ea7..8b1557ee92 100644 --- a/macros/latex/contrib/changelog/example.tex +++ b/macros/latex/contrib/changelog/example.tex @@ -7,17 +7,28 @@ 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] @@ -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, |