[latex3-commits] [git/LaTeX3-latex3-latex2e] newlabel: Merge branch 'develop' into newlabel (3021e9f6)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Dec 5 20:09:05 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : newlabel
Link       : https://github.com/latex3/latex2e/commit/3021e9f695e0d2342ec0b7b12d5221aca2fd9095

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

commit 3021e9f695e0d2342ec0b7b12d5221aca2fd9095
Merge: 7e9fb3cc 78484db7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Dec 5 20:09:05 2022 +0100

    Merge branch 'develop' into newlabel


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

3021e9f695e0d2342ec0b7b12d5221aca2fd9095
 .github/tl_packages                                |   1 +
 .github/workflows/cache.yaml                       |  21 +-
 .github/workflows/deploy.yaml                      |  21 +-
 .github/workflows/main.yaml                        |  21 +-
 base/README.md                                     |   2 +-
 base/changes.txt                                   |  45 ++++
 base/doc/ltnews37.tex                              |  67 +++++-
 base/doc/usrguide.tex                              |  25 +-
 base/latexrelease.dtx                              |  11 +-
 base/ltclass.dtx                                   |  23 +-
 base/ltcmd.dtx                                     |  46 ++--
 base/ltdefns.dtx                                   | 226 +++++++++++++++--
 base/ltfinal.dtx                                   |  34 ++-
 base/ltspace.dtx                                   |  16 +-
 base/ltvers.dtx                                    |   4 +-
 base/ltxdoc.dtx                                    |  11 +-
 base/testfiles-1run/github-0220.luatex.tlg         |   2 +-
 base/testfiles-1run/github-0220.tlg                |   2 +-
 .../{github-569.lvt => github-0569.lvt}            |   0
 .../{github-569.tlg => github-0569.tlg}            |   0
 .../{github-569b.lvt => github-0569b.lvt}          |   0
 .../{github-569b.tlg => github-0569b.tlg}          |   4 -
 .../{github-639.lvt => github-0639.lvt}            |   0
 .../{github-639.tlg => github-0639.tlg}            |   0
 base/testfiles-ltcmd/github-0963.lvt               |  75 ++++++
 base/testfiles-ltcmd/github-0963.tlg               | 131 ++++++++++
 base/testfiles-lthooks/ltcmdhooks-001.tlg          |   7 +
 base/testfiles-lthooks/lthooks-000.tlg             |   7 +
 base/testfiles-lthooks/lthooks-001.tlg             |  15 ++
 base/testfiles-lthooks/lthooks-002.tlg             |  15 ++
 base/testfiles-lthooks/lthooks-003.tlg             |   8 +
 base/testfiles-lthooks/lthooks-004.tlg             |   8 +
 base/testfiles-lthooks/lthooks-005.tlg             |   8 +
 base/testfiles-lthooks/lthooks-006.tlg             |   8 +
 base/testfiles-lthooks/lthooks-007.tlg             |  15 ++
 base/testfiles-lthooks/lthooks-008.tlg             |   8 +
 base/testfiles-lthooks/lthooks-009.tlg             |   7 +
 base/testfiles-lthooks/lthooks-011.tlg             |  28 +++
 base/testfiles-lthooks/lthooks-013.tlg             |   7 +
 base/testfiles-lthooks/lthooks-021.tlg             |   7 +
 base/testfiles-lthooks/lthooks-legacy.tlg          |   7 +
 base/testfiles-lthooks2/lthooks2-002.tlg           |   7 +
 base/testfiles-lthooks2/lthooks2-005.tlg           |  14 ++
 base/testfiles/github-0198.luatex.tlg              |   4 +-
 base/testfiles/github-0198.tlg                     |   4 +-
 base/testfiles/github-0238.luatex.tlg              |   2 +-
 base/testfiles/github-0238.tlg                     |   2 +-
 base/testfiles/github-0256.luatex.tlg              |   6 +-
 base/testfiles/github-0256.tlg                     |   6 +-
 base/testfiles/github-0415.luatex.tlg              |   2 +-
 base/testfiles/github-0415.tlg                     |   2 +-
 base/testfiles/github-0415.xetex.tlg               |   2 +-
 base/testfiles/github-0479-often.luatex.tlg        |   4 +
 base/testfiles/github-0479-often.tlg               |   4 +
 base/testfiles/github-0479-often.xetex.tlg         |   4 +
 base/testfiles/github-0504.luatex.tlg              |   2 +-
 base/testfiles/github-0504.tlg                     |   2 +-
 base/testfiles/github-0881a.tlg                    |   3 +-
 base/testfiles/github-0917+0958.luatex.tlg         |  27 +++
 base/testfiles/github-0917+0958.lvt                |  38 +++
 base/testfiles/github-0917+0958.tlg                |  24 ++
 base/testfiles/github-0962b.luatex.tlg             | 211 ++++++++++++++++
 base/testfiles/github-0962b.lvt                    |  38 +++
 base/testfiles/github-0962b.tlg                    | 189 +++++++++++++++
 base/testfiles/github-0967.lvt                     |  32 +++
 base/testfiles/github-0967.tlg                     |   9 +
 base/testfiles/tlb-filename-01.luatex.tlg          |   2 +-
 base/testfiles/tlb-filename-01.tlg                 |   2 +-
 .../tlb-latexrelease-rollback-003-often.luatex.tlg |   8 +
 .../tlb-latexrelease-rollback-003-often.tlg        |   8 +
 .../tlb-latexrelease-rollback-003-often.xetex.tlg  |   8 +
 ...tlb-latexrelease-rollback-2020-10-01.luatex.tlg |   4 +
 .../tlb-latexrelease-rollback-2020-10-01.tlg       |   4 +
 .../tlb-latexrelease-rollback-2020-10-01.xetex.tlg |   4 +
 ...tlb-latexrelease-rollback-2021-06-01.luatex.tlg |   4 +
 .../tlb-latexrelease-rollback-2021-06-01.tlg       |   4 +
 .../tlb-latexrelease-rollback-2021-06-01.xetex.tlg |   4 +
 ...tlb-latexrelease-rollback-2021-11-15.luatex.tlg |   4 +
 .../tlb-latexrelease-rollback-2021-11-15.tlg       |   4 +
 .../tlb-latexrelease-rollback-2021-11-15.xetex.tlg |   4 +
 ...tlb-latexrelease-rollback-2022-06-01.luatex.tlg |  47 ++--
 .../tlb-latexrelease-rollback-2022-06-01.lvt       |   5 +
 .../tlb-latexrelease-rollback-2022-06-01.tlg       |  47 ++--
 .../tlb-latexrelease-rollback-2022-06-01.xetex.tlg |  47 ++--
 ...tlb-latexrelease-rollback-2022-11-01.luatex.tlg |  31 +--
 .../tlb-latexrelease-rollback-2022-11-01.tlg       |  31 +--
 .../tlb-latexrelease-rollback-2022-11-01.xetex.tlg |  31 +--
 ...vt => tlb-latexrelease-rollback-2023-06-01.lvt} |   2 +-
 ...lg => tlb-latexrelease-rollback-2023-06-01.tlg} |   2 +
 base/testfiles/tlb-rollback-004-often.luatex.tlg   |   4 +
 base/testfiles/tlb-rollback-004-often.tlg          |   4 +
 base/testfiles/tlb-rollback-004-often.xetex.tlg    |   4 +
 base/testfiles/tlb-rollback-005.luatex.tlg         |   4 +
 base/testfiles/tlb-rollback-005.tlg                |   4 +
 base/testfiles/tlb-rollback-005.xetex.tlg          |   4 +
 base/update-ltcmd-tests.sh                         |   7 +-
 base/update-rollback-tests.sh                      |   2 +
 required/firstaid/build.lua                        |   1 +
 required/firstaid/changes.txt                      |   5 +
 .../latex2e-first-aid-for-external-files.dtx       |  26 +-
 required/firstaid/testfiles/firstaid-songs.lvt     |  17 ++
 required/firstaid/testfiles/firstaid-songs.tlg     | 267 +++++++++++++++++++++
 .../firstaid/testfiles/firstaid-songs.xetex.tlg    | 265 ++++++++++++++++++++
 103 files changed, 2189 insertions(+), 313 deletions(-)

