[latex3-commits] [git/LaTeX3-latex3-latex2e] gh943: more documentation (18ea5cfe)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Nov 3 23:36:08 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh943
Link       : https://github.com/latex3/latex2e/commit/18ea5cfe87f551d5ce6783e05f1f7eec4cfda9bf

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

commit 18ea5cfe87f551d5ce6783e05f1f7eec4cfda9bf
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Nov 3 23:36:08 2022 +0100

    more documentation


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

18ea5cfe87f551d5ce6783e05f1f7eec4cfda9bf
 base/changes.txt      |   5 ++
 base/doc.dtx          |  35 ++++----
 base/doc/ltnews.tex   |   2 +-
 base/doc/ltnews37.tex | 217 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 240 insertions(+), 19 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 0ae9b55c..57b7b34b 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -10,6 +10,11 @@ are not part of the distribution.
 All changes above are only part of the development branch for the next release.
 ================================================================================
 
+2022-11-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* doc.dtx: correctly handle \<space>  and allow it to be excluded
+	from the index (gh/943)
+
 #########################
 # 2022-11-01 Release
 #########################
diff --git a/base/doc.dtx b/base/doc.dtx
index d137038d..7678dce8 100644
--- a/base/doc.dtx
+++ b/base/doc.dtx
@@ -45,7 +45,7 @@
 %<+package>
 %<+package>\ProvidesPackage{doc}
 %<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb>  [2022/07/03 v3.0k
+%<+package|shortvrb>  [2022/11/03 v3.0l
 %<+package|shortvrb>   Standard LaTeX documentation package V3 (FMi)]
 %\catcode`\<=12
 %
@@ -3147,9 +3147,6 @@
 %
 % \begin{macro}{\short at macro}
 %
-% \fmi{this needs cleaning up too, the results in the index are
-% currently wrong for cases like `\cs{ }' and the like.}
-%
 % \changes{v1.5c}{1989/04/27}{Corrected bad bug by putting the
 %                         scan at allowedfalse macro before printing
 %                         the argument.}
@@ -3164,17 +3161,14 @@
 %    done by the |\ifnot at excluded| macro which assumes that the
 %    macro name is saved in |\macro at namepart|.  The character
 %    mustn't be stored with a special category code or exclusion from
-%    the index won't work, so we employ the case-changing trick used
-%    elsewhere.  Since the argument might be an active character,
-%    |\string| is used to normalize it.
+%    the index won't work, so we we use \cs{string} to normalize it
+%    the same way it is done there, i.e. everything ends up catcode 12
+%    except for the space character.
 % \changes{v2.0e}{1998/12/28}{Correctly use the case-changing trick.}
+% \changes{v3.0l}{2022/11/03}{No longer using the case-changing trick.}
 %    \begin{macrocode}
-\begingroup
-\catcode`\&=12
-\gdef\short at macro#1{\begingroup
-   \uccode`\&=\expandafter`\string#1%
-   \uppercase{\def\x{\def\macro at namepart{&}}}%
-   \expandafter\endgroup\x
+\def\short at macro#1{%
+   \edef\macro at namepart{\string#1}%
 %    \end{macrocode}
 %    Any indexing is then delegated to
 %    |\maybe at index@short at macro|. Depending on the actual character seen,
@@ -3197,7 +3191,6 @@
 %    cross-referencing is globally disabled.
 %    \begin{macrocode}
     \scan at allowedtrue }
-\endgroup
 %    \end{macrocode}
 % \end{macro}
 %
@@ -3441,7 +3434,6 @@
 \def \ShowIndexingState {
   \__doc_trace:x{Show~ doc~ indexing~ state:}
   \seq_show:N  \l__doc_donotindex_seq
-%  \tl_analysis_show:N\l__doc_donotindex_seq
   \prop_show:N \g__doc_idxtype_prop
 }
 %    \end{macrocode}
@@ -3637,10 +3629,12 @@
 %  \begin{macro}{\maybe at index@short at macro}
 %  \begin{macro}{\__doc_maybe_index_short:o}
 %    Single character macros are handled similarly but there the
-%    indexing is done by \cs{SpecialShortIndex}.
+%    indexing is done by \cs{SpecialShortIndex} and it is simpler
+%    because we know that the argument contains a string token not letters.
+% \changes{v3.0l}{2022/11/03}{We know the argument expands to a single string token}
 %    \begin{macrocode}
 \cs_new:Npn \__doc_maybe_index_short:o #1 {
-  \exp_args:Nf \__doc_maybe_index_aux:nN { \tl_to_str:o {#1} }
+  \exp_args:No \__doc_maybe_index_aux:nN #1
                                          \SpecialShortIndex
 }
 \cs_set_eq:NN \maybe at index@short at macro \__doc_maybe_index_short:o
@@ -3715,7 +3709,12 @@
           {\cs_to_str:N \^^M } {\def\reserved at a{ \string \space \actualchar }
                                 \def\reserved at b { \space }
                                 \let\reserved at c \@empty                          }
-          { }                  {\def\reserved at a{ \string \space \actualchar }
+%    \end{macrocode}
+%    With the fix for
+%    \verb*=\ = we now have to look for a real space to handle that command sequence.
+% \changes{v3.0l}{2022/11/03}{look for the right token}
+%    \begin{macrocode}
+          { ~ }                {\def\reserved at a{ \string \space \actualchar }
                                 \def\reserved at b { \space }
                                 \let\reserved at c \@empty                          }
           {\c_left_brace_str} { \def\reserved at a{ \bgroup \actualchar }
diff --git a/base/doc/ltnews.tex b/base/doc/ltnews.tex
index 8d45f77c..9a8de244 100644
--- a/base/doc/ltnews.tex
+++ b/base/doc/ltnews.tex
@@ -40,7 +40,7 @@
 \ProvidesFile{ltnews.tex}%
   [2022/06/10 v1.4e Master file for ltnews*.tex (LaTeX Project)]
 
-\providecommand*{\lastissue}{36}
+\providecommand*{\lastissue}{37}
 
 \InputIfFileExists{ltnews-lastissue.cfg}{}{}
 
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
new file mode 100644
index 00000000..656a7149
--- /dev/null
+++ b/base/doc/ltnews37.tex
@@ -0,0 +1,217 @@
+% \iffalse meta-comment
+%
+% Copyright 2021-2023
+% The LaTeX Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -——————————————
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%    https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews37.tex
+%
+% This is issue 37 of LaTeX News.
+
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+
+\documentclass{ltnews}
+
+%%  Maybe needed only for Chris' inadequate system:
+\providecommand\Dash {\unskip \textemdash}
+
+%% NOTE:  Chris' preferred hyphens!
+%%\showhyphens{parameters}
+%%  \hyphenation{because parameters parameter}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+\usepackage{multicol}
+\usepackage{color}
+
+\providecommand\hook[1]{\texttt{#1}}
+
+\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
+\providecommand\option[1]{\texttt{#1}}
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
+
+
+\providecommand\eTeX{\hologo{eTeX}}
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+\providecommand\MiKTeX{\hologo{MiKTeX}}
+\providecommand\CTAN{\textsc{ctan}}
+\providecommand\TL{\TeX\,Live}
+\providecommand\githubissue[2][]{\ifhmode\unskip\fi
+     \quad\penalty500\strut\nobreak\hfill
+     \mbox{\small\slshape(%
+       \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+          	    {github issue#1 #2}%
+           )}%
+     \par\smallskip}
+%% But Chris has to mostly disable \href for his TEXPAD app:
+%%  \def\href #1{}  % Only For Chris' deficient TeX engine
+
+% simple solution right now (just link to the first issue if there are more)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\providecommand\sxissue[1]{\ifhmode\unskip
+     \else
+       % githubissue preceding
+       \vskip-\smallskipamount
+       \vskip-\parskip
+     \fi
+     \quad\penalty500\strut\nobreak\hfill
+     \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+     \quad\penalty500\strut\nobreak\hfill
+     \mbox{\small\slshape(%
+       \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
+          	    {gnats issue #1/#2}%
+           )}%
+     \par}
+
+\let\cls\pkg
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\acro[1]{\textsc{#1}}
+
+\vbadness=1400  % accept slightly empty columns
+
+
+\makeatletter
+% maybe not the greatest design but normally we wouldn't have subsubsections
+\renewcommand{\subsubsection}{%
+   \@startsection      {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
+      {-1em}{\@subheadingfont\colonize}%
+}
+\providecommand\colonize[1]{#1:}
+\makeatother
+
+\let\finalvspace\vspace          % for document layout fixes
+
+% Undo ltnews's \verbatim at font with active < and >
+\makeatletter
+\def\verbatim at font{%
+  \normalsize\ttfamily}
+\makeatletter
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand\tubcommand[1]{}
+\tubcommand{\input{tubltmac}}
+
+\publicationmonth{November}
+\publicationyear{2022} %  --- DRAFT version for upcoming release}
+
+\publicationissue{37}
+
+\begin{document}
+
+\tubcommand{\addtolength\textheight{4.2pc}}   % only for TUB
+
+\maketitle
+{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
+\tableofcontents}
+
+\setlength\rightskip{0pt plus 3em}
+
+
+\medskip
+
+
+\section{Introduction}
+
+
+\section{New or improved commands}
+
+%
+\githubissue{xxx}
+
+\section{Code improvements}
+
+\subsection{\pkg{doc}: Index \texttt{\textbackslash\textvisiblespace} correctly}
+
+\emph{to write}
+%
+\githubissue{943}
+
+
+
+
+\section{Bug fixes}
+
+\section{Changes to packages in the \pkg{amsmath} category}
+
+\section{Changes to packages in the \pkg{graphics} category}
+
+\section{Changes to packages in the \pkg{tools} category}
+
+
+%\medskip
+
+\begin{thebibliography}{9}
+
+\fontsize{9.3}{11.3}\selectfont
+
+%\bibitem{37:blueprint} Frank Mittelbach and Chris Rowley:
+%  \emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\
+%  \url{https://latex-project.org/publications/indexbyyear/2020/}
+
+%\bibitem{37:source2e}
+%  \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+%  \url{https://latex-project.org/help/documentation/}
+
+%\bibitem{37:Lamport}
+%Leslie Lamport.
+%\newblock {\LaTeX}: {A} Document Preparation System: User's Guide and Reference
+%  Manual.
+%\newblock \mbox{Addison}-Wesley, Reading, MA, USA, 2nd edition, 1994.
+%\newblock ISBN 0-201-52983-1.
+%\newblock Reprinted with corrections in 1996.
+%
+%\bibitem{37:ltnews32} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} news 32}.\\
+%  \url{https://latex-project.org/news/latex2e-news/ltnews32.pdf}
+%
+%\bibitem{37:ltnews34} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} news 34}.\\
+%  \url{https://latex-project.org/news/latex2e-news/ltnews34.pdf}
+%
+%\bibitem{37:ltnews35} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} news 35}.\\
+%  \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
+%
+%\bibitem{37:fntguide} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} font selection}.\\
+%  \url{https://latex-project.org/help/documentation/}
+%
+%\bibitem{37:ltfilehook-doc} Frank Mittelbach, Phelype Oleinik, \LaTeX{}~Project~Team:
+%  \emph{The \texttt{\upshape ltfilehook} documentation}.\\
+%  Run \texttt{texdoc} \texttt{ltfilehook-doc} to view.
+\end{thebibliography}
+
+
+
+\end{document}





More information about the latex3-commits mailing list.