[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Gh531 (#726) (67969f4a)
GitHub
noreply at github.com
Mon Dec 13 17:41:19 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : develop
Link : https://github.com/latex3/latex2e/commit/67969f4a0c6e972789bfb2cce9c4e039257b9340
>---------------------------------------------------------------
commit 67969f4a0c6e972789bfb2cce9c4e039257b9340
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Dec 13 17:41:19 2021 +0100
Gh531 (#726)
* typos in the documentation of doc
* fix for #531
>---------------------------------------------------------------
67969f4a0c6e972789bfb2cce9c4e039257b9340
base/changes.txt | 8 +++++++-
base/doc.dtx | 35 +++++++++++++++++++++++++++--------
base/doc/ltnews35.tex | 16 ++++++++++++++++
3 files changed, 50 insertions(+), 9 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 668f1a80..6bead591 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,11 +6,17 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-12-12 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * doc.dtx (subsection[Dealing with the change history]):
+ Implement option recordchangedates to show dates in the change log
+ if that option is used (gh/531).
+
2021-12-11 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltdirchk.dtx (section{Initialization}):
Add comment lines into latex.ltx to indicate temp definitions that
- are later overwritten (gh/725)
+ are later overwritten (gh/725).
2021-12-10 David Carlisle <David.Carlisle at latex-project.org>
diff --git a/base/doc.dtx b/base/doc.dtx
index 74686a6b..e6b0e2cf 100644
--- a/base/doc.dtx
+++ b/base/doc.dtx
@@ -48,7 +48,7 @@
%<+beta>\ProvidesPackage{doc-v3beta}
%</package>
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2022/06/01 v3.0f
+%<+package|shortvrb> [2022/06/01 v3.0g
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -60,7 +60,7 @@
%
%
%% Package `doc' to use with LaTeX 2e
-%% Copyright (C) 1989-2020 Frank Mittelbach, all rights reserved.
+%% Copyright (C) 1989-2022 Frank Mittelbach, all rights reserved.
%
%
% Version: Date: Changes:
@@ -384,6 +384,7 @@
%\DisableCrossrefs % Say \DisableCrossrefs if index is ready
\CodelineIndex
\RecordChanges % Gather update information
+\SetupDoc{reportchangedates}
%\OnlyDescription % comment out for implementation details
\setlength\hfuzz{15pt} % don't show so many
\hbadness=7000 % over- and underfull box warnings
@@ -415,6 +416,7 @@
% \DescribeOption[noprint]{debugshow}
% \DescribeOption[noprint]{noindex}
% \DescribeOption[noprint]{noprint}
+% \DescribeOption[noprint]{reportchangedates}
% \begin{description}
% \item[\opt{hyperref}, \opt{nohyperref}] Boolean (default \texttt{true}). Load the
% \pkg{hyperref} package and make index references to code lines
@@ -430,14 +432,17 @@
% various tracing information at the terminal and in the transcript
% file. In particular show which elements are indexed.
%
-% \item[\opt{noindex}] Boolean (default \texttt{false}). If set all
+% \item[\opt{noindex}] Boolean (default \texttt{false}). If set, all
% automatic indexing is suppressed. This option can also be used on
% individual elements as described below.
%
-% \item[\opt{noprint}] Boolean (default \texttt{false}). If set then
+% \item[\opt{noprint}] Boolean (default \texttt{false}). If set, then
% printing of element names in the margin will be suppressed. This
% option can also be used on individual elements as described
% below.
+% \item[\opt{reportchangedates}] Boolean (default \texttt{false}). If
+% set, then change entries list the date after the version number in
+% the change log.
% \end{description}
%
% \DescribeInterfaceMacro{\SetupDoc} Instead of providing options to the \DOC
@@ -938,7 +943,8 @@
% referenced indirectly, by the macro |\verbatimchar|. It expands
% by default to \verb?+? but if your code lines contain macros with
% `\texttt{+}' characters in their names (e.g.\ when you use \verb?\+?)
-% then that caused a problem because you ended up with an an index entry containing \verb?\verb+\++?
+% then that caused a problem because you ended up with an
+% index entry containing \verb?\verb+\++?
% which will be typeset as `\verb+\++' and not as `\verb?\+?'.
% \NewIn{v3}
% In version 3 this is now automatically taken care of (with the help
@@ -1911,13 +1917,14 @@
% \end{macrocode}
% Some keys are available as options for use in \cs{usepackage} some are
% for the generated item \api's:
-% \fmi{cleanup documentation (and code)}
+% \fmi{cleanup documentation (and code once the new key interface is there)}
% \begin{macrocode}
\newif \ifdoc at noprint
\newif \ifdoc at noindex
\newif \ifdoc at hyperref \doc at hyperreftrue
\newif \ifdoc at multicol \doc at multicoltrue
\newif \ifdoc at debugshow
+\newif \ifdoc at reportchangedates
\keys_define:nn {doc}
{
noprint .choice:,
@@ -1948,6 +1955,10 @@
debugshow / true .code:n = { \legacy_if_set_true:n { doc at debugshow } },
debugshow / false .code:n = { \legacy_if_set_false:n { doc at debugshow } },
debugshow .default:n = { true },
+ reportchangedates .choice:,
+ reportchangedates / true .code:n = { \legacy_if_set_true:n { doc at reportchangedates } },
+ reportchangedates / false .code:n = { \legacy_if_set_false:n { doc at reportchangedates } },
+ reportchangedates .default:n = { true },
}
% \end{macrocode}
% This one is for \cs{usepackage} and \cs{NewDocElement}:
@@ -3535,7 +3546,7 @@
{\string\RecordIndexTypeAux {\string#1 }{#2} }
}
% \end{macrocode}
-% When we execute this code from the \texttt{.aux} we we better not
+% When we execute this code from the \texttt{.aux} we better not
% generate a new line in the \texttt{.aux}. Otherwise those would
% cumulate over time.
% \begin{macrocode}
@@ -4429,7 +4440,15 @@
\catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
\changes@}
\def\changes@#1#2#3{%
- \protected at edef\@tempa{\noexpand\glossary{#1\levelchar
+ \protected at edef\@tempa{\noexpand\glossary{#1%
+% \end{macrocode}
+% If asked for we also show the date of in the change log (after
+% the version).
+% \changes{v3.0g}{2022/06/01}{Show change dates if asked for (gh/531)}
+% \begin{macrocode}
+ \ifdoc at reportchangedates
+ \space -- #2\fi
+ \levelchar
% \end{macrocode}
% \changes{v1.9u}{1995/08/06}{Use value of \cs{saved at macroname} to
% find out about change entries at outer level}
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index faaa69e7..d4c9edd4 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -230,6 +230,22 @@ issues with older documentation using \pkg{doc} a simple and quick
solution is to load the package as follows:
\verb/\usepackage{doc}[=v2]/
+\subsection{\pkg{doc} can now show dates in change log}
+
+Up to now the change log was always sorted by version numbers
+(ignoring the date that was given in the \cs{changes} command). It
+can now be sorted by both version and date if you specify the option
+\option{reportchangedates} on package level and in that case the
+changes are displayed with
+\begin{quote}
+ \meta{version} -- \meta{date}
+\end{quote}
+as the heading (instead of just \meta{version}), when using
+\cs{PrintChanges}.
+%
+\githubissue{gh/531}
+
+
\subsection{Lua\TeX\ callback improvements}
More information about the latex3-commits
mailing list.