diff --cc base/doc/ltnews37.tex
index 56dcb4a8,4ce8fccc..2a4c774a
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@@ -146,31 -146,40 +146,62 @@@
  
  \section{New or improved commands}
  
+ 
+ 
+ \subsection{Providing copy and show functions for environments}
+ 
+ To copy a command definition we have introduced \cs{NewCommandCopy} in
+ 2022.  This even allows you to copy commands that consist of several internal
+ components, such as robust commands or those with a complex signature.
+ To do the same with environments, e.g., to define the environment
+ \env{myitemize} to be equivalent to \env{itemize}, you can now write
+ \begin{verbatim}
+   \NewEnvironmentCopy{myitemize}{itemize}
+ \end{verbatim}
+ There are also \cs{Renew...}\ and \cs{Declare...}, which may be useful
+ depending on the circumstances.
+ 
+ In addition, we offer a \cs{ShowEnvironment} command, which displays the
+ \cs{begin} and \cs{end} code of the environment passed as an
+ argument. E.g., \verb=\ShowEnvironment{center}= results in the
+ following output:
+ \begin{verbatim}
+   > \begin{center}=environment:
+   > ->\trivlist \centering \item \relax .
+   <recently read> }
+   l. ...\ShowEnvironment{center}
+   > \end{center}:
+   > ->\endtrivlist .
+   <recently read> }
+   l. ...\ShowEnvironment{center}
+ \end{verbatim}
  %
- \githubissue{xxx}
+ \githubissue{963}
+ 
+ 
  
 +\subsection{Extension of the \cs{label} command}
 +
 +Previously, in standard \LaTeX{}, the \cs{label} command stored  into the
 +second argument of the \cs{newlabel} command in the \texttt{.aux} file two values: 
 +\cs{@currentlabel}, which normally contains the state of the current 
 +counter, and \cs{thepage} for the current page number.  \pkg{hyperref} and 
 +\pkg{nameref} patched the \cs{label} command to store five values: 
 +Additionally they save \cs{@currentlabelname}, which normally contains the 
 +current title text and can be retrieved with \cs{nameref} and 
 +\cs{@currentHref} which is the name of the destination needed to create an 
 +active link. The fifth argument was only used if external 
 +references were loaded with the \pkg{xr-hyper} package. 
 +
 +Starting with this release, the number of values have been unified. 
 +\cs{label} now writes a
 +\cs{newlabel} command containing five values in the second argument: 
 +\cs{@currentlabel}, \cs{thepage}, \cs{@currentlabelname}, 
 +\cs{@currentHref}. The fifth value is reserved for the kernel.
 +
 +Additionally a hook with the name \texttt{label} has been added. It is 
 +executed before the writing to the \texttt{.aux} file. Code using
 +the hook can refer to the label argument with \cs{label at name}. 
  
  \section{Code improvements}
  
diff --cc base/testfiles/github-0881a.tlg
index 3f1361dd,4f027ce6..eec4508c
--- a/base/testfiles/github-0881a.tlg
+++ b/base/testfiles/github-0881a.tlg
@@@ -22,9 -22,10 +22,10 @@@ LaTeX Font Info:    External font `cmex
  .\hbox(0.0+0.0)x0.0
  .\OT1/cmr/m/n/10 )
  .\glue 3.33333 plus 1.66666 minus 1.11111
 -.\write1{\newlabel{lower}{{1}{\thepage }}}
 +.\write1{\newlabel{lower}{{1}{\thepage }{}{}{}}}
  .\penalty 10000
  .\glue 0.0
+ .\glue 3.33333 plus 1.66666 minus 1.11111
  .\OT1/cmr/m/n/10 s
  .\OT1/cmr/m/n/10 e
  .\OT1/cmr/m/n/10 e





More information about the latex3-commits mailing list.