diff options
author | Norbert Preining <norbert@preining.info> | 2024-11-01 03:03:46 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-11-01 03:03:46 +0000 |
commit | fef969d9c6d08b0ca51b3d8bb3f5edc9bab7df63 (patch) | |
tree | 9bf73cbbb953f647f0e79ed9da5a736e13959319 /macros/latex | |
parent | 55972afbe03e8a6a517c3f08142ebfc734cb10b7 (diff) |
CTAN sync 202411010303
Diffstat (limited to 'macros/latex')
246 files changed, 4642 insertions, 1260 deletions
diff --git a/macros/latex/base/README.md b/macros/latex/base/README.md index ca90c13852..376ec9e98a 100644 --- a/macros/latex/base/README.md +++ b/macros/latex/base/README.md @@ -1,7 +1,7 @@ The LaTeX kernel ================ -Release 2024-06-01 patch level 2 +Release 2024-11-01 Overview -------- @@ -29,8 +29,7 @@ Documentation Full documentation of the LaTeX system is provided by - _LaTeX: A Document Preparation System_; Lamport, Addison-Wesley -- _The LaTeX Companion_, 2ed; Mittelbach and Goossens with Braams, Carlisle - and Rowley, Addison-Wesley +- _The LaTeX Companion_, 3ed; Mittelbach and Fischer, Addison-Wesley - _Guide to LaTeX_, 4ed; Kopka and Daly, Addison-Wesley The distribution is described in files ending `.txt` or `.md`; briefly, @@ -56,7 +55,7 @@ The following files contain further information: - `ltx3info.tex` gives you some historical information about the LaTeX3 project - `lamport-manual.err` lists errata in _LaTeX: A Document Preparation System_ (Lamport) -- `tlc2.err` lists errata in _The LaTeX Companion_ (Mittelbach et al.) +- `tlc3.err` lists errata in _The LaTeX Companion, 3rd edition_ (Mittelbach and Fischer) The files `ltnews*.tex` (part of the `doc` bundle) contain the LaTeX newsletters, the highest number being the most recent. @@ -87,6 +86,6 @@ version 1.3c or later. ----- -<p>Copyright (C) 1989-2023 The LaTeX Project <br /> +<p>Copyright (C) 1989-2024 The LaTeX Project <br /> <a href="http://latex-project.org/">http://latex-project.org/</a> <br /> All rights reserved.</p> diff --git a/macros/latex/base/alltt.dtx b/macros/latex/base/alltt.dtx index 4718c004b4..8fd4ac2db3 100644 --- a/macros/latex/base/alltt.dtx +++ b/macros/latex/base/alltt.dtx @@ -40,7 +40,7 @@ %<package>\ProvidesPackage{alltt} %<driver>\ProvidesFile{alltt.drv} %\ProvidesFile{alltt.dtx} - [2024/02/08 v2.0g defines alltt environment] + [2024/07/07 v2.0g defines alltt environment] % %<*driver> \documentclass{ltxdoc} @@ -83,7 +83,7 @@ % Here are some things you may want to do in an \Lenv{alltt} % environment: % \begin{itemize} -% \item Change fonts--e.g., by typing |{\em emphasized text\/}| +% \item Change fonts--e.g., by typing |\emph{emphasized text}| % % \item Insert text from a file \file{foo.tex} by typing % |\input{foo}|. Beware that each |<return>| starts a new line, so diff --git a/macros/latex/base/alltt.pdf b/macros/latex/base/alltt.pdf Binary files differindex 13525909fa..f50f7095ba 100644 --- a/macros/latex/base/alltt.pdf +++ b/macros/latex/base/alltt.pdf diff --git a/macros/latex/base/cfgguide.pdf b/macros/latex/base/cfgguide.pdf Binary files differindex a36395f1d8..bb5aec2776 100644 --- a/macros/latex/base/cfgguide.pdf +++ b/macros/latex/base/cfgguide.pdf diff --git a/macros/latex/base/changes.txt b/macros/latex/base/changes.txt index 4e378a6a5b..6321cf6fd8 100644 --- a/macros/latex/base/changes.txt +++ b/macros/latex/base/changes.txt @@ -11,6 +11,235 @@ All changes above are only part of the development branch for the next release. ================================================================================ ######################### +# 2024-11-01 Release +######################### + +2024-10-29 Yukai Chou <muzimuzhi@gmail.com> + * lthooks.dtx (subsection{Setting rules for hooks code}): + Skip mapping over undeclared \g__hook_<hook>_code_prop (gh/1513). + +2024-10-27 Marcel Krüger <Marcel.Krueger@latex-project.org> + * lttagging.dtx + Change tagging sockets with two arguments to drop the first argument + but return the second argument when the socket is disabled with \SuspendTagging. + Add expandable versions of tagging socket use commands. + * ltsocket.dtx + Add expandable versions of \socket_use_expandable:n. + Make internal plug definitions non-protected to allow expandable use. + +2024-10-26 Yukai Chou <muzimuzhi@gmail.com> + * ltcounts.dtx (subsection{Environment Counter Macros}): + Fully expand counter name in \theH<counter> commands (gh/1508) + +2024-10-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + * doc.dtx: + A rollback comment leaked into the documentation (gh1418) + +2024-10-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + * ltcmdhooks.dtx: + Some clarification why not all + commands allow generic cmd hooks (gh/1091, gh/1430 and gh/1501) + +2024-10-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * ltshipout.dtx: correct documentation (gh/1470). + + 2024-10-21 Matthew Bertucci <bertucci@math.utah.edu> + * lthooks.dtx + Define \IfHookEmptyT, \IfHookEmptyF + * ltmarks.dtx + Define \IfMarksEqualT, \IfMarksEqualF + * ltproperties.dtx + Define \IfPropertyRecordedT, \IfPropertyRecordedF + +2024-10-18 Clea Rees <reesc21@cf.ac.uk> + * lttextcomp.dtx + Fix typo in \ProvidesFile + +2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org> + * ltmiscen.dtx + Define \begin as an engine-protected macro + +2024-10-07 Joseph Wright <Joseph.Wright@latex-project.org> + * lttemplates.dtx + Correct passing of token list content using \KeyValue + +2024-10-02 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: restore also paratagging in the para/restore socket, + see https://github.com/latex3/tagging-project/issues/723 + +2024-09-25 Matthew Bertucci <bertucci@math.utah.edu> + * ltproperties.dtx: Fix definitions for \IfLabelExistsT and \IfLabelExistsF + +2024-09-17 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: dummy for \tag_suspend:n and \tag_resume:n + * lttagging.dtx: declare tagging sockets for floats and caption. + +2024-09-21 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + + * ltcounts.dtx (subsection{Environment Counter Macros}): + extend \@definecounter and \@addtoreset so that they define also \theH<counter> + * ltxref.dtx (subsection{Cross Referencing}): + Use sockets in \refstepcounter for target and tagging support. + * ltmeta.dtx: move patches and change of \MakeLinkTarget from latex-lab. + * lttagging.dtx: add tagging socket for targets. + +2024-09-15 Joseph Wright <Joseph.Wright@latex-project.org> + * lttemplates-doc.tex, lttemplates-code.tex: + New files + * clsguide.tex + Link to template documentation + +2024-09-12 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * ltproperties.dtx: remove @filesw-test in \__property_record:nn, + see https://github.com/latex3/tagging-project/issues/696 + +2024-09-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * lterror.dtx (subsection{Specific errors}): + Add error message "Not allowed in LR mode" + +2024-09-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * ltspace.dtx (subsection{Vertical spacing}): + Drop unnecessary \@noitemerr in \addvspace and \addpenalty and + instead generate \@parmodeerr if we are in restricted hmode (gh/1460) + Also use \protected definitions for them. + +2024-09-03 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * ltlength.dtx: suspend tagging in \@settodim + +2024-09-03 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * fontdef.dtx: preload t1cmss.fd and t1cmtt.fd + +2024-09-02 Joseph Wright <Joseph.Wright@latex-project.org> + + * clsguide.tex: + Document \IfPackageLoadedTF, \IfPackageAtLeastTF, etc. + +2024-08-12 Joseph Wright <Joseph.Wright@latex-project.org> + + * ltluatex.dtx: + Allow for missing version string in Lua modules (gh/1443) + +2024-08-09 Yukai Chou <muzimuzhi@gmail.com> + * lthooks.dtx: (subsection{Parsing a label}) + Raise different errors for empty label and empty hook (gh/1423) + +2024-08-03 Yukai Chou <muzimuzhi@gmail.com> + * ltclass.dtx (section{Package/class rollback mechanism}): + Add selected release to the file list (gh/1413) + +2024-08-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * letter.dtx (subsection{The generic letter commands}): + Alter sample address in documentation (gh/1439) + +2024-08-10 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: reset flattened level in para/restore + +2024-07-27 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: (subsection{Tagging support for table/tabular packages}): + Two sockets added to store and restore cell data when nesting tables to keep track + of multirow settings. + +2024-07-27 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: (subsection{Paragraph sockets}): A socket and plug to restore paragraph + setting added. + +2024-07-23 Yukai Chou <muzimuzhi@gmail.com> + + * ltclass.dtx (section{Implementation}): + Trim spaces from unused option added by \OptionNotUsed (gh/1238) + +2024-07-13 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * lttagging.dtx: (subsection{Tagging sockets}): toc-related tagging sockets added. + +2024-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * lttagging.dtx (subsection{Tagging support for table/tabular packages}): + Sockets for \cs{cline} leaders added (tagging/134) + +2024-07-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * ltmiscen.dtx (subsection{Environments}): + Drop code chunks before adding them to avoid duplication in + rollback (gh/1407) + +2024-07-06 Yukai Chou <muzimuzhi@gmail.com> + + * ltcmd.dtx (subsection{User functions}): + Trim spaces for envname before existence check (gh/1399) + (subsection{Declaring commands and environments}): + Simplify \__cmd_declare_env:nnnn, use space-trimmed envname directly + +2024-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * ltlists.dtx: + Changes to \@doendpe, \@endpefalse, and \@endpetrue for + new @endpe handling. \if@endpe is now a global switch and + migration out of groups is handled via \aftergroup + + * ltmiscen.dtx (subsection{Environments}): + Adjust \end<space> for new @endpe handling + + * ltboxes.dtx (section{\LaTeX\ Box commands}): + Adjust \color@endgroup for new @endpe handling + +2024-06-19 David Carlisle <David.Carlisle@latex-project.org> + + * fontdef.dtx: + preload ts1cmr.fd in Unicode engines + +2024-06-19 Joseph Wright <Joseph.Wright@latex-project.org> + * ltkeys.dtx, clsguide.tex + Ensure only key name is stored for option handling + +2024-06-19 Joseph Wright <Joseph.Wright@latex-project.org> + * ltkeys.dtx, clsguide.tex + Refactor class option code + Add mechanism to exclude class options from package processing + +2024-06-17 David Carlisle <David.Carlisle@latex-project.org> + + * ltfssbas.dtx: set \tracinglostchars in \showhyphens. gh/1380 + +2024-06-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * lthooks.dtx: + Clarify syntax of hook names and behavior of hook rules and default + hook rules (gh/1227 & gh/1237) + +2024-06-04 Yukai Chou <muzimuzhi@gmail.com> + + * ltclass.dtx (section{Package/class rollback mechanism}): + Add new argument \pkgcls@ext for use in warning message which might + be raised before the classic \@currext can be set and used (gh/870) + + * ltclass.dtx: + Extend \@cls@pkg to expand to "file" if \@currext is neither "cls" + nor "pkg" + +2024-06-04 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * doc.dtx (section{Integrating hypdoc}): + Use hooks to save and restore definitions when hypdoc gets loaded. + This way the user can still alter \PrintDescribeMacro, etc. in the preamble + (gh/1000) + +2024-06-04 Joseph Wright <Joseph.Wright@latex-project.org> + + * ltluatex.dtx: + Mark "v" in provides_module() when logging version string + +2024-06-04 Yukai Chou <muzimuzhi@gmail.com> + + * source2e.tex: + Add new module lttemplates to the documentation. + + * lttemplates.dtx: + Fix markup typos. + +######################### # 2024-06-01 PL2 Release ######################### @@ -69,7 +298,7 @@ All changes above are only part of the development branch for the next release. 2024-04-26 Frank Mittelbach <Frank.Mittelbach@latex-project.org> * doc.dtx: - Do not error with "suspicous date" when rolling back to + Do not error with "suspicious date" when rolling back to early years of LaTeX2e (gh/1336) 2024-04-24 Yukai Chou <muzimuzhi@gmail.com> diff --git a/macros/latex/base/classes.dtx b/macros/latex/base/classes.dtx index f7c53f0f71..ce3d902b21 100644 --- a/macros/latex/base/classes.dtx +++ b/macros/latex/base/classes.dtx @@ -53,7 +53,7 @@ %<*driver> \ProvidesFile{classes.drv} %</driver> - [2024/02/08 v1.4n + [2024/06/29 v1.4n %<article|report|book> Standard LaTeX document class] %<10pt|11pt|12pt> Standard LaTeX file (size option)] % \end{macrocode} @@ -257,7 +257,7 @@ % % \begin{macro}{\@ptsize} % This control sequence is used to store the second digit of the -% pointsize we are typesetting in. So, normally, it's value is one +% pointsize we are typesetting in. So, normally, its value is one % of 0, 1 or 2. % \begin{macrocode} %<*article|report|book> @@ -362,7 +362,7 @@ % with other packages that use the |\@ptsize| variable to select % special actions. It makes the declarations of size options less % than 10pt difficult, although one can probably use \texttt{9} -% and \texttt{8} assuming that a class wont define both +% and \texttt{8} assuming that a class won't define both % \Lopt{8pt} and \Lopt{18pt} options. % % \begin{macrocode} @@ -3122,7 +3122,7 @@ % % \subsubsection{Theorem} % -% This document class does not define it's own theorem environments, +% This document class does not define its own theorem environments, % the defaults, supplied by the \LaTeX{} format are available. % % \subsubsection{Titlepage} @@ -3130,12 +3130,12 @@ % \begin{environment}{titlepage} % In the normal environments, the titlepage environment does nothing % but start and end a page, and inhibit page numbers. When \LaTeX\ is -% in two-column mode, the environmont temporarily switches to +% in two-column mode, the environment temporarily switches to % one-column mode. % In the report class, it also resets the page number to one, and % then, in two-column mode, sets it back to one at the end. % For the book class the environment makes sure that the title page -% is on a recto page by issueing a \cs{cleardouplepage}-command. +% is on a recto page by issuing a \cs{cleardoublepage}-command. % In compatibility mode, it sets the page number to zero. This is % incorrect since it results in using the page parameters for a % right-hand page but it is the way it was. diff --git a/macros/latex/base/classes.pdf b/macros/latex/base/classes.pdf Binary files differindex e9df921fdb..340517f6f4 100644 --- a/macros/latex/base/classes.pdf +++ b/macros/latex/base/classes.pdf diff --git a/macros/latex/base/clsguide-historic.pdf b/macros/latex/base/clsguide-historic.pdf Binary files differindex 1bfa17001d..632ded7a9b 100644 --- a/macros/latex/base/clsguide-historic.pdf +++ b/macros/latex/base/clsguide-historic.pdf diff --git a/macros/latex/base/clsguide.pdf b/macros/latex/base/clsguide.pdf Binary files differindex 7bc4b5505c..e0018a1b04 100644 --- a/macros/latex/base/clsguide.pdf +++ b/macros/latex/base/clsguide.pdf diff --git a/macros/latex/base/clsguide.tex b/macros/latex/base/clsguide.tex index 6b9e49c4e8..e7adc9da38 100644 --- a/macros/latex/base/clsguide.tex +++ b/macros/latex/base/clsguide.tex @@ -42,7 +42,7 @@ \texttt{clsguide.tex} for full details.}% } -\date{2024-05-24} +\date{2024-09-15} \NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}} \NewDocumentCommand\marg{m}{\arg{#1}} @@ -76,13 +76,13 @@ information for general \LaTeX{} users on up-to-date approaches to creating commands, etc. \section{Writing classes and packages} -\label{Sec:writing} +\label{sec:writing} This section covers some general points concerned with writing \LaTeX{} classes and packages. \subsection{Is it a class or a package?} -\label{Sec:classorpkg} +\label{sec:classorpkg} The first thing to do when you want to put some new \LaTeX{} commands in a file is to decide whether it should be a \emph{document class} or a @@ -211,7 +211,7 @@ introduction to the approach is provided at \url{https://www.alanshawn.com/latex3-tutorial/}. \subsection{Box commands and color} -\label{Sec:color} +\label{sec:color} Even if you do not intend to use color in your own documents, by taking note of the points in this section you can ensure that your class or package is @@ -243,14 +243,14 @@ regions of the page such as captions or section headings to the `main document color'. \subsection{General style} -\label{Sec:general} +\label{sec:general} \LaTeX{} provides many commands designed to help you produce well-structured class and package files that are both robust and portable. This section outlines some ways to make intelligent use of these. \subsubsection{Loading other files} -\label{Sec:loading} +\label{sec:loading} \LaTeX{} provides these commands: \begin{verbatim} @@ -331,9 +331,9 @@ example the University of Nowhere classes might begin with |unw|. This helps to avoid every University having its own thesis class, all called |thesis.cls|. If you rely on some features of the \LaTeX{} kernel, or on a package, -please specify the release-date you need. For example, the package -error commands were introduced in the June 2022 release so, if you use -them then you should put: +please specify the release-date you need. For example, the keyval +options (see Section~\ref{sec:opt:keyval}) were introduced in the June +2022 release so, if you use them then you should put: \begin{verbatim} \NeedsTeXFormat{LaTeX2e}[2022-06-01] \end{verbatim} @@ -351,7 +351,7 @@ the interface for using these is described in \texttt{lthooks}. There are also hooks to apply to files, described in \texttt{ltfilehooks}. \section{The structure of a class or package} -\label{Sec:structure} +\label{sec:structure} The outline of a class or package file is: \begin{description} @@ -366,7 +366,8 @@ The outline of a class or package file is: declaring new variables, commands and fonts; and loading other files. \end{description} -\subsection{Identification} +\subsection{Identification% + \label{sec:ID}} The first thing a class or package file does is identify itself. Package files do this as follows: @@ -389,12 +390,14 @@ For example: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{article}[2022-06-01 Standard LaTeX class] \end{verbatim} -The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' and must be -present if the optional argument is used (this is also true for the -|\NeedsTeXFormat| command). Any derivation from this syntax will result in -low-level \TeX{} errors---the commands expect a valid syntax to speed up the -daily usage of the package or class and make no provision for the case that the -developer made a mistake! +The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' or +`\textsc{yyyy/mm/dd}' and must be present if the optional argument is used. +Exactly four digits are required for the year and two each for the month and +day. Where necessary, zeros should be added to pad the month and day +appropriately. If digits or separators are missing, the date will likely be +misinterpreted: the commands expect a valid syntax to speed up the routine usage +of the package or class and make no provision for the case there is an error +in the date specification. This date is checked whenever a user specifies a date in their |\documentclass| or |\usepackage| command. For example, if you wrote: @@ -467,7 +470,7 @@ the \LaTeX{} source: declaration of options first then processing options in a second step. Both also allow options to be passed on to other packages or an underlying class. As the `classical' simple text approach is conceptually more straight-forward to illustrate, it is used here to show the general structure: -see Section~\ref{Sec:opt:keyval} for full details of the key--value approach. +see Section~\ref{sec:opt:keyval} for full details of the key--value approach. An option is declared as follows: \begin{verbatim} @@ -513,7 +516,7 @@ option is used. This can be done by writing: It is possible to pass options on to another package or class, using the command |\PassOptionsToPackage| or |\PassOptionsToClass| (note that this is a specialised operation that works only for option names): see -Section~\ref{Sec:opmove}. For example, to pass every unknown option on to the +Section~\ref{sec:opmove}. For example, to pass every unknown option on to the |article| class, you can use: \begin{verbatim} \DeclareOption*{% @@ -529,7 +532,7 @@ To process the options with which the file was called, you should use: \ProcessOptions\relax \end{verbatim} This executes the \m{code} for each option that was both specified and declared -(see Section~\ref{Sec:commands.options} for details of how this is done). +(see Section~\ref{sec:commands.options} for details of how this is done). For example, if the |jane| package file contains: \begin{verbatim} @@ -656,7 +659,7 @@ issue numbers, authors of articles, page styles and so on; but this skeleton gives a start. The |ltnews| class file is not much more complex than this one. \section{Commands for class and package writers} -\label{Sec:commands} +\label{sec:commands} This section describes briefly each of the commands for class and package writers. To find out about other aspects of the system, @@ -675,8 +678,10 @@ This command tells \TeX{} that this file should be processed using a format with name \m{format-name}. You can use the optional argument \m{release-date} to further specify the earliest release date of the format that is needed. When the release date of the format is older than the one specified a warning will -be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The date, if -present, must be in the form \textsc{yyyy-mm-dd}. +be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The +\meta{release-date}, if +present, must be in the form `\textsc{yyyy-mm-dd}' or +`\textsc{yyyy/mm/dd}'. Example: \begin{verbatim} @@ -732,7 +737,7 @@ identification banner of any file other than those in the standard \LaTeX{} distribution. \subsection{Loading files} -\label{Sec:loadf} +\label{sec:loadf} This group of commands can be used to create your own document class or package by building on existing classes or packages. @@ -771,10 +776,10 @@ Examples: The two |WithOptions| versions simply load the class (or package) file with exactly those options that are being used by the current file (class or -package). See below, in \ref{Sec:opmove}, for further discussion of their use. +package). See below, in \ref{sec:opmove}, for further discussion of their use. \subsection{Delaying code} -\label{Sec:delays} +\label{sec:delays} As noted earlier, a sophisticated hook system is available and described in \texttt{lthooks}. Here, we document a small set of convenient short names for @@ -819,7 +824,7 @@ Repeated use of these commands is permitted: the code in the arguments is stored (and later executed) in the order of their declarations. \subsection{Creating and using keyval options} -\label{Sec:opt:keyval} +\label{sec:opt:keyval} As with any key--value input, using key--value pairs as package or class options has two parts: creating the key options and setting (using) them. @@ -841,6 +846,9 @@ The basic properties provided here are \item \texttt{.code} --- execute arbitrary code \item \texttt{.if} --- sets a \TeX{} |\if...| switch \item \texttt{.ifnot} --- sets an inverted \TeX{} |\if...| switch + \item \texttt{.pass-to-packages} --- for class options, this specifies + whether the option should be treated \enquote{global} (read by packages + from the global list); for package options this property has no effect \item \texttt{.store} --- stores a value in a macro \item \texttt{.usage} -- defines whether the option can be given only when loading (\texttt{load}), in the preamble (\texttt{preamble}) or @@ -902,7 +910,7 @@ latter is not given, the value of |\@currname| is used. This command may be used within a package to set options before or after using |\ProcessKeyOptions|. \subsection{Passing options around} -\label{Sec:opmove} +\label{sec:opmove} These two commands are also very useful within the \m{code} argument of options. @@ -929,7 +937,7 @@ Similarly, |\PassOptionsToClass| may be used in a class file to pass options to another class to be loaded with |\LoadClass|. The effects and use of these two commands should be contrasted with those of -the following two (documented above, in \ref{Sec:loadf}): +the following two (documented above, in \ref{sec:loadf}): \begin{verbatim} \LoadClassWithOptions \RequirePackageWithOptions @@ -974,6 +982,62 @@ as in that case \textsf{article} is passed options only by the default option handler, but this handler is not used for |landscape| because that option is explicitly declared. +\subsection{Useful status tests} + +A number of status tests are available which can be used by package and +class authors to query the presence and date of other code, the current kernel +release and other related ideas. Three forms of each test are provided, one +requiring arguments for both \meta{true} and \meta{false} branches, one +requiring only a \meta{true} branch and one requiring only a \meta{false} +branch. These are indicated in their names as |TF|, |T| and |F|, respectively. +Here, we document only the |TF| versions: the other forms are however also +available. + +\begin{decl} + |\IfPackageLoadedTF| \arg{package-name} \arg{true code} \arg{false code}\\ + |\IfClassLoadedTF| \arg{class-name} \arg{true code} \arg{false code}\\ + |\IfFileLoadedTF| \arg{file-name} \arg{true code} \arg{false code} +\end{decl} +These commands test whether the named package, class or file has been loaded: this is +done by using information that must be contained in an appropriate +|\Provides...| line, as described in Section~\ref{sec:ID}. In the case of +\cs{IfFileLoadedTF}, the full \meta{file-name} must be provided; in contrast, +no extension should be given if testing for a package or class. + +\begin{decl} + |\IfPackageLoadedWithOptionsTF| \arg{package-name} \arg{options} \arg{true code} \arg{false code}\\ + |\IfClassLoadedWithOptionsTF| \arg{class-name} \arg{options} \arg{true code} \arg{false code} +\end{decl} +These commands test whether the named package or class has been loaded with +\emph{exactly} the \meta{options} specified. In order to take the \meta{true} +branch, the package or class must be loaded (giving a \meta{true} result for +\cs{If...LoadedT}) and the option list used when loading it must be identical +to the \meta{options}. + +\begin{decl} + |\IfPackageAtLeastTF| \arg{package-name} \arg{date} \arg{true code} \arg{false code}\\ + |\IfClassAtLeastTF| \arg{class-name} \arg{date} \arg{true code} \arg{false code}\\ + |\IfFileAtLeastTF| \arg{file-name} \arg{date} \arg{true code} \arg{false code} +\end{decl} +These tests are used to check whether the date information given in the +|\Provides...| line of a package, class or file is no earlier than the given +\meta{date}. The \meta{date} is compared with that in the +optional argument to \cs{Provides...} (as described in Section~\ref{sec:ID}); +if \cs{Provides...} was missing or had no optional argument, it is treated +as |0000/00/00| (i.e.~earlier than any other date). +As for \cs{Provides...}, the \meta{date} should be given in the form +`\textsc{yyyy-mm-dd}' or `\textsc{yyyy/mm/dd}'. If the package, class or file is not +loaded, the \meta{false} branch will be taken; in contrast, if the \meta{date} +is not given in the required form, the behavior is formally undefined. + +\begin{decl} + |\IfFormatAtLeastTF| \arg{date} \arg{true code} \arg{false code} +\end{decl} +Tests the release \meta{date} of the \LaTeX{} format and selects the +appropriate branch. The date used by the format is adjusted to incorporate any +roll forward or back that has been applied to it, so that the apparent date +of the format will be that after roll forward or back. + \subsection{Safe file commands} These commands deal with file input; they ensure that the non-existence of a @@ -1067,7 +1131,7 @@ prints a space. Also, these should not end with a full stop as one is automatically added. \section{Miscellaneous commands, etc.} -\label{Sec:commands.misc} +\label{sec:commands.misc} \subsection{Layout parameters} @@ -1333,6 +1397,25 @@ modern packages, that use the L3 programming layer of \LaTeX{}. The \texttt{expl3} commands and more details can be found in \texttt{ltproperties-doc.pdf}. +\subsubsection{Templates (protoype document commands)} + +\emph{Templates} as defined by \LaTeX{} are a mechanism to cleanly separate the +three layers needed for writing a document +\begin{enumerate} + \item authoring of the text with mark-up; + \item document layout design; + \item implementation (with \TeX{} programming) of the design. +\end{enumerate} +They allow document authors to modify design without altering code, and allow +programmers to make portable changes to classes. + +Implementing this mechanism requires a number of steps and a family of commands +which allow variation in outcomes. A typical use of templates will make use of +most or all of |\NewTemplateType|, |\DeclareTemplateInterface|, +|\DeclareTemplateCode|, |\DeclareInstance| and |\UseInstance|, plus potentially +some more specialised commands. These are descrined in \texttt{lttemplates-doc} +in full detail. + \subsection{Preparing link targets} Active links in a document need targets to which they can jump to. Such @@ -1428,7 +1511,7 @@ starts altering the definitions of commands. It allows you to check, in particular, that no other package has redefined the same command. \subsection{Option declaration} -\label{Sec:commands.options.dec} +\label{sec:commands.options.dec} The following commands deal with the declaration and handling of options to document classes and packages using a classical `simple text' approach. Every @@ -1468,7 +1551,7 @@ If a package file contains no |\DeclareOption*| then, by default, each specified but undeclared option for that package will produce an error. \subsection{Commands within option code} -\label{Sec:within.code} +\label{sec:within.code} These two commands can be used only within the \m{code} argument of either |\DeclareOption| or |\DeclareOption*|. Other commands commonly used within @@ -1485,7 +1568,7 @@ This expands to the name of the current option. This causes the current option to be added to the list of `unused options'. \subsection{Option processing} -\label{Sec:commands.options} +\label{sec:commands.options} \begin{decl} |\ProcessOptions| diff --git a/macros/latex/base/cmfonts.pdf b/macros/latex/base/cmfonts.pdf Binary files differindex c867f041b1..6bf2d0b74b 100644 --- a/macros/latex/base/cmfonts.pdf +++ b/macros/latex/base/cmfonts.pdf diff --git a/macros/latex/base/cyrguide.pdf b/macros/latex/base/cyrguide.pdf Binary files differindex 9538250375..d7d6aff32b 100644 --- a/macros/latex/base/cyrguide.pdf +++ b/macros/latex/base/cyrguide.pdf diff --git a/macros/latex/base/doc-code.pdf b/macros/latex/base/doc-code.pdf Binary files differindex 572bfc8d2f..e2dc4a41d8 100644 --- a/macros/latex/base/doc-code.pdf +++ b/macros/latex/base/doc-code.pdf diff --git a/macros/latex/base/doc.dtx b/macros/latex/base/doc.dtx index 946f187389..a6af48b88a 100644 --- a/macros/latex/base/doc.dtx +++ b/macros/latex/base/doc.dtx @@ -34,7 +34,7 @@ %\catcode`\<=14 %<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01] %<+package> -% Any rollback request before 2016-02-15 we try to fullfil with the 2016 version: +% ^^A Any rollback request before 2016-02-15 we try to fulfill with the 2016 version: %<+package>\DeclareRelease{}{1994-06-01} %<+package> {doc-2016-02-15.sty} %<+package>\DeclareRelease{v2.1g}{2016-02-15} @@ -45,7 +45,7 @@ %<+package> %<+package>\ProvidesPackage{doc} %<+shortvrb>\ProvidesPackage{shortvrb} -%<+package|shortvrb> [2024/04/26 v3.0p +%<+package|shortvrb> [2024/10/23 v3.0q %<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)] %\catcode`\<=12 % @@ -836,7 +836,7 @@ % % All three above declarations are local to the current group. % -% Production (or not) of the index (via the |\makeindex| commend) is +% Production (or not) of the index (via the |\makeindex| command) is % controlled by using or omitting the following declarations in the % driver file preamble; if neither is used, no index is produced. % \DescribeInterfaceMacro\PageIndex Using |\PageIndex| makes all index @@ -5463,26 +5463,14 @@ % \end{macrocode} % We require the package without any option so if it was already % loaded there is no option clash. +% \changes{v3.0q}{2024/06/04}{Use hooks to save and restore +% definitions when hypdoc gets loaded (gh/1000)} % \begin{macrocode} \RequirePackage{hypdoc} \expandafter\let\csname doc.sty-h@@k\endcsname\doc@eoph@@k % \end{macrocode} -% After \pkg{hypdoc} got loaded we need to undefine those macros -% again so that later on \texttt{Macro} and \texttt{Env} \DOC items -% appear to be undefined. -% \begin{macrocode} - \let\PrintDescribeMacro \@@PrintDescribeMacro - \let\PrintDescribeEnv \@@PrintDescribeEnv - \let\PrintMacroName \@@PrintMacroName - \let\PrintEnvName \@@PrintEnvName - \let\SpecialUsageIndex \@@SpecialUsageIndex - \let\SpecialEnvIndex \@@SpecialEnvIndex - \let\SortIndex \@@SortIndex - \let\DescribeMacro \@@DescribeMacro - \let\DescribeEnv \@@DescribeEnv -% \end{macrocode} % The package adds new definitions for \cs{special@index} into -% \cs{CodelineIndex} and \cs{PageIndex} but since we are loading it +% \cs{CodelineIndex} and \cs{PageIndex} but since we might be loading it % very late we are already past them (in the preamble). So we test % the final state and do it here, if necessary. % \begin{macrocode} @@ -5577,7 +5565,7 @@ % Since version 2.1g, \texttt{doc} creates a \cs{saved@indexname} command % which in used by \cs{changes}. We now support that as well. The expansion of % this command depends on whether the documented item is macrolike or not, -% which we don't know here (it's only know by \cs{NewDocElement}). That's why we +% which we don't know here (it's only known by \cs{NewDocElement}). That's why we % need one specific command generating \cs{saved@indexname} the right way for % every single item. These commands are % named\cs{@Save\meta{item}IndexName}; @@ -6203,10 +6191,16 @@ % % % To be able to restore the definition after \pkg{hypdoc} is loaded -% we better save them here. We only load the package at the end of +% we better save them beforehand. We only load the package at the end of % the preamble, but the user might do this earlier and then chaos -% is ensured. -% \begin{macrocode} +% is ensured. Thus, to support this generally we save them directly +% before the package is loaded. +% In this way the user can still alter the definition for +% \cs{PrintDescribeMacro} and friends in the preamble. +% \changes{v3.0q}{2024/06/04}{Use hooks to save and restore +% definitions when hypdoc gets loaded (gh/1000)} +% \begin{macrocode} +\AddToHook{package/hypdoc/before}{% \let\@@PrintDescribeMacro \PrintDescribeMacro \let\@@PrintDescribeEnv \PrintDescribeEnv \let\@@PrintMacroName \PrintMacroName @@ -6216,6 +6210,23 @@ \let\@@SortIndex \SortIndex \let\@@DescribeMacro \DescribeMacro \let\@@DescribeEnv \DescribeEnv +} +% \end{macrocode} +% After \pkg{hypdoc} got loaded we need to reset those macros +% again. This is done in the generic hook +% \texttt{package/hypdoc/after}. +% \begin{macrocode} +\AddToHook{package/hypdoc/after}{% + \let\PrintDescribeMacro \@@PrintDescribeMacro + \let\PrintDescribeEnv \@@PrintDescribeEnv + \let\PrintMacroName \@@PrintMacroName + \let\PrintEnvName \@@PrintEnvName + \let\SpecialUsageIndex \@@SpecialUsageIndex + \let\SpecialEnvIndex \@@SpecialEnvIndex + \let\SortIndex \@@SortIndex + \let\DescribeMacro \@@DescribeMacro + \let\DescribeEnv \@@DescribeEnv +} % \end{macrocode} % % diff --git a/macros/latex/base/doc.pdf b/macros/latex/base/doc.pdf Binary files differindex 3b5313c6ec..cc73fb7e9c 100644 --- a/macros/latex/base/doc.pdf +++ b/macros/latex/base/doc.pdf diff --git a/macros/latex/base/docstrip.pdf b/macros/latex/base/docstrip.pdf Binary files differindex 6b7ab759be..ba3a1a0785 100644 --- a/macros/latex/base/docstrip.pdf +++ b/macros/latex/base/docstrip.pdf diff --git a/macros/latex/base/encguide.pdf b/macros/latex/base/encguide.pdf Binary files differindex e6c1cc3bac..6fd7a2e58d 100644 --- a/macros/latex/base/encguide.pdf +++ b/macros/latex/base/encguide.pdf diff --git a/macros/latex/base/exscale.pdf b/macros/latex/base/exscale.pdf Binary files differindex bb2df52c84..34ebf3f307 100644 --- a/macros/latex/base/exscale.pdf +++ b/macros/latex/base/exscale.pdf diff --git a/macros/latex/base/fix-cm.pdf b/macros/latex/base/fix-cm.pdf Binary files differindex ae1980ea64..ae35ef05bd 100644 --- a/macros/latex/base/fix-cm.pdf +++ b/macros/latex/base/fix-cm.pdf diff --git a/macros/latex/base/fntguide.pdf b/macros/latex/base/fntguide.pdf Binary files differindex 941435118e..e944b06692 100644 --- a/macros/latex/base/fntguide.pdf +++ b/macros/latex/base/fntguide.pdf diff --git a/macros/latex/base/fntguide.tex b/macros/latex/base/fntguide.tex index 6106204a55..23471f6f88 100644 --- a/macros/latex/base/fntguide.tex +++ b/macros/latex/base/fntguide.tex @@ -52,7 +52,7 @@ \texttt{fntguide.tex} for full details.}% } -\date{March 2024} +\date{Sep 2024} \begin{document} @@ -93,28 +93,28 @@ This document contains an overview of the new font commands of \LaTeX. \begin{description} -\item[Section~\ref{Sec:text}] describes the commands for selecting fonts +\item[Section~\ref{sec:text}] describes the commands for selecting fonts in classes and packages. It lists the five \LaTeX{} font attributes, and lists the commands for selecting fonts. It also describes how to customize the author commands such as |\textrm| and |\textit| to suit your document design. -\item[Section~\ref{Sec:math}] explains the commands for controlling +\item[Section~\ref{sec:math}] explains the commands for controlling \LaTeX{} math fonts. It describes how to specify new math fonts and new math symbols. -\item[Section~\ref{Sec:install}] explains how to install new fonts into +\item[Section~\ref{sec:install}] explains how to install new fonts into \LaTeX. It shows how \LaTeX{} font attributes are turned into \TeX{} font names, and how to specify your own fonts using font definition files. -\item[Section~\ref{Sec:encode}] discusses text font encodings. It +\item[Section~\ref{sec:encode}] discusses text font encodings. It describes how to declare a new encoding and how to define commands, such as |\AE| or |\"|, which have different definitions in different encodings, depending on whether ligatures, etc.\ are available in the encoding. -\item[Section~\ref{Sec:misc}] covers font miscellanea. It describes how +\item[Section~\ref{sec:misc}] covers font miscellanea. It describes how \LaTeX{} performs font substitution, how to customize fonts that are preloaded in the \LaTeX{} format, and the naming conventions used in \LaTeX{} font selection. @@ -143,7 +143,7 @@ same source as your copy of \LaTeX. The |psnfss| software uses fonts generated by Alan Jeffrey's |fontinst| software. This can convert fonts from Adobe Font Metric format into a format readable by \LaTeX, including the generation of the font -definition files described in Section~\ref{Sec:install}. The |fontinst| +definition files described in Section~\ref{sec:install}. The |fontinst| software should be available from the same source as your copy of \LaTeX. @@ -175,7 +175,7 @@ Addresses and other details can be found at: \section{Text fonts} -\label{Sec:text} +\label{sec:text} This section describes the commands available to class and package writers for specifying and selecting fonts. @@ -392,14 +392,14 @@ The author commands for fonts set the five attributes as shown in table~\vref{ta \caption{Author font commands and their effects (article class)}\label{tab:attributes} \end{table} The values used by these commands are determined by the document class, -using the parameters defined in Section~\ref{Sec:text.param}. +using the parameters defined in Section~\ref{sec:text.param}. Note that there are no author commands for selecting new encodings. These should be provided by packages, such as the |fontenc| package. This section does not explain how \LaTeX{} font specifications are turned into \TeX{} font names. This is described in -Section~\ref{Sec:install}. +Section~\ref{sec:install}. @@ -483,7 +483,7 @@ commands like |\fontfamily|, |\fontseries|, etc. If you disobey this warning you might produce code that loops. \subsection{Parameters for author commands} -\label{Sec:text.param} +\label{sec:text.param} The parameter values set by author commands such as |\textrm| and |\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these @@ -644,7 +644,7 @@ the transcript file. \section{Math fonts} -\label{Sec:math} +\label{sec:math} This section describes the commands available to class and package writers for specifying math fonts and math commands. @@ -658,7 +658,7 @@ Some math fonts are selected explicitly by one-argument commands such as |\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math alphabets}. These math alphabet commands affect only the font used for letters and symbols of type |\mathalpha| (see -Section~\ref{Sec:math.commands}); other symbols within the argument will +Section~\ref{sec:math.commands}); other symbols within the argument will be left unchanged. The predefined math alphabets are: \begin{center} \begin{tabular}{ccc} @@ -730,7 +730,7 @@ packages. There are no commands for selecting symbol fonts. Instead, these are selected indirectly through symbol commands like |\oplus|. -Section~\ref{Sec:math.commands} explains how to define symbol commands. +Section~\ref{sec:math.commands} explains how to define symbol commands. \begin{decl} |\mathnormal{<math>}| \quad @@ -908,7 +908,7 @@ when it is first declared, a math alphabet uses a \TeX{} math group only when its command is used within a math formula. \subsection{Declaring math symbols} -\label{Sec:math.commands} +\label{sec:math.commands} \begin{decl} |\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font} @@ -1040,7 +1040,7 @@ Example: \end{verbatim} \section{Font installation} -\label{Sec:install} +\label{sec:install} This section explains how \LaTeX's font attributes are turned into \TeX{} font specifications. @@ -1328,7 +1328,7 @@ This example sets up the `empty' size function (simplified): \section{Encodings} -\label{Sec:encode} +\label{sec:encode} This section explains how to declare and use new font encodings and how to declare commands for use with particular encodings. @@ -1353,7 +1353,7 @@ the option list. The declarations in the encoding definition file |<enc>enc.def| for encoding \m{ENC} are responsible for declaring this encoding and telling \LaTeX{} how to produce characters in this encoding; this file should -contain nothing else (see Section~\ref{Sec:encode.def}. +contain nothing else (see Section~\ref{sec:encode.def}. The standard \LaTeX{} format declares the |OT1| and |T1| text encodings by inputting the files |ot1enc.def| and |t1enc.def|; it also sets up @@ -1371,7 +1371,7 @@ prevents the system from attempting to load any |T1|-encoded fonts from the `cmr' family). \subsection{Encoding definition file commands} -\label{Sec:encode.def} +\label{sec:encode.def} \emph{Note}: An encoding definition file should contain only commands from this subsection. @@ -1660,7 +1660,7 @@ encoding scheme is never substituted! They are tried in the order \NEWdescription{2019/07/10} This declaration is normally done in an encoding definition file -(see~\ref{Sec:encode.def}), but can also be used in a class file or the +(see~\ref{sec:encode.def}), but can also be used in a class file or the document preamble to alter the default for a specific encoding. If no defaults are set up for an encoding, the values given by @@ -1705,7 +1705,7 @@ problems when using other alphabets. As an experiment, it has now been extended for use with some Cyrillic encodings. \section{Miscellanea} -\label{Sec:misc} +\label{sec:misc} This section covers the remaining font commands in \LaTeX{} and some other issues. diff --git a/macros/latex/base/fontdef.dtx b/macros/latex/base/fontdef.dtx index 281add29ef..ae11766ca6 100644 --- a/macros/latex/base/fontdef.dtx +++ b/macros/latex/base/fontdef.dtx @@ -40,7 +40,7 @@ %<driver, >\ProvidesFile{fontdef.drv} % \fi % \ProvidesFile{fontdef.dtx} - [2024/02/09 v3.0i LaTeX Kernel + [2024/09/03 v3.0k LaTeX Kernel % \iffalse %<text, > (Text font setup) %<math, > (Math font setup) @@ -403,14 +403,29 @@ % (nearly) every \TeX{} installation, while the amount of main memory % is not a limiting factor at most installations.) % +% \changes{v3.0k}{2024/09/03}{Load also t1cmss.fd and t1cmtt.fd} % \begin{macrocode} \begingroup \nfss@catcodes +\input {t1cmss.fd} +\input {t1cmtt.fd} \input {ot1cmss.fd} \input {ot1cmtt.fd} \endgroup % \end{macrocode} % +% \changes{v3.0j}{2024/06/24}{load ts1 cmr fd file in Unicode engines} +% Even though Unicode engines default to |lm| load |ts1cmr| +% as this may be used for fallback for TS1 encoding. +% \begin{macrocode} +\ifx\Umathcode\@undefined\else +\begingroup +\nfss@catcodes +\input {ts1cmr.fd} +\endgroup +\fi +% \end{macrocode} +% % Even with all the precautions it is still possible that NFSS will % run into problems, for example, when a |.fd| file contains % corrupted data. To guard against such cases NFSS has a very @@ -527,7 +542,6 @@ %<*text|latexrelease> %<latexrelease>\IncludeInRelease{2020/02/02}% %<latexrelease> {\updefault}{font defaults change}% -% \begin{macrocode} \renewcommand\updefault{up} % \end{macrocode} % We append \cs{@empty} to the series value so that we can detect diff --git a/macros/latex/base/graphpap.pdf b/macros/latex/base/graphpap.pdf Binary files differindex 9367e9459f..100989b322 100644 --- a/macros/latex/base/graphpap.pdf +++ b/macros/latex/base/graphpap.pdf diff --git a/macros/latex/base/ifthen.pdf b/macros/latex/base/ifthen.pdf Binary files differindex 6da60f51ec..9e575385f2 100644 --- a/macros/latex/base/ifthen.pdf +++ b/macros/latex/base/ifthen.pdf diff --git a/macros/latex/base/inputenc.pdf b/macros/latex/base/inputenc.pdf Binary files differindex 4d6d01b518..6b5bdd6c9f 100644 --- a/macros/latex/base/inputenc.pdf +++ b/macros/latex/base/inputenc.pdf diff --git a/macros/latex/base/lamport-manual.pdf b/macros/latex/base/lamport-manual.pdf Binary files differindex 113cc4942a..041161b5ef 100644 --- a/macros/latex/base/lamport-manual.pdf +++ b/macros/latex/base/lamport-manual.pdf diff --git a/macros/latex/base/latexrelease.dtx b/macros/latex/base/latexrelease.dtx index eeda0f8d55..5b5c3648a4 100644 --- a/macros/latex/base/latexrelease.dtx +++ b/macros/latex/base/latexrelease.dtx @@ -40,7 +40,7 @@ %<*latexrelease> % \fi % \ProvidesFile{latexrelease.dtx} - [2022/11/14 v1.0p LaTeX release emulation and tests + [2024/08/11 v1.0p LaTeX release emulation and tests (including releases up to \latexreleaseversion)] % \iffalse %</latexrelease> @@ -507,7 +507,7 @@ % \end{macro} % % \changes{v1.0c}{2015/02/19}{Swap argument order} -% \changes{v1.0k}{2018/05/08}{reset \cs{\requestedLaTeXdate} for current +% \changes{v1.0k}{2018/05/08}{reset \cs{requestedLaTeXdate} for current % and latest options, github issue 43} % \begin{macrocode} \DeclareOption*{% diff --git a/macros/latex/base/latexrelease.pdf b/macros/latex/base/latexrelease.pdf Binary files differindex f77b3e4645..8d4ccd45c7 100644 --- a/macros/latex/base/latexrelease.pdf +++ b/macros/latex/base/latexrelease.pdf diff --git a/macros/latex/base/latexsym.pdf b/macros/latex/base/latexsym.pdf Binary files differindex c0c0cd38bd..8a2aa0a335 100644 --- a/macros/latex/base/latexsym.pdf +++ b/macros/latex/base/latexsym.pdf diff --git a/macros/latex/base/lb2.pdf b/macros/latex/base/lb2.pdf Binary files differindex 88a06a235b..3c6a9909ea 100644 --- a/macros/latex/base/lb2.pdf +++ b/macros/latex/base/lb2.pdf diff --git a/macros/latex/base/letter.dtx b/macros/latex/base/letter.dtx index 4df9e5ead6..dde59f40e4 100644 --- a/macros/latex/base/letter.dtx +++ b/macros/latex/base/letter.dtx @@ -45,7 +45,7 @@ %<*driver> \ProvidesFile{letter.drv} %</driver> - [2021/12/07 v1.3c + [2024/08/12 v1.3c %<+letter> Standard LaTeX document class] % \end{macrocode} % @@ -838,9 +838,10 @@ % $1$, with footnotes starting from $1$ as well. % (The first page is unnumbered.) It has a single argument, which % is the addressee and his address, as in +% \changes{v1.3c}{2024/08/12}{Alter sample address (gh/1439)} %\begin{verbatim} % \begin{letter}{Sam Jones \\ -% Institute for Retarded Study\\ +% Institute for Trivial Study\\ % Princeton, N.J.} %\end{verbatim} % Local declarations, such as |\address|, can follow the diff --git a/macros/latex/base/letter.pdf b/macros/latex/base/letter.pdf Binary files differindex fed4ff1ed2..ff5a7887b1 100644 --- a/macros/latex/base/letter.pdf +++ b/macros/latex/base/letter.pdf diff --git a/macros/latex/base/lgc2.pdf b/macros/latex/base/lgc2.pdf Binary files differindex 0873032eaa..adc6fb4978 100644 --- a/macros/latex/base/lgc2.pdf +++ b/macros/latex/base/lgc2.pdf diff --git a/macros/latex/base/lppl.pdf b/macros/latex/base/lppl.pdf Binary files differindex a1e823b35f..6df8be118d 100644 --- a/macros/latex/base/lppl.pdf +++ b/macros/latex/base/lppl.pdf diff --git a/macros/latex/base/ltboxes.dtx b/macros/latex/base/ltboxes.dtx index 9852bc5940..e3620ef1ae 100644 --- a/macros/latex/base/ltboxes.dtx +++ b/macros/latex/base/ltboxes.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltboxes.dtx} - [2024/06/10 v1.4g LaTeX Kernel (Box Commands)] + [2024/06/23 v1.4h LaTeX Kernel (Box Commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltboxes.dtx} @@ -456,9 +456,6 @@ % \begin{macro}{\color@begingroup} % \changes{v1.0b}{1994/03/14} % {macro added for color support} -% \begin{macro}{\color@endgroup} -% \changes{v1.0b}{1994/03/14} -% {macro added for color support} % \begin{macro}{\color@setgroup} % \changes{v1.0f}{1994/05/11} % {macro added for color support} @@ -491,7 +488,6 @@ %<latexrelease>\IncludeInRelease{2021/06/01}% %<latexrelease> {\color@begingroup}{color group settings}% \let\color@begingroup\begingroup -\def\color@endgroup{\endgraf\endgroup} \def\color@setgroup{\color@begingroup} % changed further in color package \let\normalcolor\relax % remains untouched; only changed in a color package \def\color@hbox{\hbox\bgroup\color@begingroup} @@ -506,7 +502,6 @@ %<latexrelease> {\color@begingroup}{color group settings}% %<latexrelease> %<latexrelease>\let\color@begingroup\relax -%<latexrelease>\let\color@endgroup\relax %<latexrelease>\let\color@setgroup\relax %<latexrelease>\let\normalcolor\relax %<latexrelease>\let\color@hbox\relax @@ -522,7 +517,51 @@ % \end{macro} % \end{macro} % \end{macro} + + + +% \begin{macro}{\color@endgroup} +% This macro is separated out because it received an update in 2024, +% so requires its own rollback. +% \changes{v1.0b}{1994/03/14} +% {macro added for color support} +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\color@endgroup}{color group settings}% +% \end{macrocode} +% Beside \cs{endgraf} for handling vertical boxes we also reset +% \cs{if@endpe} as we are leaving the context. +% \changes{v1.4h}{2024/06/23}{Adjust for new \texttt{@endpe} handling} +% \begin{macrocode} +\def\color@endgroup{\endgraf\@endpefalse\endgroup} +%<latexrelease> +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2021/06/01}% +%<latexrelease> {\color@endgroup}{color group settings}% +%<latexrelease>\def\color@endgroup{\endgraf\endgroup} +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\color@endgroup}{color group settings}% +%<latexrelease> +%<latexrelease>\let\color@endgroup\relax +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} % \end{macro} + + + % % \begin{macro}{\newsavebox} % \changes{v0.1a}{1993/12/03} diff --git a/macros/latex/base/ltclass.dtx b/macros/latex/base/ltclass.dtx index 35bbb8a55a..6167cf5608 100644 --- a/macros/latex/base/ltclass.dtx +++ b/macros/latex/base/ltclass.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltclass.dtx} - [2024/04/10 v1.5k LaTeX Kernel (Class & Package Interface)] + [2024/08/28 v1.5m LaTeX Kernel (Class & Package Interface)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltclass.dtx} @@ -1111,7 +1111,7 @@ % \IfFormatAtLeastT,\IfFormatAtLeastF, % \IfPackageLoadedWithOptionsT,\IfPackageLoadedWithOptionsF, % \IfClassLoadedT,\IfClassLoadedF, -% \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionTF +% \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionsTF % } % A few more conditionals for convenience % \changes{v1.5k}{2024/04/10}{Provide T and F conditionals not just TF @@ -1515,7 +1515,9 @@ %<latexrelease>\IncludeInRelease{2021/06/01}% %<latexrelease> {\OptionNotUsed}{filter unused option list}% %<*2ekernel|latexrelease> -\def\@remove@eq@value#1=#2\@nil{#1} +\ExplSyntaxOn +\def\@remove@eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}} +\ExplSyntaxOff % \end{macrocode} % % \begin{macrocode} @@ -2819,13 +2821,42 @@ % The current file type. % \changes{v0.2i}{1993/12/03} % {Name changed to avoid clash with output routine.} +% \changes{v1.5l}{2024/06/04} +% {Allow for extensions other than "cls" and "pkg"} % \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\@cls@pkg}{Allow for more extensions}% \def\@cls@pkg{% \ifx\@currext\@clsextension document class% \else - package% + \ifx\@currext\@pkgextension + package% + \else + file% + \fi \fi} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@cls@pkg}{Allow for more extensions}% +%<latexrelease> +%<latexrelease>\def\@cls@pkg{% +%<latexrelease> \ifx\@currext\@clsextension +%<latexrelease> document class% +%<latexrelease> \else +%<latexrelease> package% +%<latexrelease> \fi} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% +% \begin{macrocode} \@onlypreamble\@cls@pkg % \end{macrocode} % \end{macro} @@ -3569,11 +3600,20 @@ \pkgcls@debug{\@spaces 4: #4}% %</tracerollback> % \end{macrocode} -% Two of the arguments are needed later on in error/warning +% Three of the arguments are needed later on in error/warning % messages so we save them. +% \changes{v1.5l}{2024/06/04} +% {New argument \cs{pkgcls@ext} (gh/870)} % \begin{macrocode} \def\pkgcls@name{#1}% % for info message \def\pkgcls@arg {#3}% % for info message + \edef\pkgcls@ext{% + \ifx#4\@clsextension document class\else + \ifx#4\@pkgextension package\else + file + \fi + \fi + }% % for info message % \end{macrocode} % then we parse the final optional argument to determine if there % is a specific rollback request for the current file. This will @@ -3737,12 +3777,14 @@ % therefore issue a warning. % \changes{v1.2i}{2018/05/08} % {Make suspicious rollback a warning not error: github issue 43} +% \changes{v1.5l}{2024/06/04} +% {New argument \cs{pkgcls@ext} (gh/870)} % \begin{macrocode} \ifnum \pkgcls@targetdate > \z@ \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak A minimal date of #1 has been specified for - \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak + \pkgcls@ext\MessageBreak '\pkgcls@name'.\MessageBreak But this is in conflict with a rollback request to \requestedpatchdate} \fi @@ -3891,8 +3933,11 @@ % first line of the |\@@input|! % \changes{v1.2e}{2018/03/24} % {Use full file name for old release} +% \changes{v1.5m}{2024/08/03} +% {Add selected release to the file list (gh/1413)} % \begin{macrocode} \pkgcls@targetdate\z@ + \@addtofilelist{#1}% \@@input #1\relax \endinput } diff --git a/macros/latex/base/ltcmd.dtx b/macros/latex/base/ltcmd.dtx index 69bd162e56..eccb104bb9 100644 --- a/macros/latex/base/ltcmd.dtx +++ b/macros/latex/base/ltcmd.dtx @@ -34,8 +34,8 @@ %%% From File: ltcmd.dtx % % \begin{macrocode} -\def\ltcmdversion{v1.2e} -\def\ltcmddate{2024-04-17} +\def\ltcmdversion{v1.2f} +\def\ltcmddate{2024-07-06} % \end{macrocode} % %<*driver> @@ -620,31 +620,51 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\@@_declare_env:nnnn} +% \begin{macro}{\@@_declare_env:nnnn, \@@_declare_env:ennn} +% \changes{v1.2f}{2024/07/06}{Use space-trimmed envname directly (gh/1399)} % \begin{macro}{\@@_declare_env_internal:nnnn} +% \begin{macro}{\@@_set_environment_end:n} % The lead-off to creating an environment is much the same as that for % creating a command: issue the appropriate message, store the argument % specification then hand off to an internal function. % \begin{macrocode} +%<latexrelease>\IncludeInRelease{2024/11/01}{\@@_declare_env:nnnn}% +%<latexrelease> {Use~space-trimmed~envname~directly} \cs_new_protected:Npn \@@_declare_env:nnnn #1#2 { - \str_set:Nx \l_@@_environment_str {#1} - \str_set:Nx \l_@@_environment_str - { \tl_trim_spaces:o { \l_@@_environment_str } } - \cs_if_exist:cTF { \l_@@_environment_str } - { - \msg_info:nnxx { cmd } { redefine-env } - { \l_@@_environment_str } { \tl_to_str:n {#2} } - } - { - \msg_info:nnxx { cmd } { define-env } - { \l_@@_environment_str } { \tl_to_str:n {#2} } - } + \str_set:Nn \l_@@_environment_str {#1} + \cs_if_exist:cTF { #1 } + { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } } + { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } } \bool_set_false:N \l_@@_expandable_bool \bool_set_true:N \l_@@_environment_bool - \exp_args:NV \@@_declare_env_internal:nnnn - \l_@@_environment_str {#2} + \@@_declare_env_internal:nnnn {#1} {#2} } +\cs_generate_variant:Nn \@@_declare_env:nnnn { e } +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{2024/06/01}{\@@_declare_env:nnnn}% +%<latexrelease> {Use~space-trimmed~envname~directly} +%<latexrelease>\cs_new_protected:Npn \@@_declare_env:nnnn #1#2 +%<latexrelease> { +%<latexrelease> \str_set:Nx \l_@@_environment_str {#1} +%<latexrelease> \str_set:Nx \l_@@_environment_str +%<latexrelease> { \tl_trim_spaces:o { \l_@@_environment_str } } +%<latexrelease> \cs_if_exist:cTF { \l_@@_environment_str } +%<latexrelease> { +%<latexrelease> \msg_info:nnxx { cmd } { redefine-env } +%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} } +%<latexrelease> } +%<latexrelease> { +%<latexrelease> \msg_info:nnxx { cmd } { define-env } +%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} } +%<latexrelease> } +%<latexrelease> \bool_set_false:N \l_@@_expandable_bool +%<latexrelease> \bool_set_true:N \l_@@_environment_bool +%<latexrelease> \exp_args:NV \@@_declare_env_internal:nnnn +%<latexrelease> \l_@@_environment_str {#2} +%<latexrelease> } +%<latexrelease> +%<latexrelease>\EndIncludeInRelease % \end{macrocode} % Creating a document environment requires a few more steps than creating % a single command. In order to pass the arguments of the command to the @@ -685,6 +705,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \subsection{Structure of \pkg{xparse} commands} % @@ -5022,36 +5043,109 @@ % % \begin{macro}{\NewDocumentEnvironment} % \changes{v1.0h}{2021/08/27}{Check for end-of-environment command} +% \changes{v1.2f}{2024/07/06}{Trim spaces from envname first (gh/1399)} % \begin{macro}{\RenewDocumentEnvironment} % \begin{macro}{\ProvideDocumentEnvironment} % \begin{macro}{\DeclareDocumentEnvironment} -% Very similar for environments. -% \begin{macrocode} +% \begin{macro}{\@@_new_env:nnnn, \@@_renew_env:nnnn, \@@_provide_env:nnnn} +% \begin{macro}{\@@_new_env:ennn, \@@_renew_env:ennn, \@@_provide_env:ennn} +% Very similar for environments. Trim spaces from user-specified +% \meta{envname}, do existence check then hand off to +% \cs{@@_declare_env:nnnn}. +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2024/11/01}{\NewDocumentEnvironment}% +%<latexrelease> {Trim~spaces~from~envname~first} \cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4 { + \@@_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} + } +\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 + { + \@@_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} + } +\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4 + { + \@@_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} + } +\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4 + { + \@@_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4} + } +% \end{macrocode} +% Each of \cs[no-index]{@@_(new|renew|provide)_env:nnnn} is curried. +% \begin{macrocode} +\cs_new_protected:Npn \@@_new_env:nnnn #1 + { \cs_if_exist:cTF {#1} - { \msg_error:nnx { cmd } { env-already-defined } {#1} } + { + \msg_error:nnx { cmd } { env-already-defined } {#1} + \use_none:nnn + } { \cs_if_exist:cTF { end #1 } - { \msg_error:nnx { cmd } { env-end-already-defined } {#1} } - { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } + { + \msg_error:nnx { cmd } { env-end-already-defined } {#1} + \use_none:nnn + } + { \@@_declare_env:nnnn {#1} } } } -\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 +\cs_new_protected:Npn \@@_renew_env:nnnn #1 { \cs_if_exist:cTF {#1} - { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } - { \msg_error:nnx { cmd } { env-undefined } {#1} } + { \@@_declare_env:nnnn {#1} } + { + \msg_error:nnx { cmd } { env-undefined } {#1} + \use_none:nnn + } } -\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4 - { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } } -\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4 - { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } +\cs_new_protected:Npn \@@_provide_env:nnnn #1 + { + \cs_if_exist:cTF {#1} + { \use_none:nnn } + { \@@_declare_env:nnnn {#1} } + } +\cs_generate_variant:Nn \@@_new_env:nnnn { e } +\cs_generate_variant:Nn \@@_renew_env:nnnn { e } +\cs_generate_variant:Nn \@@_provide_env:nnnn { e } +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{2024/06/01}{\NewDocumentEnvironment}% +%<latexrelease> {Trim~spaces~from~envname~first} +%<latexrelease>\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4 +%<latexrelease> { +%<latexrelease> \cs_if_exist:cTF {#1} +%<latexrelease> { \msg_error:nnx { cmd } { env-already-defined } {#1} } +%<latexrelease> { +%<latexrelease> \cs_if_exist:cTF { end #1 } +%<latexrelease> { \msg_error:nnx { cmd } { env-end-already-defined } {#1} } +%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } +%<latexrelease> } +%<latexrelease> } +%<latexrelease>\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4 +%<latexrelease> { +%<latexrelease> \cs_if_exist:cTF {#1} +%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } +%<latexrelease> { \msg_error:nnx { cmd } { env-undefined } {#1} } +%<latexrelease> } +%<latexrelease>\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4 +%<latexrelease> { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } } +%<latexrelease>\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4 +%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } +%<latexrelease>\cs_undefine:N \@@_new_env:nnnn +%<latexrelease>\cs_undefine:N \@@_new_env:ennn +%<latexrelease>\cs_undefine:N \@@_renew_env:nnnn +%<latexrelease>\cs_undefine:N \@@_renew_env:ennn +%<latexrelease>\cs_undefine:N \@@_provide_env:nnnn +%<latexrelease>\cs_undefine:N \@@_provide_env:ennn +%<latexrelease> +%<latexrelease>\EndIncludeInRelease % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} +% \end{macro} % % \begin{macro}{\NewExpandableDocumentCommand} % \begin{macro}{\RenewExpandableDocumentCommand} diff --git a/macros/latex/base/ltcmdhooks-code.pdf b/macros/latex/base/ltcmdhooks-code.pdf Binary files differindex 1f8c95187a..147abe2b99 100644 --- a/macros/latex/base/ltcmdhooks-code.pdf +++ b/macros/latex/base/ltcmdhooks-code.pdf diff --git a/macros/latex/base/ltcmdhooks-doc.pdf b/macros/latex/base/ltcmdhooks-doc.pdf Binary files differindex 82d51be74b..15a6537535 100644 --- a/macros/latex/base/ltcmdhooks-doc.pdf +++ b/macros/latex/base/ltcmdhooks-doc.pdf diff --git a/macros/latex/base/ltcmdhooks.dtx b/macros/latex/base/ltcmdhooks.dtx index f8a8699d7e..0d14ebfe6b 100644 --- a/macros/latex/base/ltcmdhooks.dtx +++ b/macros/latex/base/ltcmdhooks.dtx @@ -20,7 +20,7 @@ %<*driver> % \fi \ProvidesFile{ltcmdhooks.dtx} - [2024/04/17 v1.0j LaTeX Kernel (Command hooks)] + [2024/10/22 v1.0j LaTeX Kernel (Command hooks)] % \iffalse % \documentclass{l3doc} @@ -68,7 +68,15 @@ % supported % for all types of commands, see section~\ref{sec:look-ahead} for % the restrictions that apply and what happens if one tries to use -% this with commands for which this is not supported.} These are: +% this with commands for which this is not supported.} +% +% However, this is only true \enquote{in theory}. In practice there +% are a number of restrictions that makes it impossible to use such +% generic command hooks in a number of cases, so please read all +% of section~\ref{sec:restrictions} to understand what may prevent +% you from using them successfully. +% +% The generic command hooks are: % \begin{description} % \item[\hook{cmd/\meta{name}/before}] % @@ -152,7 +160,55 @@ % and \TeX{} doesn't have a reliable way to see that, so some guesswork % has to be employed. % -% \subsection{Patching} +% We can do this in most cases when commands are defined using +% \cs{NewDocumentCommand} or \cs{newcommand} (with a few exceptions). +% For commands defined with \tn{def} the situation is less good. +% Common cases where the command hooks will not work are: +% \begin{itemize} +% \item +% +% Commands that use special catcode settings within their +% definition. In that case it is usually not possible to augment the +% definition (see~\ref{sec:patching}). +% +% \item +% +% If a command is defined while \cs{ExplSyntaxOn} is in force +% \textbf{and} the command contains \verb=~= characters to represent +% spaces, then it can't be patched to include the command hooks. In +% fact in some very special circumstances you might even get a +% low-level error rather than the information that the command can't +% be patched (see, for example, +% \url{https://github.com/latex3/latex2e/issues/1430}. +% +% \item +% +% Commands that have arguments as far as the user is concerned +% (e.g., \cs{section} or \cs{caption}), but are defined in a way that these +% arguments are not read by the user level command but only later +% during the processing. In that case the \texttt{after} hook +% doesn't work at all. The \text{before} hook only works with +% \cs{AddToHook} but not with \cs{AddToHookWithArguments} because the +% arguments haven't been read at that point where the hook is +% patched in. See +% section~\ref{sec:look-ahead}. +% +% +% \item +% Adding a specific generic command hook is only attempted once per +% command, thus after redefining a command such hooks will no longer +% be there and will also not being re-added, see section~\ref{sec:timing}. +% +% \end{itemize} +% All this means that you have to have a good understanding of how +% commands are defined when you attempt to make use of such hooks and +% something goes wrong. +% What can help in that case is to turn on \cs{DebugHooksOn} in which +% case you get much more (low-level) details on why something fails and +% what was tried to enable the hooks. +% +% +% \subsection{Patching}\label{sec:patching} % % The code here tries to find out if a command was defined with % \tn{newcommand} or \tn{DeclareRobustCommand} or @@ -172,7 +228,7 @@ % catcode settings are not the same as the ones at the time of command's % definition, so not always adding a hook to a command will work. % -% \subsubsection{Timing} +% \subsubsection{Timing}\label{sec:timing} % % When \cs{AddToHook} (or its \pkg{expl3} equivalent) is called with % a generic |cmd| hook, say, \hook{cmd/foo/before}, for the first time @@ -211,12 +267,14 @@ % hooks attached to them. % % One good example is the \tn{section} command. You can add something -% to the \hook{cmd/section/before} hook, but if you try to add something -% to the \hook{cmd/section/after} hook, \tn{section} will no longer -% work. That happens because the \tn{section} macro takes no argument, -% but instead calls a few internal \LaTeX{} macros to look for the -% optional and mandatory arguments. By adding code to the -% \hook{cmd/section/after} hook, you get in the way of that scanning. +% to the \hook{cmd/section/before} hook (but only with \cs{AddToHook} +% not \cs{AddToHookWithArguments}), +% but if you try to add anything to the \hook{cmd/section/after} +% hook, \tn{section} will no longer work at all. That happens because the +% \tn{section} macro takes no argument, but instead calls a few +% internal \LaTeX{} macros to look for the optional and mandatory +% arguments. By adding code to the \hook{cmd/section/after} hook, you +% get in the way of that scanning. % % In such a case, where it is known that a specific generic command % hook does not work if code is added to it, the package author can @@ -1530,6 +1588,7 @@ %<latexrelease> {cmd~hooks~with~args} \cs_new_protected:Npn \@@_patch_retokenize:Nnnn #1 #2 #3 #4 { +% \end{macrocode} % Here, when patching by retokenization, we can only guess the number % of arguments of the macro. % \changes{v1.0h}{2023/05/21} diff --git a/macros/latex/base/ltcounts.dtx b/macros/latex/base/ltcounts.dtx index 006486d23b..1d3f202489 100644 --- a/macros/latex/base/ltcounts.dtx +++ b/macros/latex/base/ltcounts.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltcounts.dtx} - [2021/11/08 v1.1n LaTeX Kernel (Counters)] + [2024/10/26 v1.1p LaTeX Kernel (Counters)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltcounts.dtx} @@ -171,13 +171,15 @@ % % |\refstepcounter|\marg{foo}\\ % Same as |\stepcounter|, but it also defines -% |\@currentreference| so that a subsequent +% |\@currentlabel|, |\@currentHref| and |\@currentcounter| +% and so that a subsequent % |\label|\marg{bar} command causes |\ref|\marg{bar} to % generate the current value of counter \meta{foo}. % % |\@definecounter|\marg{foo}\\ % Initializes counter \marg{foo} (with empty reset list), defines -% |\p@foo| and |\thefoo| to be null. Also adds \meta{foo} +% |\p@foo| and |\thefoo| to be null and |\theHfoo| to be +% |\number\value{foo}|. Also adds \meta{foo} % to |\cl@@ckpt| -- % the reset list of a dummy counter |@ckpt| used for taking % checkpoints for the |\include| system. @@ -306,13 +308,20 @@ % \changes{v1.1b}{1995/05/20}{Streamlined code} % \changes{v1.1c}{1995/05/20}{And do it right} % \changes{v1.1n}{2023/11/07}{Do not change \cs{the...} if already defined (gh/823)} -% +% \changes{v1.1o}{2024/09/20}{define theHfoo (used for internal links)} % \begin{macrocode} +% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2024/11/01}{\@definecounter} +%<latexrelease> {provide theHfoo commands}% +%<*2ekernel|latexrelease> \def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname \setcounter{#1}\z@ \global\expandafter\let\csname cl@#1\endcsname\@empty \@addtoreset{#1}{@ckpt}% \global\expandafter\let\csname p@#1\endcsname\@empty + \expandafter\xdef\csname theH#1\endcsname{% + \noexpand\the\noexpand\value{#1}}% % \end{macrocode} % If \cs{the\#1} is undefined or \cs{relax} we define it with the % standard definition for counters, otherwise we warn. This will @@ -328,12 +337,54 @@ \@latex@warning{Command `\string\the#1' already defined -- not changed}% \fi} +%<latexrelease>\EndIncludeInRelease +%</2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{0000/00/00}{\@definecounter} +%<latexrelease> {provide theHfoo commands}%% +%<latexrelease>\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname +%<latexrelease> \setcounter{#1}\z@ +%<latexrelease> \global\expandafter\let\csname cl@#1\endcsname\@empty +%<latexrelease> \@addtoreset{#1}{@ckpt}% +%<latexrelease> \global\expandafter\let\csname p@#1\endcsname\@empty +%<latexrelease> \expandafter +%<latexrelease> \ifx\csname the#1\endcsname\relax +%<latexrelease> \expandafter +%<latexrelease> \gdef\csname the#1\expandafter\endcsname\expandafter +%<latexrelease> {\expandafter\@arabic\csname c@#1\endcsname}% +%<latexrelease> \else +%<latexrelease> \@latex@warning{Command `\string\the#1' already +%<latexrelease> defined -- not changed}% +%<latexrelease> \fi} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % % \begin{macro}{\@addtoreset} +% \changes{v1.1o}{2024/09/20}{add the parent theHfoo if a counter is reset} +% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)} +% If a counter is reset when a parent counter changes it no longer has an unique value +% across the document. As |\theH<counter>| should be unique +% this representation is changed to include also the +% representation of the parent. This is not 100\% guaranteed to work +% but has been used this way by hyperref for many years without causing problems. % \begin{macrocode} -\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2024/11/01}{\@addtoreset} +%<latexrelease> {provide theHfoo commands}% +%<*2ekernel|latexrelease> +\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}% + \expandafter\xdef\csname theH#1\endcsname{% + \expandafter\noexpand\csname theH#2\endcsname.% + \noexpand\the\noexpand\value{#1}}% +} +%<latexrelease>\EndIncludeInRelease +%</2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{0000/00/00}{\@addtoreset} +%<latexrelease> {provide theHfoo commands}%% +%<latexrelease>\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} % \end{macro} % @@ -423,7 +474,7 @@ }% } % \end{macrocode} -% +% % \begin{macrocode} \NewDocumentCommand \counterwithin {sO{\arabic}mm}{% \@ifbothcounters{#3}{#4}{% diff --git a/macros/latex/base/ltdefns.dtx b/macros/latex/base/ltdefns.dtx index d9ec12e75a..5185a076eb 100644 --- a/macros/latex/base/ltdefns.dtx +++ b/macros/latex/base/ltdefns.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltdefns.dtx} - [2024/04/17 v1.5t LaTeX Kernel (definition commands)] + [2024/09/06 v1.5t LaTeX Kernel (definition commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltdefns.dtx} @@ -1772,11 +1772,11 @@ % % Most of the machinery defined for \cs{NewCommandCopy} can be used to show % the definition of a robust command, in a similar fashion to \texttt{texdef}. -% The difference is that after the command's is detected to has a given type +% The difference is that after the command is detected to have a given type % of robustness, rather than making a copy, we use a separate routine to show % its definition. % -% With all the machinery in place, \cs{ShowCommand} itself is quite simple: +% With all the machinery in place, \cs{ShowCommand} itself is quite simple: we % use \cs{robust@command@act} to iterate through the \cs{@showcommandlisthook} % list, and if nothing is found, fallback to \cs{show}. % \begin{macrocode} @@ -1837,7 +1837,8 @@ % tests are heavily based on Heiko's \cs{LetLtxMacro}, but chopped into % separate macros. % -% \cs{@if@DeclareRobustCommand} checks if a command \verb=\cmd= was defined by +% The command \cs{@if@DeclareRobustCommand} checks if a command +% \verb=\cmd= was defined by % \cs{DeclareRobustCommand}. The test returns true if the expansion of % \verb=\cmd= is exactly \verb*=\protect\cmd =. % diff --git a/macros/latex/base/lterror.dtx b/macros/latex/base/lterror.dtx index 99bdc79e4f..7170e51f8c 100644 --- a/macros/latex/base/lterror.dtx +++ b/macros/latex/base/lterror.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{lterror.dtx} - [2021/08/20 v1.2t LaTeX Kernel (errors)] + [2024/09/12 v1.2u LaTeX Kernel (errors)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{lterror.dtx} @@ -766,6 +766,15 @@ Type H <return> for immediate help.}% % \end{macrocode} % \end{macro} % +% \begin{macro}{\@LRmoderr} +% A command is not allowed in restricted horizontal mode, i.e., in LR-mode in \LaTeX{} terminology. +% \changes{v1.2u}{2024/09/11}{Error message added} +% \begin{macrocode} +\gdef\@LRmoderr{% + \@latex@error{Not allowed in LR mode}\@ehb} +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\@parmoderr} % Occurs in a float environment or a |\marginpar| when % encountered in inner vertical mode. diff --git a/macros/latex/base/ltfilehook-code.pdf b/macros/latex/base/ltfilehook-code.pdf Binary files differindex a1e2630cc3..1f29be5b82 100644 --- a/macros/latex/base/ltfilehook-code.pdf +++ b/macros/latex/base/ltfilehook-code.pdf diff --git a/macros/latex/base/ltfilehook-doc.pdf b/macros/latex/base/ltfilehook-doc.pdf Binary files differindex f01fd3243f..fb3a77f946 100644 --- a/macros/latex/base/ltfilehook-doc.pdf +++ b/macros/latex/base/ltfilehook-doc.pdf diff --git a/macros/latex/base/ltfinal.dtx b/macros/latex/base/ltfinal.dtx index 648e3e1b8b..2c6b96049b 100644 --- a/macros/latex/base/ltfinal.dtx +++ b/macros/latex/base/ltfinal.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltfinal.dtx} - [2024/02/08 v2.3c LaTeX Kernel (Final Settings)] + [2024/07/08 v2.3c LaTeX Kernel (Final Settings)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltfinal.dtx} @@ -930,7 +930,7 @@ % % \begin{macrocode} %<*2ekernel> -% \begin{macrocode} +% \end{macrocode} % % We temporarily define |\reserved@a| to apply |\reserved@c| to all the % numbers in the range of its arguments. diff --git a/macros/latex/base/ltfssbas.dtx b/macros/latex/base/ltfssbas.dtx index df02a5749a..387214e947 100644 --- a/macros/latex/base/ltfssbas.dtx +++ b/macros/latex/base/ltfssbas.dtx @@ -35,7 +35,7 @@ % % \ProvidesFile{ltfssbas.dtx} - [2024/02/08 v3.2l LaTeX Kernel (NFSS Basic Macros)] + [2024/06/17 v3.2m LaTeX Kernel (NFSS Basic Macros)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -2111,6 +2111,8 @@ % {Suppress unnecessary error when used in preamble} % \changes{v3.2a}{2017/01/10} % {Add version of \cs{showhyphens} that works with Xe\TeX.} +% \changes{v3.2m}{2024/06/17} +% {set \cs{tracinglostchars} to 0 in \cs{showhyphens}} % The |\showhyphens| command must be redefined since the version in % \texttt{plain.tex} uses |\tenrm|. We have also made some further % adjustments for its use in \LaTeX. @@ -2142,10 +2144,10 @@ % horizontal list with explicit hyphens to generate the display. Note % that the |lmr| OpenType font is forced, this works even if the % characters are not in the font as hyphenation is attempted due to -% the width of the space and hyphen character. It may generate +% the width of the space and hyphen character. It would generate % spurious Missing Character warnings in the log, these are however -% suppressed from the terminal output by ensuring that -% |\tracingonline| is locally zero. +% suppressed from the terminal and log output by ensuring that +% |\tracinglostchars| is locally zero. % \begin{macrocode} \DeclareRobustCommand\showhyphens[1]{% \setbox0\vbox{% @@ -2154,6 +2156,7 @@ \hbadness\@M \hfuzz\maxdimen \tracingonline\z@ + \tracinglostchars\z@ \everypar={}% \leftskip\z@skip \rightskip\z@skip diff --git a/macros/latex/base/ltfssini.dtx b/macros/latex/base/ltfssini.dtx index 255abe03f3..6b0ba91814 100644 --- a/macros/latex/base/ltfssini.dtx +++ b/macros/latex/base/ltfssini.dtx @@ -36,7 +36,7 @@ % % \ProvidesFile{ltfssini.dtx} - [2024/02/08 v3.2i LaTeX Kernel (NFSS Initialisation)] + [2024/08/28 v3.2i LaTeX Kernel (NFSS Initialisation)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -1397,7 +1397,7 @@ % \end{itemize} % This allows you to define commands like \cs{IfBold}, e.g., %\begin{verbatim} -% \newcommand\IfBold[2]{\IfSeriesContextTF{bf}{#1}{#2}} +% \NewDocumentCommand\IfBold{mm}{\IfFontSeriesContextTF{bf}{#1}{#2}} %\end{verbatim} % and then do %\begin{verbatim} diff --git a/macros/latex/base/lthooks-code.pdf b/macros/latex/base/lthooks-code.pdf Binary files differindex 896073a7fd..22558b822a 100644 --- a/macros/latex/base/lthooks-code.pdf +++ b/macros/latex/base/lthooks-code.pdf diff --git a/macros/latex/base/lthooks-doc.pdf b/macros/latex/base/lthooks-doc.pdf Binary files differindex 2e9f05bdb7..ca7f93a48f 100644 --- a/macros/latex/base/lthooks-doc.pdf +++ b/macros/latex/base/lthooks-doc.pdf diff --git a/macros/latex/base/lthooks.dtx b/macros/latex/base/lthooks.dtx index d282ff841c..0c33c022e3 100644 --- a/macros/latex/base/lthooks.dtx +++ b/macros/latex/base/lthooks.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{lthooks.dtx} - [2024/04/22 v1.1h LaTeX Kernel (hooks)] + [2024/10/29 v1.1k LaTeX Kernel (hooks)] % \iffalse % \documentclass{l3doc} @@ -130,6 +130,9 @@ % % The \meta{hook} can be specified using the dot-syntax to denote % the current package name. See section~\ref{sec:default-label}. +% The string \texttt{??} can't be used as a hook name because it +% has a special significance as a placeholder in hook rules. +% % \end{function} % % \begin{function}{\NewReversedHook} @@ -402,11 +405,17 @@ % Removes any code labeled by \meta{label} from the \meta{hook}. % When the optional argument \meta{label} is not provided, the % \meta{default label} is used (see section~\ref{sec:default-label}). +% \end{function} % % If there is no code under the \meta{label} in the \meta{hook}, % or if the \meta{hook} does not exist, a warning is issued when % you attempt to \cs{RemoveFromHook}, and the command is ignored. -% \cs{RemoveFromHook} should be used only when you know exactly what +% \cs{RemoveFromHook}\marginpar{\raggedleft\rightskip5pt\itshape +% \textbf{Important:}\break The \cs{RemoveFromHook} command should be +% only used if one has full control over the code chunk to be removed. +% In particular it should not be used to remove code chunks from other +% packages! For this the \texttt{voids} relation is provided.} +% should be used only when you know exactly what % labels are in a hook. Typically this will be when some code gets added to a hook % by a package, then later this code is removed by that same package. % If you want to prevent the execution of code from another @@ -420,16 +429,15 @@ % The \meta{hook} and \meta{label} can be specified using the % dot-syntax to denote the current package name. % See section~\ref{sec:default-label}. -% \end{function} % -% \medskip -% -% In contrast to the \texttt{voids} relationship between two labels +% In contrast to the \texttt {voids} relationship between two labels % in a \cs{DeclareHookRule} this is a destructive operation as the % labeled code is removed from the hook data structure, whereas the % relationship setting can be undone by providing a different % relationship later. % +% \medskip +% % A useful application for this declaration inside the document body % is when one wants to temporarily add code to hooks and later remove % it again, e.g., @@ -535,7 +543,6 @@ % % % -% % \subsubsection{Hook names and default labels} % \label{sec:default-label} % @@ -751,8 +758,6 @@ % given \meta{hook}. If \meta{hook} is \texttt{??} this defines a default % relation for all hooks that use the two labels, i.e., that have % chunks of code labeled with \meta{label1} and \meta{label2}. -% Rules specific to a given hook take precedence over default -% rules that use \texttt{??} as the \meta{hook}. % % Currently, the supported relations are the following: % \begin{itemize} @@ -793,9 +798,17 @@ % % \end{itemize} % There can only be a single relation between two labels for a -% given hook, -% i.e., a later \cs{DeclareHookRule} overwrites any previous -% declaration. +% given hook, i.e., a later \cs{DeclareHookRule} overwrites any +% previous declaration. In all cases rules specific to a given +% hook take precedence over default rules that use \texttt{??} as +% the \meta{hook}. +% +% If a default rule is applied, it is done before reversing the +% label order in a reversed hook, e.g., \texttt{before} in a +% default rule effectively becomes \texttt{after} in such a hook. +% In contrast, a rule for a specific hook is always applied to the +% state after any reversal (i.e., the state you see when using +% \cs{ShowHook} on that hook). % % The \meta{hook} and \meta{label} can be specified using the % dot-syntax to denote the current package name. @@ -826,6 +839,16 @@ % (Technically it is just a shorthand for using \cs{DeclareHookRule} % with \texttt{??} as the hook name.) % +% If such a rule is applied to a reversed +% hook it behaves as if the rule is reversed (e.g., +% \texttt{after} becomes \texttt{before}) +% because those rules are applied first and then the order is reversed. +% The rationale is that in hook pairs (in which the ordering in one +% is reversed) default rules have to be reversed too in nearly all +% scenarios. If this is not the case, a default rule can't be used +% or has to be overwritten with an explicit \cs{DeclareHookRule} +% for that specific hook. +% % Declaring default rules is only supported in the document % preamble.\footnotemark{} % @@ -875,7 +898,7 @@ % some variant thereof. Generic hooks such as \hook{file} and \hook{env} hooks are % automatically declared when code is added to them. % -% \begin{function}[EXP]{\IfHookEmptyTF} +% \begin{function}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF} % \begin{syntax} % \cs{IfHookEmptyTF} \Arg{hook} \Arg{true code} \Arg{false code} % \end{syntax} @@ -1411,7 +1434,7 @@ % This is helpful if you have a pair of hooks where you expect to see % code added that involves grouping, e.g., starting an environment % in the first and closing that environment in the second hook. -% To give a somewhat contrived example\footnote{there are simpler +% To give a somewhat contrived example\footnote{There are simpler % ways to achieve the same effect.}, suppose there is a package % adding the following: %\begin{verbatim} @@ -1457,9 +1480,14 @@ % > package-too, package-1. %\end{verbatim} % -% The reversal of the execution order happens before applying any -% rules, so if you alter the order you will probably have to alter -% it in both hooks, not just in one, but that depends on the use case. +% If there is a matching default rule (done with +% \cs{DeclareDefaultHookRule} or with \texttt{??} for the hook +% name) then this default rule is applied before the reversal so that the order +% in the reversed hook mirrors the one in the normal hook. However, +% all rules specific to a hook happen always after the reversal of the +% execution order, so if you alter the order you will probably have +% to alter it in both hooks, not just in one, but that depends on +% the use case. % % % @@ -1910,6 +1938,14 @@ % right sequence. % % \end{description} +% +% Given that these generic hook names involve \texttt{/} as part of +% their name they would not work if one tries to define an +% environment using a name that involves a +% \texttt{/}.\footnote{Officially, \LaTeX{} names for environments +% should only consist of a sequence of letters, numbers, and the +% character \texttt{*}, i.e., this is not a new restriction.} +% % Generic environment hooks are never one-time hooks even with % environments that are supposed to appear only once in a % document.\footnote{Thus if one adds code to such hooks after the @@ -3266,21 +3302,26 @@ % % \subsection{Parsing a label} % -% \begin{macro}[EXP]{\@@_parse_label_default:n} +% \begin{macro}[EXP]{\@@_parse_label_default:nN} % This macro checks if a label was given (not \cs{c_novalue_tl}), and % if so, tries to parse the label looking for a leading \verb|.| to % replace by \cs{@@_currname_or_default:}. +% |#2| is a boolean representing if |#1| is a label name. +% \changes{v1.1i}{2024/08/09} +% {Distinguish between empty label and empty hook (gh/1423)} % \begin{macrocode} -\cs_new:Npn \@@_parse_label_default:n #1 +\cs_new:Npn \@@_parse_label_default:nN #1#2 { \tl_if_novalue:nTF {#1} { \@@_currname_or_default: } - { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:n } + { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:nN #2 } } % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP]{\@@_parse_dot_label:n} +% \begin{macro}[EXP]{\@@_parse_dot_label:nN} +% \changes{v1.1i}{2024/08/09} +% {Distinguish between empty label and empty hook (gh/1423)} % \begin{macro}[EXP]{ % \@@_parse_dot_label:w, % \@@_parse_dot_label_cleanup:w, @@ -3293,12 +3334,15 @@ % If these requirements are fulfilled, the leading % \verb|.| is replaced with \cs{@@_currname_or_default:}. Otherwise % the label is returned unchanged. +% |#2| is a boolean representing if |#1| is a label name. % \begin{macrocode} -\cs_new:Npn \@@_parse_dot_label:n #1 +\cs_new:Npn \@@_parse_dot_label:nN #1#2 { \tl_if_empty:nTF {#1} { - \msg_expandable_error:nn { hooks } { empty-label } + \bool_if:NTF #2 + { \msg_expandable_error:nn { hooks } { empty-label } } + { \msg_expandable_error:nn { hooks } { empty-hook } } \@@_currname_or_default: } { @@ -3375,6 +3419,8 @@ % macro does the entire operation within a group so that csnames made % by \cs{@@_make_name:n} are wiped off before continuing. This means % that this function cannot be used for \cs{hook_use:n}! +% \changes{v1.1i}{2024/08/09} +% {Distinguish between empty label and empty hook (gh/1423)} % \begin{macrocode} \cs_new_protected:Npn \@@_normalize_hook_args_aux:Nn #1 #2 { @@ -3388,24 +3434,24 @@ \cs_new_protected:Npn \@@_normalize_hook_args:Nn #1 #2 { \@@_normalize_hook_args_aux:Nn #1 - { { \@@_parse_label_default:n {#2} } } + { { \@@_parse_label_default:nN {#2} \c_false_bool } } } \cs_new_protected:Npn \@@_normalize_hook_args:Nnn #1 #2 #3 { \@@_normalize_hook_args_aux:Nn #1 { - { \@@_parse_label_default:n {#2} } - { \@@_parse_label_default:n {#3} } + { \@@_parse_label_default:nN {#2} \c_false_bool } + { \@@_parse_label_default:nN {#3} \c_true_bool } } } \cs_new_protected:Npn \@@_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5 { \@@_normalize_hook_args_aux:Nn #1 { - { \@@_parse_label_default:n {#2} } - { \@@_parse_label_default:n {#3} } + { \@@_parse_label_default:nN {#2} \c_false_bool } + { \@@_parse_label_default:nN {#3} \c_true_bool } { \tl_trim_spaces:n {#4} } - { \@@_parse_label_default:n {#5} } + { \@@_parse_label_default:nN {#5} \c_true_bool } } } % \end{macrocode} @@ -6132,6 +6178,8 @@ } % \end{macrocode} % +% \changes{v1.1k}{2024/10/29} +% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)} % \begin{macrocode} \@@_if_usable:nF {#1} { \@@_log_line:x { The~hook~is~not~declared. } } @@ -6141,7 +6189,9 @@ { #2 { The~hook~is~empty } } { \@@_log_line:x { Code~chunks: } - \prop_if_empty:cTF { g_@@_#1_code_prop } + \bool_lazy_or:nnTF + { ! \prop_if_exist_p:c { g_@@_#1_code_prop } } + { \prop_if_empty_p:c { g_@@_#1_code_prop } } { \@@_log_line_indent:x { --- } } { \prop_map_inline:cn { g_@@_#1_code_prop } @@ -6403,19 +6453,24 @@ % |#2|${}={}$\meta{label_1}\verb=|=\meta{label_2}, % and |#3|${}={}$\meta{hook} (the latter may be the argument |#1| to % \cs{@@_list_rules:nn}, or \texttt{??} if it is a default rule). +% \changes{v1.1k}{2024/10/29} +% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)} % \begin{macrocode} \cs_new_protected:Npn \@@_list_rules:nn #1 #2 { - \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2} - \prop_map_inline:cn { g_@@_#1_code_prop } + \prop_if_exist:cT { g_@@_#1_code_prop } { + \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2} \prop_map_inline:cn { g_@@_#1_code_prop } { - \@@_if_label_case:nnnnn {##1} {####1} - { \prop_map_break: } - { \@@_list_one_rule:nnn {##1} {####1} } - { \@@_list_one_rule:nnn {####1} {##1} } - {#1} + \prop_map_inline:cn { g_@@_#1_code_prop } + { + \@@_if_label_case:nnnnn {##1} {####1} + { \prop_map_break: } + { \@@_list_one_rule:nnn {##1} {####1} } + { \@@_list_one_rule:nnn {####1} {##1} } + {#1} + } } } } @@ -7342,6 +7397,14 @@ } % \end{macrocode} % +% \changes{v1.1i}{2024/08/09}{New message ``empty-hook'' (gh/1423).} +% \begin{macrocode} +\msg_new:nnn { hooks } { empty-hook } + { + Empty~hook~name~\msg_line_context:. + } +% \end{macrocode} +% % \begin{macrocode} \msg_new:nnn { hooks } { no-default-label } { @@ -7601,6 +7664,7 @@ % \begin{macrocode} \NewDocumentCommand \SetDefaultHookLabel { m } { \@@_set_default_hook_label:n {#1} } +% \end{macrocode} % % The label is only automatically updated with \cs{@onefilewithoptions} % (\cs{usepackage} and \cs{documentclass}), but some packages, like @@ -7713,13 +7777,16 @@ % \end{macro} % % -% \begin{macro}[EXP]{\IfHookEmptyTF} +% \begin{macro}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF} +% \changes{v1.1j}{2024/10/21}{Define \cs{IfHookEmptyT}, \cs{IfHookEmptyF}} % Here we avoid the overhead of \pkg{xparse}, since \cs{IfHookEmptyTF} % is used in \cs{end} (that is, every \LaTeX{} environment). As a % further optimization, use \cs{let} rather than \cs{def} to avoid one % expansion step. % \begin{macrocode} \cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF +\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT +\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF % \end{macrocode} % \end{macro} % diff --git a/macros/latex/base/ltkeys.dtx b/macros/latex/base/ltkeys.dtx index 34a0ab4b47..a9e430206b 100644 --- a/macros/latex/base/ltkeys.dtx +++ b/macros/latex/base/ltkeys.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltkeys.dtx} - [2024/01/13 v1.0m LaTeX Kernel (Keyval options)] + [2024/06/20 v1.0o LaTeX Kernel (Keyval options)] % \iffalse \documentclass{l3doc} \GetFileInfo{ltkeys.dtx} @@ -73,6 +73,9 @@ % \item \texttt{.code} --- execute arbitrary code % \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch % \item \texttt{.ifnot} --- sets an inverted \TeX{} \cs{if...} switch +% \item \texttt{.pass-to-packages} --- for class options, this specifies +% whether the option should be treated \enquote{global} (read by packages +% from the global list); for package options this property has no effect % \item \texttt{.store} --- stores a value in a macro % \item \texttt{.usage} -- defines whether the option can be given only % when loading (\texttt{load}), in the preamble (\texttt{preamble}) or @@ -182,12 +185,74 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{.pass-to-packages} +% \changes{v1.0n}{2024/06/19}{New key property} +% \begin{macro}{\@@_scope:n} +% \changes{v1.0n}{2024/06/19}{New function} +% \begin{macro}{\@@_scope:N} +% \changes{v1.0n}{2024/06/19}{New function} +% \changes{v1.0o}{2024/06/20}{Ensure only key name is stored} +% Used to force options to be global: as this property (uniquely) has +% an \emph{optional} value, there is a bit of work to do. +% \begin{macrocode} +\cs_new_protected:cpn { \c_@@_props_root_str .pass-to-packages } + { + \bool_if:NTF \l_@@_no_value_bool + { \@@_scope:n { true } } + { \@@_scope:n } + } +\cs_new_protected:Npn \@@_scope:n #1 + { + \str_case:nnF {#1} + { + { true } + { \@@_scope:N \clist_put_right:NV } + { false } + { \@@_scope:N \clist_remove_all:NV } + } + { + \msg_error:nnnn { keys } + { choice-unknown } + { .pass-to-packages } + {#1} + } + } +\cs_new_protected:Npn \@@_scope:N #1 + { + \exp_after:wN \@@_find_key_module:wNN + \l_keys_path_str \s_@@_stop + \l_keys_key_tl \l_keys_key_str + #1 \l_@@_forced_global_clist \l_keys_key_str + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% % \subsection{Main mechanism} % % \begin{macrocode} +\cs_generate_variant:Nn \clist_if_in:NnT { Ne } +\cs_generate_variant:Nn \clist_if_in:NnTF { Ne } \cs_generate_variant:Nn \clist_put_right:Nn { Nv } % \end{macrocode} % +% \begin{macro}{\l_@@_class_only_clist} +% \changes{v1.0n}{2024/06/19}{New variable} +% Used to track class-only options. +% \begin{macrocode} +\clist_new:N \l_@@_class_only_clist +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\l_@@_forced_global_clist} +% \changes{v1.0n}{2024/06/19}{New variable} +% Used to force options to be global. +% \begin{macrocode} +\clist_new:N \l_@@_forced_global_clist +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\l_@@_options_clist} % A single list is used for all options, into which they are collected % before processing. @@ -295,33 +360,34 @@ % \changes{v1.0h}{2022/06/19}{Further work on handling of option removal} % \changes{v1.0h}{2022/06/20}{Use raw options data} % \changes{v1.0m}{2024/01/13}{Trim spaces off key names} +% \changes{v1.0n}{2024/06/19}{Refactor function} % \begin{macro}{\@@_options_class:nnn} % \changes{v1.0h}{2022/06/20}{New function} % \changes{v1.0i}{2022/07/05}{Correct naming of raw class options storage} % \changes{v1.0l}{2022/10/22}{Correct handling of unused option list} +% \changes{v1.0n}{2024/06/19}{Refactor function} +% \changes{v1.0n}{2024/06/19}{Track options used by classes} +% \begin{macro}{\@@_options_class:nn} +% \changes{v1.0n}{2024/06/19}{New function} % For classes, each option (stripped of any content after |=|) % is checked for existence as a key. If found, the option is added to % the combined list for processing. On the other hand, unused options -% are stored up in \cs{@unusedoptionlist}. Before any of that, though, -% there is a simple check to see if there is an |unknown| key. If there -% is, then \emph{everything} will match and the mapping can be skipped. +% are stored up in \cs{@unusedoptionlist}. An earlier version of +% this code checked for the \texttt{unknown} key just once and +% if found short-cutted the loop: that though makes handling more +% complex situations harder, so we take the performance hit instead. +% Options used by classes are tracked but the catch-all \texttt{unknown} +% is excluded (hence not using a lazy evaluation for the key testing). % \begin{macrocode} \cs_new_protected:Npn \@@_options_class:n #1 { \cs_if_free:cF { @raw@opt@ \@currname . \@currext } { - \keys_if_exist:nnTF {#1} { unknown } + \clist_map_inline:cn { @raw@opt@ \@currname . \@currext } { - \clist_put_right:Nv \l_@@_options_clist - { @raw@opt@ \@currname . \@currext } - } - { - \clist_map_inline:cn { @raw@opt@ \@currname . \@currext } - { - \exp_args:Ne \@@_options_class:nnn - { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } } - {##1} {#1} - } + \exp_args:Ne \@@_options_class:nnn + { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } } + {##1} {#1} } } } @@ -329,17 +395,27 @@ { \keys_if_exist:nnTF {#3} {#1} { - \clist_put_right:Nn \l_@@_options_clist {#2} - \clist_remove_all:Nn \@unusedoptionlist {#1} + \@@_options_class:nn {#1} {#2} + \clist_put_right:Ne \l_@@_class_only_clist { \tl_to_str:n {#1} } } { - \clist_if_in:NnF \@unusedoptionlist {#1} - { \clist_put_right:Nn \@unusedoptionlist {#1} } + \keys_if_exist:nnTF {#3} { unknown } + { \@@_options_class:nn {#1} {#2} } + { + \clist_if_in:NnF \@unusedoptionlist {#1} + { \clist_put_right:Nn \@unusedoptionlist {#1} } + } } } +\cs_new_protected:Npn \@@_options_class:nn #1#2 + { + \clist_remove_all:Nn \@unusedoptionlist {#1} + \clist_put_right:Nn \l_@@_options_clist {#2} + } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\@@_options_package:n} % \changes{v1.0g}{2022/06/16}{Better handling of option removal} @@ -348,6 +424,9 @@ % \changes{v1.0m}{2024/01/13}{Trim spaces off key names} % \begin{macro}{\@@_options_package:nnn} % \changes{v1.0h}{2022/06/19}{New function} +% \changes{v1.0n}{2024/06/19}{Skip options given to packages} +% \begin{macro}{\@@_options_package:nn} +% \changes{v1.0n}{2024/06/19}{New functions} % For global options when processing a package, the tasks are slightly % different from those for a class. The check is the same, but here % there is nothing to do if the option is not applicable. Each valid @@ -362,17 +441,31 @@ {##1} {#1} } } +% \end{macrocode} +% The forced-global test here needs to use \cs{tl_to_str:n} as the data come +% from a key name, which is always a string. +% \begin{macrocode} \cs_new_protected:Npn \@@_options_package:nnn #1#2#3 { \keys_if_exist:nnT {#3} {#1} { - \clist_put_right:Nn \l_@@_options_clist {#2} - \clist_remove_all:Nn \@unusedoptionlist {#1} + \clist_if_in:NeTF \l_@@_class_only_clist { \tl_to_str:n {#1} } + { + \clist_if_in:NeT \l_@@_forced_global_clist { \tl_to_str:n {#1} } + { \@@_options_package:nn {#1} {#2} } + } + { \@@_options_package:nn {#1} {#2} } } } +\cs_new_protected:Npn \@@_options_package:nn #1#2 + { + \clist_put_right:Nn \l_@@_options_clist {#2} + \clist_remove_all:Nn \@unusedoptionlist {#1} + } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % % \begin{macro}{\@@_options_local:} % \changes{v1.0h}{2022/06/20}{Use raw options data} diff --git a/macros/latex/base/ltlength.dtx b/macros/latex/base/ltlength.dtx index c81e6edfb7..75c1f22676 100644 --- a/macros/latex/base/ltlength.dtx +++ b/macros/latex/base/ltlength.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltlength.dtx} - [2020/12/05 v1.1d LaTeX Kernel (Lengths)] + [2024/09/04 v1.1e LaTeX Kernel (Lengths)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltlength.dtx} @@ -133,13 +133,31 @@ % \begin{macro}{\@settodim} % \changes{LaTeX2e}{1993/11/22}{Macro added} % \changes{v1.0a}{1994/03/07}{(DPC) Extra group for colour} +% \changes{v1.1e}{2024/09/04}{(UF) Suspend tagging} % The obvious analogs of |\settowidth|. % \begin{macrocode} -\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\@settodim}{suspend tagging}% +\def\@settodim#1#2#3{\setbox\@tempboxa\hbox + {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa % \end{macrocode} % Clear the memory afterwards (which might be a lot). % \begin{macrocode} - \setbox\@tempboxa\box\voidb@x} + \setbox\@tempboxa\box\voidb@x} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@settodim}{suspend tagging}% +%<latexrelease>\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa +%<latexrelease> \setbox\@tempboxa\box\voidb@x} +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \begin{macrocode} \DeclareRobustCommand\settoheight{\@settodim\ht} \DeclareRobustCommand\settodepth {\@settodim\dp} \DeclareRobustCommand\settowidth {\@settodim\wd} diff --git a/macros/latex/base/ltlists.dtx b/macros/latex/base/ltlists.dtx index 8d4c25d916..5858cbddfb 100644 --- a/macros/latex/base/ltlists.dtx +++ b/macros/latex/base/ltlists.dtx @@ -31,7 +31,7 @@ %<*driver> % \fi \ProvidesFile{ltlists.dtx} - [2023/05/17 v1.0t LaTeX Kernel (List Environments)] + [2024/06/23 v1.0u LaTeX Kernel (List Environments)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltlists.dtx} @@ -428,13 +428,13 @@ % % DEFINE \dimen's and \count % \end{oldcomments} -% \begin{macro}{\topskip} +% \begin{macro}{\topsep} % \begin{macro}{\partopsep} % \begin{macro}{\itemsep} % \begin{macro}{\parsep} % \begin{macro}{\@topsep} % \begin{macro}{\@topsepadd} -% \begin{macro}{\outerparskip} +% \begin{macro}{\@outerparskip} % \begin{macrocode} %<*2ekernel> \newskip\topsep @@ -450,6 +450,7 @@ % \begin{macro}{\leftmargin}\begin{macro}{\rightmargin} % \begin{macro}{\listparindent}\begin{macro}{\itemindent} % \begin{macro}{\labelwidth}\begin{macro}{\labelsep} +% \begin{macro}{\linewidth} % \begin{macro}{\@totalleftmargin} % \begin{macrocode} \newdimen\leftmargin @@ -462,7 +463,7 @@ \newdimen\@totalleftmargin \@totalleftmargin=\z@ % \end{macrocode} % \end{macro}\end{macro}\end{macro}\end{macro}\end{macro} -% \end{macro}\end{macro} +% \end{macro}\end{macro}\end{macro} % % \begin{macro}{\leftmargini} % \begin{macro}{\leftmarginii} @@ -715,6 +716,66 @@ % % This allows paragraph-making environments to work right when called % by other environments. (Changed 27 Oct 86) +% +% In 2024 this logic was partially replaced with a new algorithm: +% \begin{itemize} +% \item +% \cs{if@endpe} is now set globally to \texttt{true} or \texttt{false}. +% \item +% In addition \cs{@endpetrue} initiates an \cs{aftergroup} call +% to \cs{propagate@doendpe} if it is used inside a group. +% \item +% \cs{propagate@doendpe} in turn checks the status of \cs{if@endpe} +% and if that is \texttt{true} it calls \cs{@doendpe} otherwise it +% does nothing. +% \item +% \cs{@doendpe} in turn calls \cs{@endpetrue} and also makes the +% necessary changes to +% \cs{par} and \cs{everypar} so that they handle as before any +% empty line that follows the environment. +% \item +% Because of the \cs{@endpetrue} we get another \cs{aftergroup}, so the +% mechanisnm slowly migrates out of several groups if those follow +% immediately after the end of the environment. If, however, there is a new +% paragraph started or an explicit \cs{par} before the next group ends then this will +% result in a call to \cs{@endpefalse} and the migration stops +% (note that \cs{propagate@doendpe} is still called once after the group but does nothing). +% \item +% Using this approach something like +%\begin{verbatim} +% {% some customization here +% \begin{equation} +% x=y +% \end{equation}} +% some text +%\end{verbatim} +% is still correctly identified as a paragraph continuation so that +% there is no indentation before \texttt{some text}. +% \item +% We can get away with using global settings of \cs{if@endpe} even +% in nested situations (without keeping track of the status in a +% stack), because the switch change is made only at +% the very end of such environments, basically directly before the +% \cs{endgroup} in \cs{end}, and it is later set back to \texttt{false} by +% the next \cs{everypar} or the next \cs{par}. Even if the +% environment is called without using \cs{begin} \cs{end}, the +% situation doesn't change (or rather cause a problem). +% \item +% However, there is one scenario where the new approach would +% change the behavior. If a box is being built, e.g., with +% \cs{setbox}, we have now the case that a \cs{@endpetrue} +% inside would migrate out into a context in which it should not be +% true (because the box might get used elsewhere, e.g., a float). +% In the past, due to local switch changes, that didn't happen, i.e., +% \cs{if@endpe} would revert to \texttt{false} at the end of the box +% definition. +% \item +% Thus, to avoid that one has to explicitly set it back to false at +% the end of such constructions, just as we also need to prevent +% colors from +% migrating out. Thus the correct place to do this is +% in \cs{color@endgroup} because that is always called at that point. +% \end{itemize} % \begin{macrocode} \def\@endparenv{% \addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue} @@ -732,9 +793,12 @@ % |\clubpenalty| back to its default. % \changes{v1.0t}{2015/05/10}{Explicitly reset \cs{clubpenalty} before % clearing \cs{everypar}; see also pr/0462 and pr/4065} +% \changes{v1.0u}{2024/06/23}{Set \cs{if@endpe} to \texttt{false} +% before calling \cs{par} (needed for tagging)} % \begin{macrocode} \clubpenalty\@clubpenalty - \everypar{}\par\@endpefalse}\everypar + \@endpefalse + \everypar{}\par}% % \end{macrocode} % % Use |\setbox0=\lastbox| instead of |\hskip -\parindent| @@ -743,8 +807,9 @@ % \changes{v1.0k}{1995/11/07}{Enclosed \cs{setbox0} assignment by a % group so that it leaves the contents of box $0$ intact.} % \begin{macrocode} - {{\setbox\z@\lastbox}% - \everypar{}\@endpefalse}} + \everypar + {{\setbox\z@\lastbox}% + \everypar{}\@endpefalse}} %<latexrelease>\EndIncludeInRelease % \end{macrocode} % @@ -761,12 +826,60 @@ % % \begin{macro}{\if@endpe} % \begin{macro}{\@endpefalse} -% \begin{macro}{\@endpeltrue} +% \begin{macro}{\@endpetrue} +% \begin{macro}{\propagate@doendpe} +% As outlined above these are no longer simple switches, but we +% keep the name because it is used all over the place. % \begin{macrocode} \newif\if@endpe -\@endpefalse % \end{macrocode} -% \end{macro}\end{macro}\end{macro} +% +% \changes{v1.0u}{2024/06/23}{Set \cs{if@endpe} globally and also set +% up migration to the outside} +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\@endpetrue}{New @endpe handling}% +% \end{macrocode} +% +% \begin{macrocode} +\def\@endpefalse{\global\let\if@endpe\iffalse} +% \end{macrocode} +% +% \begin{macrocode} +\def\@endpetrue {% + \global\let\if@endpe\iftrue +% \end{macrocode} +% If we are inside a group then propagate to the outside: +% \begin{macrocode} + \ifnum\currentgrouplevel>\z@ + \aftergroup\propagate@doendpe + \fi +} +% \end{macrocode} +% If \cs{if@endpe} is still true after the group ends, we run \cs{@doendpe} +% that in turn runs another \cs{@endpetrue} (besides other things), +% thus propagating further if necessary. +% However, if the endpe situation got resolved and \cs{if@endpe} is \texttt{false} +% then nothing further happens. +% \begin{macrocode} +\def\propagate@doendpe{\if@endpe \@doendpe \fi} +% \end{macrocode} +% \begin{macrocode} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\@endpetrue}{New @endpe handling}% +%<latexrelease> +%<latexrelease> +%<latexrelease>\def\@endpefalse{\let\if@endpe\iffalse} +%<latexrelease>\def\@endpetrue{\let\if@endpe\iftrue} +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro}\end{macro}\end{macro}\end{macro} % % % \begin{macro}{\@mklab} diff --git a/macros/latex/base/ltluatex.dtx b/macros/latex/base/ltluatex.dtx index a15019dcd5..315b62cc9e 100644 --- a/macros/latex/base/ltluatex.dtx +++ b/macros/latex/base/ltluatex.dtx @@ -30,7 +30,7 @@ %<*plain> % \fi % \ProvidesFile{ltluatex.dtx} -[2024/02/11 v1.2c +[2024/08/16 v1.2e % LaTeX Kernel (LuaTeX support)^^A %\iffalse %<plain> LuaTeX support for plain TeX (core)% @@ -330,6 +330,8 @@ % field |date| in the usual \LaTeX{} format |yyyy/mm/dd|. Optional fields % |version| (a string) and |description| may be used if present. This % information will be recorded in the log. Other fields are ignored. +% If the |version| begins with a digit, a \texttt{v} will be added at the +% start in the log. % % \noindent % \DescribeMacro{module_info} @@ -420,7 +422,7 @@ % same callback and descriptions. % % The callback functions do not have to be registered yet when the functions is called. -% Ony the constraints for which both callback descriptions refer to callbacks +% Only the constraints for which both callback descriptions refer to callbacks % registered at the time the callback is called will have an effect. % % \endgroup @@ -1004,6 +1006,8 @@ local modules = modules or { } % \begin{macro}{provides_module} % \changes{v1.0a}{2015/09/24}{Function added} % \changes{v1.0f}{2015/10/03}{use luatexbase\_log} +% \changes{v1.2d}{2024/06/04}{Add \texttt{v} to version string if required (gh/1364)} +% \changes{v1.2e}{2024/08/16}{Support missing version string (gh/1443)} % Local function to write to the log. % \begin{macrocode} local function luatexbase_log(text) @@ -1024,7 +1028,7 @@ local function provides_module(info) luatexbase_log( "Lua module: " .. info.name .. spaced(info.date) - .. spaced(info.version) + .. spaced(info.version and string_gsub(info.version or "","^(%d)","v%1")) .. spaced(info.description) ) modules[info.name] = info @@ -1336,7 +1340,7 @@ luatexbase.new_luafunction = new_luafunction % Additionally |callbackrules| describes the ordering constraints: It contains two % element tables with the descriptions of the constrained callback implementations. % It can additionally contain a |type| entry indicating the kind of rule. A missing -% value indicates a normal ordering contraint. +% value indicates a normal ordering constraint. % % \changes{v1.2a}{2022/10/03}{Add rules for callback ordering} % \begin{macrocode} @@ -1398,7 +1402,7 @@ local callbacklist = setmetatable({}, { end list[i] = current.value else - -- Cycle occured. TODO: Show cycle for debugging + -- Cycle occurred. TODO: Show cycle for debugging -- list[i] = ... local remaining = {} for name, entry in next, meta do @@ -1432,7 +1436,7 @@ local callbacklist = setmetatable({}, { for i=2, length//2 do cycle[i], cycle[length + 1 - i] = cycle[length + 1 - i], cycle[i] end - error('Cycle occured at ' .. table.concat(cycle, ' -> ', 1, length)) + error('Cycle occurred at ' .. table.concat(cycle, ' -> ', 1, length)) end end end diff --git a/macros/latex/base/ltluatex.pdf b/macros/latex/base/ltluatex.pdf Binary files differindex 5617092af6..715dc87386 100644 --- a/macros/latex/base/ltluatex.pdf +++ b/macros/latex/base/ltluatex.pdf diff --git a/macros/latex/base/ltmarks-code.pdf b/macros/latex/base/ltmarks-code.pdf Binary files differindex 39cb08500c..11139dcaae 100644 --- a/macros/latex/base/ltmarks-code.pdf +++ b/macros/latex/base/ltmarks-code.pdf diff --git a/macros/latex/base/ltmarks-doc.pdf b/macros/latex/base/ltmarks-doc.pdf Binary files differindex 595e7d0cf6..e06276714e 100644 --- a/macros/latex/base/ltmarks-doc.pdf +++ b/macros/latex/base/ltmarks-doc.pdf diff --git a/macros/latex/base/ltmarks.dtx b/macros/latex/base/ltmarks.dtx index a9f3bb0184..f769a09324 100644 --- a/macros/latex/base/ltmarks.dtx +++ b/macros/latex/base/ltmarks.dtx @@ -17,7 +17,7 @@ %<*driver> % \fi \ProvidesFile{ltmarks.dtx} - [2024/05/31 v1.0g LaTeX Kernel (Marks)] + [2024/10/22 v1.0h LaTeX Kernel (Marks)] % \iffalse % \documentclass{l3doc} @@ -211,7 +211,7 @@ % The commands are only meaningful inside the output routine, in % other places their result is (while not random) unpredictable due % to the way \LaTeX{} cuts text material into pages. -%% \end{function} +% \end{function} % % % @@ -257,7 +257,7 @@ % running headers and footers and shipout out both in one % go.\footnote{As of now that scenario is not yet officially supported.} % -% \begin{function}[EXP]{\IfMarksEqualTF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF} +% \begin{function}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF} % \begin{syntax} % \cs{IfMarksEqualTF} \oarg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false} % \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false} @@ -676,7 +676,8 @@ % and adds suitable \cs{mark_insert:nn} in the two token % lists. These token lists can then be executed at the right place % to reinsert the marks, e.g., directly after the box. This is, for -% example, used by \pkg{multicol} when a short balanced +% example, going to be used\footnote{Probably not before 2025, though.} +% by \pkg{multicol} when a short balanced % \env{multicols} is returned to the galley for typesetting. % % If the \meta{source} consists of a single vertical box (plus @@ -806,7 +807,7 @@ \tl_new:c { g_@@_last-column_first_ #1 _tl } \tl_new:c { g_@@_last-column_last_ #1 _tl } % \end{macrocode} -% All marks will have an identication at the beginning of the form +% All marks will have an identification at the beginning of the form % \cs{@@_id:n}\texttt\{\meta{number}\texttt\} and therefore the % initial empty values should have that too, so that data extraction % is going to be uniform. @@ -1027,7 +1028,7 @@ % % We disguise \cs{c_max_dim} in an odd looking csname, which then % shows up as part of the display of an error message if that error -% happens. This csname forms part of the error diplay so what +% happens. This csname forms part of the error display so what % you get is something like %\begin{verbatim} % ! Infinite glue shrinkage found in box being split. @@ -1799,8 +1800,9 @@ % % % -% \begin{macro}[EXP]{\IfMarksEqualTF} -% We only provide a CamelCase command for the case with one region +% \begin{macro}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF} +% \changes{v1.0h}{2024/10/21}{Define \cs{IfMarksEqualT}, \cs{IfMarksEqualF}} +% We only provide CamelCase commands for the case with one region % (optional) and one class. One could think of also providing a % version for the general case with several optional arguments, but % use cases for this are most likely rare, so not done yet. @@ -1808,6 +1810,12 @@ \NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} { \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4} } +\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} { + \mark_if_eq:nnnnT {#1}{#2}{#3}{#4} +} +\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} { + \mark_if_eq:nnnnF {#1}{#2}{#3}{#4} +} % \end{macrocode} % \end{macro} % diff --git a/macros/latex/base/ltmeta.dtx b/macros/latex/base/ltmeta.dtx index cc3e62811d..410f6459f5 100644 --- a/macros/latex/base/ltmeta.dtx +++ b/macros/latex/base/ltmeta.dtx @@ -16,7 +16,7 @@ %<*driver> % \fi \ProvidesFile{ltmeta.dtx} - [2024/05/16 v1.0b LaTeX Kernel (Document Metadata)] + [2024/09/21 v1.0c LaTeX Kernel (Document Metadata)] % \iffalse % \documentclass{l3doc} @@ -152,11 +152,16 @@ % we provide also the new interface commands of the hyperref package % for the creation of targets. % \changes{v1.0b}{2022/05/17}{Default definition for targets added} +% \changes{v1.0c}{2024/09/21}{Added tagging support} % \begin{macro}{\MakeLinkTarget} % \begin{macro}{\LinkTargetOn} % \begin{macro}{\LinkTargetOff} % \begin{macro}{\NextLinkTarget} % \begin{macrocode} +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\MakeLinkTarget}{Record target name for tagging support}% +\ExplSyntaxOn +\int_new:N\g__kernel_target_int \NewDocumentCommand\MakeLinkTarget{sO{}m}{% \ifvmode \special{}% @@ -164,8 +169,31 @@ \@savsf\spacefactor \smash{}% \spacefactor\@savsf - \fi} -\NewDocumentCommand\LinkTargetOn{}{} + \fi + \IfBooleanTF {#1} + { + \tl_gset:Ne \@currentHref {#3} + } + { + \int_gincr:N\g__kernel_target_int + \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int} + } + \UseTaggingSocket{recordtarget} + } +\ExplSyntaxOff +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{2022/06/01}% +%<latexrelease> {\MakeLinkTarget}{Record target name for tagging support}% +%<latexrelease>\NewDocumentCommand\MakeLinkTarget{sO{}m}{% +%<latexrelease> \ifvmode +%<latexrelease> \special{}% +%<latexrelease> \else +%<latexrelease> \@savsf\spacefactor +%<latexrelease> \smash{}% +%<latexrelease> \spacefactor\@savsf +%<latexrelease> \fi} +%<latexrelease>\EndIncludeInRelease + \NewDocumentCommand\LinkTargetOn{}{} \NewDocumentCommand\LinkTargetOff{}{} \NewDocumentCommand\NextLinkTarget{m}{} % \end{macrocode} diff --git a/macros/latex/base/ltmiscen.dtx b/macros/latex/base/ltmiscen.dtx index accdac24b2..70c374f708 100644 --- a/macros/latex/base/ltmiscen.dtx +++ b/macros/latex/base/ltmiscen.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltmiscen.dtx} - [2024/02/08 v1.2c LaTeX Kernel (Misc. Environments)] + [2024/10/12 v1.2f LaTeX Kernel (Misc. Environments)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltmiscen.dtx} @@ -276,6 +276,21 @@ % \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}} % \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)} % \begin{macrocode} +% \end{macrocode} +% If we roll back we have to drop stuff before adding chunks, +% otherwise the code will just be appended, and thus doubled. +% This would result in a harmless warning during the format +% generation, because in that case the code chunk label doesn't +% exist, and therefore can't be dropped. +% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to +% avoid duplication in rollback (gh/1407)} +% \begin{macrocode} +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist] +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings] +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release] +% \end{macrocode} +% +% \begin{macrocode} \AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} \AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} \AddToHook{enddocument/info}[kernel/release]{% @@ -389,6 +404,18 @@ %<latexrelease>\NewHook{enddocument/afteraux} %<latexrelease>\NewHook{enddocument/info} %<latexrelease>\NewHook{enddocument/end} +% \end{macrocode} +% If we roll back we have to drop stuff before adding chunks, +% otherwise the code will just be appended, and thus doubled. +% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to +% avoid duplication in rollback (gh/1407)} +% \begin{macrocode} +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist] +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings] +%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release] +% \end{macrocode} +% +% \begin{macrocode} %<latexrelease>\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist} %<latexrelease>\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings} %<latexrelease>\AddToHook{enddocument/info}[kernel/release]{% @@ -719,12 +746,15 @@ % position of non-matching \cs{begin}.} % \changes{v1.1e}{1996/07/26}{remove \cs{global} before \cs{@ignore...}} % \changes{v1.1p}{2019/08/27}{Make command robust} +% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions +% for individual rollback} +% \changes{v1.2f}{2024/10/12}{Make \cs{begin} engine-protected} % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> %<latexrelease>\IncludeInRelease{2020/10/01}% %<latexrelease> {\begin}{Use hook system}% -\DeclareRobustCommand*\begin[1]{% +\protected\def\begin#1{% \UseHook{env/#1/before}% \@ifundefined{#1}% {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% @@ -758,54 +788,6 @@ } % \end{macrocode} % -% The top level definition for \cs{end}. for an explanation see -% below (this is the same as the 2019 version where it was -% introduced, but for rollback we have to repeat it). -% \begin{macrocode} -\edef\end - {\unexpanded{% - \romannumeral - \ifx\protect\@typeset@protect - \expandafter %1 - \expandafter %2 - \expandafter %1 - \expandafter %3 expands the \csname inside \end<space> - \expandafter %1 - \expandafter %2 expands \end<space> - \expandafter %1 expands the \else - \z@ - \else - \expandafter\z@\expandafter\protect - \fi - }% - \expandafter\noexpand\csname end \endcsname - } -% \end{macrocode} -% Version that adds hooks (so different from the 2019 version). It -% fixes tlb3722 but the change should perhaps be made in -% \texttt{tabularx} instead. -% \begin{macrocode} -\@namedef{end }#1{% - \romannumeral - \IfHookEmptyTF{env/#1/end}% - {\expandafter\z@}% - {\z@\UseHook{env/#1/end}}% - \csname end#1\endcsname\@checkend{#1}% - \expandafter\endgroup\if@endpe\@doendpe\fi - \UseHook{env/#1/after}% - \if@ignore\@ignorefalse\ignorespaces\fi -} -% \end{macrocode} -% Version without the fix for tlb3722 for the record: -% \begin{macrocode} -%\@namedef{end }#1{% -% \UseHook{env/#1/end}% -% \csname end#1\endcsname\@checkend{#1}% -% \expandafter\endgroup\if@endpe\@doendpe\fi -% \UseHook{env/#1/after}% -% \if@ignore\@ignorefalse\ignorespaces\fi}% -% \end{macrocode} -% % \begin{macrocode} %</2ekernel|latexrelease> %<latexrelease>\EndIncludeInRelease @@ -822,6 +804,7 @@ %<latexrelease> \csname #1\endcsname}}% %<latexrelease> \@ignorefalse %<latexrelease> \begingroup\@endpefalse\reserved@a} +%<latexrelease>\EndIncludeInRelease % \end{macrocode} % A version that doesn't start out with \cs{relax} when in % typesetting mode would be the following, but since \cs{begin} @@ -847,7 +830,45 @@ % \begingroup\@endpefalse\reserved@a} % \end{macrocode} % +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\begin}{Making \begin/\end robust}% +%<latexrelease>\def\begin#1{% +%<latexrelease> \@ifundefined{#1}% +%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% +%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}% +%<latexrelease> \edef\@currenvline{\on@line}% +%<latexrelease> \csname #1\endcsname}}% +%<latexrelease> \@ignorefalse +%<latexrelease> \begingroup\@endpefalse\reserved@a} +%<latexrelease> +% \end{macrocode} +% Also undo the internal commands as some packages unfortunately test +% for their existence instead of using \cs{IfFormatAtLeastTF}. +% \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin} +% and \cs{end} in rollback (gh/494)} +% \begin{macrocode} +%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined +%<latexrelease> +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro} +% + + + + % \begin{macro}{\end} +% The top level definition for \cs{end}. +% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions +% for individual rollback} +% \begin{macrocode} +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2019/10/01}% +%<latexrelease> {\end}{Making \begin/\end robust}% +% \end{macrocode} % While \cs{begin} was made robust simply by using % \cs{DeclareRobustCommand} we need to be a bit more subtle with % \cs{end} as there are packages out there that try to look into @@ -895,65 +916,129 @@ % \changes{v1.1p}{2019/08/27}{Make command robust} % % \begin{macrocode} -%<latexrelease>\edef\end -%<latexrelease> {\unexpanded{% -%<latexrelease> \romannumeral -%<latexrelease> \ifx\protect\@typeset@protect -%<latexrelease> \expandafter %1 -%<latexrelease> \expandafter %2 -%<latexrelease> \expandafter %1 -%<latexrelease> \expandafter %3 expands the \csname inside \end<space> -%<latexrelease> \expandafter %1 -%<latexrelease> \expandafter %2 expands \end<space> -%<latexrelease> \expandafter %1 expands the \else -%<latexrelease> \z@ -%<latexrelease> \else -%<latexrelease> \expandafter\z@\expandafter\protect -%<latexrelease> \fi -%<latexrelease> }% -%<latexrelease> \expandafter\noexpand\csname end \endcsname -%<latexrelease> } +\edef\end + {\unexpanded{% + \romannumeral + \ifx\protect\@typeset@protect + \expandafter %1 + \expandafter %2 + \expandafter %1 + \expandafter %3 expands the \csname inside \end<space> + \expandafter %1 + \expandafter %2 expands \end<space> + \expandafter %1 expands the \else + \z@ + \else + \expandafter\z@\expandafter\protect + \fi + }% + \expandafter\noexpand\csname end \endcsname + } +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease % \end{macrocode} % And here is the original definition of \cs{end} the way it was in % \LaTeX{} for several decades now hidden in \verb*=\end =. % \begin{macrocode} -%<latexrelease>\@namedef{end }#1{% +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\end}{Making \begin/\end robust}% +%<latexrelease>\def\end#1{% %<latexrelease> \csname end#1\endcsname\@checkend{#1}% %<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi %<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi} +%<latexrelease> %<latexrelease>\EndIncludeInRelease +%<*2ekernel> % \end{macrocode} -% An here the rollback in case that is ever needed. +% \end{macro} + + + +% \begin{macro}{\end\verbvisiblespace} +% The internal version with a space at the end. % \begin{macrocode} -%<latexrelease>\IncludeInRelease{0000/00/00}% -%<latexrelease> {\begin}{Making \begin/\end robust}% -%<latexrelease>\def\begin#1{% -%<latexrelease> \@ifundefined{#1}% -%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}% -%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}% -%<latexrelease> \edef\@currenvline{\on@line}% -%<latexrelease> \csname #1\endcsname}}% -%<latexrelease> \@ignorefalse -%<latexrelease> \begingroup\@endpefalse\reserved@a} -%<latexrelease>\def\end#1{% +%</2ekernel> +%<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\end!space}{New @endpe handling}% +\@namedef{end }#1{% + \romannumeral + \IfHookEmptyTF{env/#1/end}% + {\expandafter\z@}% + {\z@\UseHook{env/#1/end}}% + \csname end#1\endcsname\@checkend{#1}% +% \end{macrocode} +% We can now close the environment group and due to the new +% \cs{if@endpe} handling we no longer need to \cs{expandafter} +% out of the group. +% \changes{v1.2d}{2024/06/23}{Adjust for new \texttt{@endpe} handling} +% \begin{macrocode} +% \expandafter\endgroup\if@endpe\@doendpe\fi + \endgroup + \UseHook{env/#1/after}% + \if@ignore\@ignorefalse\ignorespaces\fi +} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% Version that adds hooks (so different from the 2019 version). It +% fixes tlb3722 but the change should perhaps be made in +% \texttt{tabularx} instead. +% \begin{macrocode} +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2020/10/01}% +%<latexrelease> {\end!space}{Use hook system}% +%<latexrelease> +%<latexrelease>\@namedef{end }#1{% +%<latexrelease> \romannumeral +%<latexrelease> \IfHookEmptyTF{env/#1/end}% +%<latexrelease> {\expandafter\z@}% +%<latexrelease> {\z@\UseHook{env/#1/end}}% +%<latexrelease> \csname end#1\endcsname\@checkend{#1}% +%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi +%<latexrelease> \UseHook{env/#1/after}% +%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi +%<latexrelease>} +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% Version without the fix for tlb3722 for the record: +%\begin{verbatim} +%\@namedef{end }#1{% +% \UseHook{env/#1/end}% +% \csname end#1\endcsname\@checkend{#1}% +% \expandafter\endgroup\if@endpe\@doendpe\fi +% \UseHook{env/#1/after}% +% \if@ignore\@ignorefalse\ignorespaces\fi}% +% \end{verbatim} +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2019/10/01}% +%<latexrelease> {\end!space}{Making \begin/\end robust}% +%<latexrelease> +%<latexrelease>\@namedef{end }#1{% %<latexrelease> \csname end#1\endcsname\@checkend{#1}% %<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi %<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi} -%<latexrelease> +%<latexrelease>\EndIncludeInRelease % \end{macrocode} -% Also undo the internal commands as some packages unfortunately test +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{0000/00/00}% +%<latexrelease> {\end!space}{Making \begin/\end robust}% +% \end{macrocode} +% Undo the internal command as some packages unfortunately test % for their existence instead of using \cs{IfFormatAtLeastTF}. % \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin} % and \cs{end} in rollback (gh/494)} % \begin{macrocode} -%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined %<latexrelease>\expandafter\let\csname end \endcsname\@undefined %<latexrelease> %<latexrelease>\EndIncludeInRelease %<*2ekernel> % \end{macrocode} % \end{macro} -% \end{macro} % % % diff --git a/macros/latex/base/ltnews.pdf b/macros/latex/base/ltnews.pdf Binary files differindex 3f5b51ca6f..4d89fa661f 100644 --- a/macros/latex/base/ltnews.pdf +++ b/macros/latex/base/ltnews.pdf diff --git a/macros/latex/base/ltnews.tex b/macros/latex/base/ltnews.tex index d4a6d274ae..af21aad00b 100644 --- a/macros/latex/base/ltnews.tex +++ b/macros/latex/base/ltnews.tex @@ -40,7 +40,7 @@ \ProvidesFile{ltnews.tex}% [2022/06/10 v1.4e Master file for ltnews*.tex (LaTeX Project)] -\providecommand*{\lastissue}{39} +\providecommand*{\lastissue}{40} \InputIfFileExists{ltnews-lastissue.cfg}{}{} diff --git a/macros/latex/base/ltnews01.pdf b/macros/latex/base/ltnews01.pdf Binary files differindex 91841e1b47..7f03749dc6 100644 --- a/macros/latex/base/ltnews01.pdf +++ b/macros/latex/base/ltnews01.pdf diff --git a/macros/latex/base/ltnews02.pdf b/macros/latex/base/ltnews02.pdf Binary files differindex 474a6f4c06..60f2410284 100644 --- a/macros/latex/base/ltnews02.pdf +++ b/macros/latex/base/ltnews02.pdf diff --git a/macros/latex/base/ltnews03.pdf b/macros/latex/base/ltnews03.pdf Binary files differindex 60f053d90c..54faadb8e8 100644 --- a/macros/latex/base/ltnews03.pdf +++ b/macros/latex/base/ltnews03.pdf diff --git a/macros/latex/base/ltnews04.pdf b/macros/latex/base/ltnews04.pdf Binary files differindex 77dac1a081..1514366b37 100644 --- a/macros/latex/base/ltnews04.pdf +++ b/macros/latex/base/ltnews04.pdf diff --git a/macros/latex/base/ltnews05.pdf b/macros/latex/base/ltnews05.pdf Binary files differindex 93db703e8c..ea93ba9a5d 100644 --- a/macros/latex/base/ltnews05.pdf +++ b/macros/latex/base/ltnews05.pdf diff --git a/macros/latex/base/ltnews06.pdf b/macros/latex/base/ltnews06.pdf Binary files differindex 236c240408..eae56bbdbe 100644 --- a/macros/latex/base/ltnews06.pdf +++ b/macros/latex/base/ltnews06.pdf diff --git a/macros/latex/base/ltnews07.pdf b/macros/latex/base/ltnews07.pdf Binary files differindex 163ec550cd..31d6c1f963 100644 --- a/macros/latex/base/ltnews07.pdf +++ b/macros/latex/base/ltnews07.pdf diff --git a/macros/latex/base/ltnews08.pdf b/macros/latex/base/ltnews08.pdf Binary files differindex 06993859b7..b01b5d39c2 100644 --- a/macros/latex/base/ltnews08.pdf +++ b/macros/latex/base/ltnews08.pdf diff --git a/macros/latex/base/ltnews09.pdf b/macros/latex/base/ltnews09.pdf Binary files differindex 66fb48b3af..f380c97417 100644 --- a/macros/latex/base/ltnews09.pdf +++ b/macros/latex/base/ltnews09.pdf diff --git a/macros/latex/base/ltnews10.pdf b/macros/latex/base/ltnews10.pdf Binary files differindex a06f34778a..a18f4a136b 100644 --- a/macros/latex/base/ltnews10.pdf +++ b/macros/latex/base/ltnews10.pdf diff --git a/macros/latex/base/ltnews11.pdf b/macros/latex/base/ltnews11.pdf Binary files differindex 681035cad2..78e88d5b11 100644 --- a/macros/latex/base/ltnews11.pdf +++ b/macros/latex/base/ltnews11.pdf diff --git a/macros/latex/base/ltnews12.pdf b/macros/latex/base/ltnews12.pdf Binary files differindex 3eba711f51..37a99b3e05 100644 --- a/macros/latex/base/ltnews12.pdf +++ b/macros/latex/base/ltnews12.pdf diff --git a/macros/latex/base/ltnews13.pdf b/macros/latex/base/ltnews13.pdf Binary files differindex 5180a3655b..2dd24756fa 100644 --- a/macros/latex/base/ltnews13.pdf +++ b/macros/latex/base/ltnews13.pdf diff --git a/macros/latex/base/ltnews14.pdf b/macros/latex/base/ltnews14.pdf Binary files differindex 1fcf453074..00e465ad1d 100644 --- a/macros/latex/base/ltnews14.pdf +++ b/macros/latex/base/ltnews14.pdf diff --git a/macros/latex/base/ltnews15.pdf b/macros/latex/base/ltnews15.pdf Binary files differindex a1e7b44229..3d4bc512c7 100644 --- a/macros/latex/base/ltnews15.pdf +++ b/macros/latex/base/ltnews15.pdf diff --git a/macros/latex/base/ltnews16.pdf b/macros/latex/base/ltnews16.pdf Binary files differindex 193c55f53b..384fff9fb2 100644 --- a/macros/latex/base/ltnews16.pdf +++ b/macros/latex/base/ltnews16.pdf diff --git a/macros/latex/base/ltnews17.pdf b/macros/latex/base/ltnews17.pdf Binary files differindex d1d952fb15..147c4cb2aa 100644 --- a/macros/latex/base/ltnews17.pdf +++ b/macros/latex/base/ltnews17.pdf diff --git a/macros/latex/base/ltnews18.pdf b/macros/latex/base/ltnews18.pdf Binary files differindex 14acb207f0..ce26b800c0 100644 --- a/macros/latex/base/ltnews18.pdf +++ b/macros/latex/base/ltnews18.pdf diff --git a/macros/latex/base/ltnews19.pdf b/macros/latex/base/ltnews19.pdf Binary files differindex 1a73bc6a80..ca74ef797c 100644 --- a/macros/latex/base/ltnews19.pdf +++ b/macros/latex/base/ltnews19.pdf diff --git a/macros/latex/base/ltnews20.pdf b/macros/latex/base/ltnews20.pdf Binary files differindex 9fa7545968..00105be031 100644 --- a/macros/latex/base/ltnews20.pdf +++ b/macros/latex/base/ltnews20.pdf diff --git a/macros/latex/base/ltnews21.pdf b/macros/latex/base/ltnews21.pdf Binary files differindex 6893765e9f..ffaa8cff1d 100644 --- a/macros/latex/base/ltnews21.pdf +++ b/macros/latex/base/ltnews21.pdf diff --git a/macros/latex/base/ltnews22.pdf b/macros/latex/base/ltnews22.pdf Binary files differindex 30f755b1f4..499a7afea9 100644 --- a/macros/latex/base/ltnews22.pdf +++ b/macros/latex/base/ltnews22.pdf diff --git a/macros/latex/base/ltnews23.pdf b/macros/latex/base/ltnews23.pdf Binary files differindex 233e35b459..eeecf11708 100644 --- a/macros/latex/base/ltnews23.pdf +++ b/macros/latex/base/ltnews23.pdf diff --git a/macros/latex/base/ltnews24.pdf b/macros/latex/base/ltnews24.pdf Binary files differindex c8d8af26e0..8b19be7a8f 100644 --- a/macros/latex/base/ltnews24.pdf +++ b/macros/latex/base/ltnews24.pdf diff --git a/macros/latex/base/ltnews25.pdf b/macros/latex/base/ltnews25.pdf Binary files differindex e0753c8c72..ba7cee2805 100644 --- a/macros/latex/base/ltnews25.pdf +++ b/macros/latex/base/ltnews25.pdf diff --git a/macros/latex/base/ltnews26.pdf b/macros/latex/base/ltnews26.pdf Binary files differindex 8ce8e93db6..5fd59b9e05 100644 --- a/macros/latex/base/ltnews26.pdf +++ b/macros/latex/base/ltnews26.pdf diff --git a/macros/latex/base/ltnews27.pdf b/macros/latex/base/ltnews27.pdf Binary files differindex feeb71e8fe..bde7b5689c 100644 --- a/macros/latex/base/ltnews27.pdf +++ b/macros/latex/base/ltnews27.pdf diff --git a/macros/latex/base/ltnews28.pdf b/macros/latex/base/ltnews28.pdf Binary files differindex cc8ec92af3..483add33a2 100644 --- a/macros/latex/base/ltnews28.pdf +++ b/macros/latex/base/ltnews28.pdf diff --git a/macros/latex/base/ltnews29.pdf b/macros/latex/base/ltnews29.pdf Binary files differindex e29df22f87..8731178200 100644 --- a/macros/latex/base/ltnews29.pdf +++ b/macros/latex/base/ltnews29.pdf diff --git a/macros/latex/base/ltnews30.pdf b/macros/latex/base/ltnews30.pdf Binary files differindex 358d60cf96..434de972f6 100644 --- a/macros/latex/base/ltnews30.pdf +++ b/macros/latex/base/ltnews30.pdf diff --git a/macros/latex/base/ltnews31.pdf b/macros/latex/base/ltnews31.pdf Binary files differindex e769963401..4c948f7aa3 100644 --- a/macros/latex/base/ltnews31.pdf +++ b/macros/latex/base/ltnews31.pdf diff --git a/macros/latex/base/ltnews32.pdf b/macros/latex/base/ltnews32.pdf Binary files differindex ce4d2ab986..5046f3a8ca 100644 --- a/macros/latex/base/ltnews32.pdf +++ b/macros/latex/base/ltnews32.pdf diff --git a/macros/latex/base/ltnews33.pdf b/macros/latex/base/ltnews33.pdf Binary files differindex a2491f2576..62b46aec74 100644 --- a/macros/latex/base/ltnews33.pdf +++ b/macros/latex/base/ltnews33.pdf diff --git a/macros/latex/base/ltnews34.pdf b/macros/latex/base/ltnews34.pdf Binary files differindex 5eb6d70276..56f03536fb 100644 --- a/macros/latex/base/ltnews34.pdf +++ b/macros/latex/base/ltnews34.pdf diff --git a/macros/latex/base/ltnews35.pdf b/macros/latex/base/ltnews35.pdf Binary files differindex 0c7fa0bbdc..c7b9f907ad 100644 --- a/macros/latex/base/ltnews35.pdf +++ b/macros/latex/base/ltnews35.pdf diff --git a/macros/latex/base/ltnews36.pdf b/macros/latex/base/ltnews36.pdf Binary files differindex 4d971aeaa0..fc184fb14d 100644 --- a/macros/latex/base/ltnews36.pdf +++ b/macros/latex/base/ltnews36.pdf diff --git a/macros/latex/base/ltnews37.pdf b/macros/latex/base/ltnews37.pdf Binary files differindex 71347c4bd3..b282150961 100644 --- a/macros/latex/base/ltnews37.pdf +++ b/macros/latex/base/ltnews37.pdf diff --git a/macros/latex/base/ltnews38.pdf b/macros/latex/base/ltnews38.pdf Binary files differindex 2c00b0de74..8e93e0bb9b 100644 --- a/macros/latex/base/ltnews38.pdf +++ b/macros/latex/base/ltnews38.pdf diff --git a/macros/latex/base/ltnews39.pdf b/macros/latex/base/ltnews39.pdf Binary files differindex cdbbe0d23b..247210cac7 100644 --- a/macros/latex/base/ltnews39.pdf +++ b/macros/latex/base/ltnews39.pdf diff --git a/macros/latex/base/ltnews39.tex b/macros/latex/base/ltnews39.tex index 7d2b039439..ab62f12ad4 100644 --- a/macros/latex/base/ltnews39.tex +++ b/macros/latex/base/ltnews39.tex @@ -388,7 +388,7 @@ Around 2020 we added a number of conditionals with CamelCase names, i.e., % \cs{IfClassAtLeastTF}, \cs{IfClassLoadedTF}, -\cs{IfClassLoadedWithOptionsFF}, +\cs{IfClassLoadedWithOptionsTF}, \cs{IfFormatAtLeastTF}, \cs{IfPackageAtLeastTF}, \cs{IfPackageLoadedTF}, and @@ -728,12 +728,15 @@ logic for the strut changes when vertical mode is detected. \subsection{Fix a ``missing \cs{item}'' rollback error} If \LaTeX{} is rolled back to a date between 2023/06/01 (inclusive) and -2024/06/01 (exclusive), any list-based environment would raise an error +2024/06/01 (exclusive), any list-based environment would raise an +error: +%(shown on two lines for \textsl{TUGboat}): \begin{verbatim} -! LaTeX Error: Something's wrong--perhaps a missing \item. +! LaTeX Error: Something's wrong--perhaps +a missing \item. \end{verbatim} This has now been corrected as a hotfix in patch level 2, by enhancing -a 2023/06/01 version rollback code of new paragraph mechanism. +the 2023/06/01 version rollback code of the new paragraph mechanism. % \githubissue{1386} @@ -825,6 +828,7 @@ of \pkg{amsthm} theorem styles. This extra box has now been avoided. % \githubissue{1123} +\tubcommand{\newpage} \subsection{\pkg{xr}:\ Support links and properties} % The \pkg{xr} package implements a system for eXternal References. diff --git a/macros/latex/base/ltnews40.pdf b/macros/latex/base/ltnews40.pdf Binary files differnew file mode 100644 index 0000000000..2a061f6fab --- /dev/null +++ b/macros/latex/base/ltnews40.pdf diff --git a/macros/latex/base/ltnews40.tex b/macros/latex/base/ltnews40.tex new file mode 100644 index 0000000000..cbb04bcb40 --- /dev/null +++ b/macros/latex/base/ltnews40.tex @@ -0,0 +1,758 @@ +% \iffalse meta-comment +% +% Copyright 2024 +% 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: ltnews40.tex +% +% This is issue 40 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} + +\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} + + +% same for issues in the tagging repository: + +\providecommand\taggingissue[2][]{\ifhmode\unskip\fi + \quad\penalty500\strut\nobreak\hfill + \mbox{\small\slshape(% + \href{https://github.com/latex3/tagging-project/issues/\getfirstgithubissue#2 \relax}% + {github tagging issue#1 #2}% + )}% + \par\smallskip} + +%% But Chris has to mostly disable \href for his TEXPAD app: +%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine + +% simple solution right now (just link to the first issue if there are several) +\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 + + +\let\finalpagebreak\pagebreak % for TUB (if they use it) +\let\finalvspace\vspace % for document layout fixes + +\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 + + +% Undo ltnews's \verbatim@font with active < and > +\makeatletter +\def\verbatim@font{\normalsize\ttfamily} +\makeatother + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand\tubcommand[1]{} +\tubcommand{\input{tubltmac}} + +\publicationmonth{November} +%\publicationyear{2024 --- DRAFT version for upcoming release} +\publicationyear{2024} + +\publicationissue{40} + +\begin{document} + +\maketitle +{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 +\tableofcontents} + +\setlength\rightskip{0pt plus 3em} + +\medskip + + +\section{Thirty years of \LaTeXe{}} + +In summer 1994, i.e., thirty years ago, \LaTeXe{} saw its first public +release. Back then it was meant to be an intermediate version (hence +the $\epsilon$) on the way to a major new version (the mythical +\LaTeX3) that we expected to take a couple of more years to reach +maturity. It took much more than that in the end\Dash nominally, +\LaTeXe{} is still with us today. + +However, under the hood, \LaTeXe{} changed a lot throughout these +thirty years, as one can see, for example, when looking through the +forty newsletters~\cite{40:ltnews} that accompanied the \LaTeX{} +releases that happened in the meantime. + +During the first two decades, the \LaTeX{} kernel was kept largely +stable with only minimal bug fix activities. During that period +additional functionality was mostly provided through new or +extended packages that could be loaded in the document preamble. This +included many of the ideas targeted for \LaTeX3{}, e.g., \pkg{expl3} +(\LaTeX3 programming language), \pkg{xparse} (new document command +interface), \pkg{xtemplate} (a configuration mechanism), and many +others. + +Initially, this approach worked well and provided good backward +compatibility; however, over time it became apparent that keeping all +developments confined to packages was more and more problematical. +Features or bug fixes that should have been generally available, i.e., +part of the kernel, were only available in packages, so a lot of +dependencies between packages were introduced and resulted in +convoluted code that was difficult to manage. For example, +\pkg{hyperref} had to rewrite a lot of kernel (and package) macros, so +the code and behavior of other packages had to change depending on +whether or not \pkg{hyperref} was loaded or not. + +Thus, in 2015 the \LaTeX{} team decided to change the policy and +(re)start active kernel development, see~\cite{40:ltnews22}. To ensure +continuous backward compatibility we introduced at the same time the +\pkg{latexrelease} package that enables users to roll back changes to +the \LaTeX{} kernel to an earlier release, in case this is necessary +to successfully rerun a document produced at that time. + +As a consequence of this policy change the last decade saw a larger +number of enhancements and corrections that were made part of the +\LaTeX{} kernel. Overall, we can confidently say that the new +approach has worked well and enabled us to modernize \LaTeX{} and ensure +that it remains relevant without compromising one of the cornerstones +of \LaTeX{}: its outstanding ability to reprocess old documents +written many years ago. + +Being able to update and modernize the kernel sources allowed us to +embark in 2019 on the multi-year \enquote{\LaTeX{} Tagged PDF} project +with the goal of automatically providing accessible PDF documents with +\LaTeX{}. While there are several more project phases to complete, the +milestones already reached allow users to generate PDF/UA compliant +documents if the input is restricted to a (growing) subset of packages +and document classes; see next section and previous newsletters. + + A big change happened with the 2020-02-02 release as part of the project activity, + albeit somewhat obfuscated by us as \enquote{Improved load-times for + \pkg{expl3}}. While technically correct, what it really meant is + that we had finally integrated the programming layer of \LaTeX3, + i.e., the ideas originally sketched out around 1992. Or saying it + differently: with that date the original ideas for \LaTeX3 became a + reality as part of the standard \LaTeX{} kernel. + + With the programming layer available under the hood we were then able to + provide new concepts and extensions as part of \LaTeX{}, + e.g., the hook management system, a new mark mechanism, core + functionality for tagging and PDF resource management, a consistent + key/value interface, and more recently the socket and plug mechanism. + + More will follow while we continue to work on modernizing \LaTeX{} and + bringing the Tagged PDF project to a truly successful completion\Dash so + stay tuned and watch this space for future announcements in the next + newsletters. + + + +\section{News from the \enquote{\LaTeX{} Tagged PDF} project} + +\subsection{Engine support:\ An important update} + +As detailed below, work is progressing on the Tagged PDF +project. There are many drivers for this work, including legal changes +in many places which will increasingly require well-tagged PDFs +including full support for mathematics. As part of the work on this, +we are looking at the technical abilities of the \TeX{} engines. + +With \XeTeX{}, it is impossible to reliably produce tagged PDFs due to +engine limitations. The increasing importance of tagged PDFs means +that this requires a move away from \XeTeX{}. We will continue to +address issues with \XeTeX{} support in team-maintained \LaTeX{} code +on a best-effort basis. No \emph{new} functionality will be added for +\XeTeX{} by the \LaTeX{} team. It is likely that over time +functionality may become more restricted, and users are urged to +migrate \XeTeX{} documents to \LuaTeX{}. + +For \pdfTeX{}, tagging is available and we are able to support +mathematics by including relevant \TeX{} source or by using +externally-generated MathML. Only \LuaTeX{} is capable of +\emph{automatic} generation of MathML as part of a \LaTeX{} run. Thus +\pdfTeX{} continues to be supported for existing material, but for new +documents, moving to \LuaTeX{} is recommended. + +We cannot make statements about the support for other engines such as +(u)p\TeX{}, as we don't use these programs nor have in depth knowledge +of their functionalities. To the best of our knowledge, core \LaTeX{} +works well with these engines, but if and to what extent tagging can +be supported will remain to be seen. If relevant information becomes +available to us we will provide an update in future editions of the +\LaTeX{} newsletter. + + +\subsection{Tagging support for external packages} + +At \url{https://latex3.github.io/tagging-project/tagging-status/} we +show the status of many \LaTeX{} packages and classes with respect to +PDF tagging. We also started to improve tagging support in external +packages. If the \texttt{firstaid} key is used in addition to the +\texttt{phase-III} key basic commands of several packages, including +\pkg{amsthm} and \pkg{fancyvrb}, can now be used. + + +\subsection{Improved table tagging} + +The tagging of tabulars has been extended: it is now possible to tag +row headers and to create cells that span more than one row. + +The interface to this functionality is not finalized but can be +accessed in the current release by specifying the row and columns to +be treated as headers. For example +% +\begin{verbatim} + \tagpdfsetup{ + table/header-rows={1,2}, + table/header-columns={1} } +\end{verbatim} +would specify that in the following tables the first two rows and +first column of each row should be tagged as heading entries. + +Similarly you may add a RowSpan attributes to tag a cell that spans +two rows using: +\begin{verbatim} + \tagpdfsetup{table/multirow={2}} +\end{verbatim} + + +\subsection{Automatic MathML tagging} + +When Lua\LaTeX{} is being used, and the \pkg{luamml} package is +available, and if the document uses the \pkg{unicode-math} package, +then the math module will automatically convert each math formula to +MathML and use it to attach MathML associated files (or MathML +Structure elements) to the tagged PDF. This new feature can be +disabled with \verb+\tagpdfsetup{math/mathml/luamml/load=false}+. More +options to configure MathML tagging can be found in the documentation +of \pkg{latex-lab-math}. + + +\subsection{Change behavior of tagging sockets with two arguments} + +When calling tagging sockets with two arguments using +\cs{UseTaggingSocket} when tagging is suspended, previous versions of +\LaTeXe{} dropped both arguments. This behavior has been changed to +drop the first argument and preserve the second one instead, thereby +allowing tagging sockets to be used to wrap existing content which +should still appear in a non-tagging context. + +Since no tagging sockets currently provided by \LaTeX{} use two +arguments we do not expect this change to affect any existing +documents, but if a custom tagging socket has been defined outside of +the kernel it might need to be adapted to be compatible with the new +behavior. +% +\githubissue{1500} + + + + +\section{Changes to the \LaTeX{} kernel} + +\subsection{Handling paragraph continuation} + +Already \LaTeX~2.09 offered some automation to detect whether or not +text after a list or some other display environment is meant to be a +continuation of the current paragraph or should start a new one. The +document-level syntax for this is that a blank line after such an +environment signals to \LaTeX{} that it should start a new paragraph; +whilst no blank line signals that there should be no new paragraph and +the text should be considered a continuation. + +Unfortunately, there were a number of cases where the original 2.09 +approach failed, e.g., with +\begin{flushleft} + \ttfamily +\ \ \{\meta{local customizations}\\ +\ \ \cs{begin}\{equation\} a<b \cs{end}\{equation\}\} \\ +\ \ \meta{some text} +\end{flushleft} +the \meta{some text} incorrectly started a new paragraph. Bug reports +about this behavior can be traced back to the time \LaTeXe{} was +developed, e.g., one test file from 1992 has a note that the above +case was unfortunately not resolvable despite some improvements made +back then. The main cause of the issue (as you probably guessed) is +that the mechanism failed whenever the environment was executed within +a group (\texttt{\{...\}}, \cs{begingroup}/\cs{endgroup}, or +\cs{bgroup}/\cs{egroup} pair) that was closed before the next blank +line was reached. + +While most of the time this could be visually corrected by adding some +explicit \cs{noindent}, the situation got worse when we tried to +implement tagged PDFs resulting in incorrect structures or worse. + +We therefore made a new attempt to resolve this problem in every +situation and this new solution is rolled out in the current release. + + +\subsection{Avoid bogus \enquote{no item} error} + +The commands \cs{addvspace} and \cs{addpenalty} generated the famous +error message \enquote{Something's wrong---perhaps a missing \cs{item}} +when they were encountered outside vertical mode. Most of the time +this error was bogus and if not, then it was generated several times +rather than once. + +Once upon a time (in \LaTeX{}~2.09) it was necessary that these +commands were used only in vertical mode, but with \LaTeXe{} in 1994, +we changed the internals but simply overlooked that this error message +then had become useless. In this release, i.e.,~30 years too late, we +have finally lifted the ban and from now on this error should only +show up if there is indeed a missing \cs{item}. +% +\githubissue{1460} + + +\subsection[Switch to T1 as default encoding in documents + using \cs{DocumentMetadata}] + {Switch to T1 as default encoding in documents\\\mbox\qquad + using \cs{DocumentMetadata}} + +As it is well known, the font encoding \texttt{OT1} supports only 128 +characters and has various problems and quirks notably for languages +different to English. Nevertheless \texttt{OT1} is the default +encoding in \LaTeX{} and this cannot be easily changed without +affecting many documents as the \texttt{T1} version of the fonts have +slightly different metrics. + +The introduction of the \cs{DocumentMetadata} command, which announces +\emph{new} code and changes that can also affect the layout gives us +now the opportunity to make this step. So with this version a use of +\cs{DocumentMetadata} with (pdf)\LaTeX{} will setup \texttt{T1} as +default font encoding.\footnote{The Unicode engines will continue to +use \texttt{TU} as the encoding.} To ensure that scalable fonts are used, +the package \pkg{cm-super} has to be installed. Users who want to +revert to the \texttt{OT1} encoding in their document can do so with +\verb+\usepackage[OT1]{fontenc}+. + + + + +\section{Code improvements} + +\subsection[Avoiding key--value option clashes between classes and packages] + {Avoiding key--value option clashes between classes\\\mbox\qquad and packages} + +In \LaTeX{} News~35~\cite{40:ltnews35} we introduced key--value option +processing to the kernel. Following the standard for \LaTeXe{} +options, keyval options given to the \cs{documentclass} line were +treated as global and so parsed by every package. However, with +keyvals, the likelihood of a name clash between a class-specific +option and one used by a package is much higher than it is with simple +strings. We have therefore refined the mechanism in the current +release. + +When a class uses the kernel keyval processor, any options it +recognizes are recorded and any packages using the keyval processor +will then \emph{skip} these \enquote{global} options. To allow for the +case where a class directly uses an option which should be global (for +example \texttt{draft}), a new key property \texttt{.pass-to-packages} +has been added. This can then be set to indicate that this key is not +to be skipped. For example +\begin{verbatim} + \DeclareKeys{ + draft .if = {ifl@cls@draft}, + draft .pass-to-packages = true, + mode .store = \cls@mode + } +\end{verbatim} +in a class would create two options, \texttt{draft} and +\texttt{mode}. The \texttt{draft} option will be treated in the normal +way by packages using keyvals, but they will ignore the \texttt{mode} +option: it is effectively marked as \enquote{private} to the class. +% +\githubissue{1279} + +\subsection{Improvement to \textup{\XeTeX}\ \cs{showhyphens}} + +When using \cs{showhyphens} with \XeTeX, missing character warnings +would be generated for any character not in Latin Modern. This has +been corrected and the warnings are suppressed. +% +\githubissue{1380} + +\subsection{Improved error raised by empty hook} + +When using the hook management, both hook and label names (if +specified) should be non-empty. Before, empty hook and empty label names both +raised the same label-specific error: +\begin{verbatim} +! LaTeX hooks Error: Empty code label on line .... + Using 'top-level' instead. +\end{verbatim} +This has now been improved. Now an empty hook raises +\begin{verbatim} +! LaTeX hooks Error: Empty hook on line .... +\end{verbatim} +% +\githubissue{1423} + +\subsection{Provide counter representations for link targets} + +To create unique target names for links the package \pkg{hyperref} +uses a special counter representation \verb+\theH+\meta{counter}. To +ensure that this counter representation exists, \pkg{hyperref} +redefined the commands \verb+\@definecounter+, \verb+\@addtoreset+ and +\verb+\refstepcounter+. This counter representation is also needed for +the Tagged PDF project and so these augmented command definitions +have now been incorporated into the kernel. Thus from now on every +\verb+\newcounter{+\meta{counter}\verb+}+ will not only define +\verb+\the+\meta{counter} but also \verb+\theH+\meta{counter}. + +\subsection{Extending \cs{refstepcounter}} + +For many years, the package \pkg{hyperref} had been redefining +\verb+\refstepcounter+ and adding code that creates link targets. The +kernel definition has now been extended with socket interfaces that +will allow \pkg{hyperref} to avoid the redefinitions. The new +interfaces are also used by the Tagged PDF code that needs target +names to resolve references between structures. + + +\section{Bug fixes} + +\subsection{Fix wrong file type in a rollback warning} + +When \LaTeX{} is rolled back to date \meta{date1} and a class or +package with minimum date requirement \meta{date2} is to be loaded, a +rollback warning is raised if \meta{date2} is later than \meta{date1}: +\begin{verbatim} +LaTeX Warning: Suspicious rollback/min-date + date given. + A minimal date of YYYY-MM-DD has been + specified for package '<pkgname>'. + But this is in conflict with a rollback + request to YYYY-MM-DD. +\end{verbatim} + +In some cases this message showed a wrong file type, i.e., +\verb|document class '<pkgname>'| or \verb|package '<clsname>'|. This +has now been corrected. +% +\githubissue{870} + +\subsection*{Fix existence check of document environments} + +\cs{NewDocumentEnvironment} and friends define (or redefine) a +document environment using the space-trimmed \meta{envname}, but the +existence check for \meta{envname} was done without space +trimming. Thus when the user-specified \meta{envname} consists of +leading and/or trailing space(s), it may lead to erroneously silent +environment declaration. For example, in +\begin{flushleft} +\ttfamily +\ \ \verb=\NewDocumentEnvironment{myenv}{}{begin}{end}=\\ +\ \ \verb*=\NewDocumentEnvironment{ myenv }{}{begin}{end}=\kern-1cm +\end{flushleft} +the first line defines a new environment \env{myenv} but the second +line would check existence for \verb*| myenv | (which is not yet +defined), then redefine \env{myenv} environment without raising any +errors. This has now been corrected. +% +\githubissue{1399} + +\subsection{Handling of global keys with spaces} + +If the global (class) options contained spaces around key names, +\cs{ProcessKeyOptions} would fail to remove known keys from the list +of unused global options and \cs{OptionNotUsed} would mistakenly add +space-surrounded key names to that list. The first issue was corrected as +a hotfix in patch level 1 of the November 2023 release (but +unfortunately not mentioned in~\cite{40:ltnews38}) and the second in the current +release. +% +\githubissue{1238} + +\subsection{File list entries for rolled back packages/classes} + +When the rollback mechanism for packages and classes was introduced in +2018~\cite{40:ltnews28}, loading of the selected historic release was +not recorded in the file list used by \cs{listfiles}. This has now +been corrected so that the extended usage~\cite{40:ltnews39} +\begin{verbatim} + \listfiles[hashes,sizes] +\end{verbatim} +now gives more complete and less confusing info. +% +\githubissue{1413} + +\subsection{\pkg{doc}:\ \cs{PrintDescribeMacro} in preamble} + +In \pkg{doc} version 2 it was possible to alter the definition of +\cs{PrintDescribeMacro} and similar commands in preamble. In version 3 +this stopped working because they were reset at the end of the +preamble. This has now been implemented differently and changes in the +preamble are possible again. +% +\githubissue{1000} + + +\subsection{Avoid low-level error if \cs{ShowHooks} is used late} + +If \cs{ShowHooks} was used to examine a package hook after the +package was loaded, a low level error resulted. This has now been +corrected. +% +\githubissue{1513} + +\subsection{Avoid code duplication in rollback} + +When the kernel uses \cs{AddToHook} in a region that might be rolled +back (which happens in a few places) and a document requests a +rollback, then we have the situation that the hook already contains +code to which we added the same (or slightly different) code during +the rollback; this results in code duplication or, worse, in +errors. This has now been corrected by dropping any such code chunk +(if there is one) prior to adding the rollback code. +% +\githubissue{1407} + + +\subsection{Passing template keys using \cs{KeyValue}} + +With the move of the template code to the kernel, internal +functions were reviewed to improve efficiency. However, there +was an oversight in how +passing key values from one setting to another was implemented, +such that using \cs{KeyValue} could result in an infinite +loop. This has now been fixed. +% +\githubissue{1486} + + + +\section{Changes to packages in the \pkg{amsmath} category} + +\subsection{Extend support for \cs{dots}} + +The implementation of \cs{dots} in \pkg{amsmath} has the feature that +it selects different dots depending on the symbol that follows: e.g., +dots between commas would normally be on the baseline, while dots +between binary or relational symbols would be raised. However, when +symbols such as \cs{cong} were protected from expansion in moving +arguments (so that they worked in places such as headings) it had the +unfortunate side-effect that the \cs{dots} magic stopped working for +them. This has now been corrected. +% +\githubissue{1265} + + + +%\section{Changes to packages in the \pkg{graphics} category} + +\section{Changes to packages in the \pkg{tools} category} + +\subsection{Modification to generation of the \file{.tex} from \pkg{fileerr}} + +The \pkg{fileerr} extraction has been modified to write +\texttt{rename-to-empty-base.tex} rather than \texttt{.tex} to comply +with an expected security change in \TeX{}~Live 2025. The +\texttt{build.lua} file for the \pkg{tools} has been modified to +rename \texttt{rename-to-empty-base.tex} to \texttt{.tex} after +unpacking. However if using \textsf{docstrip} directly rather than +using \textsf{l3build} or the unpacked zip file from \CTAN{}, the user +must now rename the file and install as \texttt{.tex}. +% +\githubissue{1412} + + +\subsection{\pkg{array}:\ Improve \texttt{>\{...\}} specifier} + +If the argument of \texttt{>\{...\}} ended with a command accepting a +trailing optional argument, e.g., defined for example with +\verb=\NewDocumentCommand\foo{o}{...}=, one could get low-level +parsing errors. This has now been corrected. +% +\githubissue{1468} + + +\subsection{\pkg{array}:\ Tagging support for \cs{cline}} + +In the last release we added tagging support for \pkg{array}, +\pkg{longtable} and other tabular packages, but we overlooked that the +kernel definition for \cs{cline} also needs modification because the +rule generated by the command needs to be tagged as an +artifact. Furthermore, the processing of a \cs{cline} looks to the +algorithm as if another row is added (which is technically what +happens), thus it was also necessary to decrement the internal row +counter to get a correct row count. This has now been corrected in +\pkg{array}, which is automatically loaded for tagging, so that all +these packages are now fully compatible with the tagging code if it is +turned on. +% +\taggingissue{134} + + + +\subsection{\pkg{longtable}:\ Extend caption type} + +The \pkg{longtable} package has been extended and now provides the command +\cs{LTcaptype} (stemming from the \pkg{ltcaption} package) to change +the counter and caption type used by the \cs{caption} command from +longtable. So with \verb+\renewcommand\LTcaptype{figure}+, a +longtable will step the figure counter instead of the table counter +and produce an entry in the list of figures. An empty definition, +\verb+\renewcommand\LTcaptype{}+, will suppress increasing of the +counter. This makes it easy to define an unnumbered variant of +longtable: +\begin{verbatim} + \newenvironment{longtable*} + {\renewcommand\LTcaptype{}\longtable} + {\endlongtable} +\end{verbatim} + +\subsection{\pkg{longtable}:\ Prevent \cs{pagegoal} exceeding maximum value} + +An internal guard has been added to avoid \TeX\ errors if +\verb=\pagegoal= is increased beyond the maximum value for a +\TeX\ dimension. +% +\githubissue{1495} + + + +\section{Changes to \pkg{l3build}} + +To support third-party developers testing their code against pre-release +\LaTeX{}, a new switch \verb|--dev| has been added to \pkg{l3build}. +This allows the developer to run +\begin{verbatim} + l3build check +\end{verbatim} +to run their test suite against the current release of \LaTeX{} and +\begin{verbatim} + l3build check --dev +\end{verbatim} +to run exactly the same tests using the development release of +\LaTeX{}. + +%\section{Changes to files in the \pkg{cyrillic} category} + +\begin{thebibliography}{9}\frenchspacing + +%\fontsize{9.3}{11.3}\selectfont + +\bibitem{40:Lamport} +Leslie Lamport. +\newblock \emph{{\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{40:ltnews} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 1--39}. June 2024. + \url{https://latex-project.org/news/latex2e-news/ltnews.pdf} + +\bibitem{40:ltnews22} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 22}. January 2015. + \url{https://latex-project.org/news/latex2e-news/ltnews22.pdf} + +\bibitem{40:ltnews28} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 28}. April 2018. + \url{https://latex-project.org/news/latex2e-news/ltnews28.pdf} + +\bibitem{40:ltnews35} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 35}. June 2022. + \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf} + +\bibitem{40:ltnews38} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 38}. November 2023. + \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf} + +\bibitem{40:ltnews39} \LaTeX{} Project Team. + \emph{\LaTeXe{} news 39}. June 2024. + \url{https://latex-project.org/news/latex2e-news/ltnews39.pdf} + +\end{thebibliography} + +\end{document} diff --git a/macros/latex/base/ltpara-code.pdf b/macros/latex/base/ltpara-code.pdf Binary files differindex c686d41abc..ee79bc58ee 100644 --- a/macros/latex/base/ltpara-code.pdf +++ b/macros/latex/base/ltpara-code.pdf diff --git a/macros/latex/base/ltpara-doc.pdf b/macros/latex/base/ltpara-doc.pdf Binary files differindex fb611f28ca..dea9bdc920 100644 --- a/macros/latex/base/ltpara-doc.pdf +++ b/macros/latex/base/ltpara-doc.pdf diff --git a/macros/latex/base/ltpara.dtx b/macros/latex/base/ltpara.dtx index b915856462..b7b895350d 100644 --- a/macros/latex/base/ltpara.dtx +++ b/macros/latex/base/ltpara.dtx @@ -17,7 +17,7 @@ %<*driver> % \fi \ProvidesFile{ltpara.dtx} - [2024/06/23 v1.0n LaTeX Kernel (paragraph hooks)] + [2024/06/29 v1.0n LaTeX Kernel (paragraph hooks)] % \iffalse % \documentclass{l3doc} @@ -480,7 +480,7 @@ % ended by \cs{RawParEnd}\footnote{Technical note for those who % know their \textit{\TeX book\/}: the \cs{RawParEnd} command % invokes the original \TeX{} engine definition of \cs{par} that -% (soley) triggers the paragraph builder in \TeX{} when found +% (solely) triggers the paragraph builder in \TeX{} when found % inside unrestricted horizontal mode and does nothing in other % processing modes.} % and not by \cs{par} (or a blank line), because the latter will execute @@ -634,7 +634,7 @@ % \glue(\parskip) 0.0 plus 1.0 % \glue(\baselineskip) 5.16669 %\end{verbatim} -% but now there is anothe \cs{parskip} glue (that is always 0pt): +% but now there is another \cs{parskip} glue (that is always 0pt): %\begin{verbatim} % \glue(\parskip) 0.0 plus 1.0 % \glue(\parskip) 0.0 @@ -1087,7 +1087,7 @@ % it should get removed before the hook code gets added so we have % to arrange for this removal. % -% As in other simular cases, it maybe best to add here +% As in other similar cases, it may be best to add here % a \cs{nobreak} in case the hook itself adds glue and thus % creates a non-explicit and unwanted potential breakpoont. % On the other hand (as has been argued) the code in the hook diff --git a/macros/latex/base/ltpictur.dtx b/macros/latex/base/ltpictur.dtx index ea5ac4205b..c6fc5236a5 100644 --- a/macros/latex/base/ltpictur.dtx +++ b/macros/latex/base/ltpictur.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltpictur.dtx} - [2021/04/20 v1.2b LaTeX Kernel (Picture Mode)] + [2024/07/08 v1.2b LaTeX Kernel (Picture Mode)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltpictur.dtx} @@ -1413,7 +1413,6 @@ % \begin{macrocode} \newif\if@ovvline \@ovvlinetrue \newif\if@ovhline \@ovhlinetrue -% \begin{macrocode} %</2ekernel|latexrelease> %<latexrelease>\EndIncludeInRelease %<latexrelease>\IncludeInRelease{0000/00/00}% diff --git a/macros/latex/base/ltproperties-code.pdf b/macros/latex/base/ltproperties-code.pdf Binary files differindex 98bacb9ebb..433c6f92ad 100644 --- a/macros/latex/base/ltproperties-code.pdf +++ b/macros/latex/base/ltproperties-code.pdf diff --git a/macros/latex/base/ltproperties-doc.pdf b/macros/latex/base/ltproperties-doc.pdf Binary files differindex b9112dff49..f376e03248 100644 --- a/macros/latex/base/ltproperties-doc.pdf +++ b/macros/latex/base/ltproperties-doc.pdf diff --git a/macros/latex/base/ltproperties.dtx b/macros/latex/base/ltproperties.dtx index 0fd8f22e0e..77d36a43a9 100644 --- a/macros/latex/base/ltproperties.dtx +++ b/macros/latex/base/ltproperties.dtx @@ -30,7 +30,7 @@ %<*driver> % \fi \ProvidesFile{ltproperties.dtx} - [2024/04/17 v1.0e LaTeX Kernel (Properties)] + [2024/10/21 v1.0h LaTeX Kernel (Properties)] % \iffalse % \documentclass[full]{l3doc} @@ -94,7 +94,7 @@ % and labels which consist of lists of these properties. The reason for the % split is that individual labels will want to record some but not all % properties. For examples, a label concerned with position would track -% the $x$ and $y$ co-ordinates of the current point, but not for example +% the $x$ and $y$ coordinates of the current point, but not for example % the page number. % % In the current implementation, properties share a single namespace. This @@ -363,7 +363,7 @@ % has been set with the standard \cs{label} command. % \end{function} % -% \begin{function}{\IfPropertyRecordedTF} +% \begin{function}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF} % \begin{syntax} % \cs{IfPropertyRecordedTF} \Arg{label} \Arg{property} \Arg{true code} \Arg{false code} % \end{syntax} @@ -404,7 +404,7 @@ % % \begin{variable}{pagenum} % (shipout) The current page as arabic number. This is suitable for integer operations and -% comparisions. +% comparisons. % \end{variable} % % \begin{variable}{label} @@ -560,6 +560,8 @@ % comma at the end of the list as that is easier to deal with than trying % to tidy up, and there is no real downside. % \changes{v1.0d}{2024-01-17}{Use \cs{protected@write}}% +% \changes{v1.0f}{2024-09-05}{Remove \cs{if@filesw} test to be in line with \cs{label}, +% tagging-project issue 696}% % \begin{macrocode} \cs_new_protected:Npn \property_record:nN #1#2 { \property_record:nV {#1} #2 } @@ -568,14 +570,11 @@ \cs_generate_variant:Nn \property_record:nn { nV , ee, oo } \cs_new_protected:Npn \@@_record:nn #1#2 { - \legacy_if:nT { @filesw } + \protected@write \@auxout {} { - \protected@write \@auxout {} - { - \token_to_str:N \new@label@record - {#1} - { \clist_map_function:nN {#2} \@@_record_value:n } - } + \token_to_str:N \new@label@record + {#1} + { \clist_map_function:nN {#2} \@@_record_value:n } } } \cs_generate_variant:Nn \@@_record:nn { e } @@ -777,11 +776,13 @@ % % \begin{macro}{\IfLabelExistsTF,\IfLabelExistsT,\IfLabelExistsF} % \changes{v1.0e}{2024-04-17}{Renamed \cs{IfLabelExistTF} to -% \cs{IfLabelExistsTF} (gh/1262)} +% \cs{IfLabelExistsTF} (gh/1262)} +% \changes{v1.0g}{2024-09-25}{Fixed definitions of \cs{IfLabelExistsT} +% and \cs{IfLabelExistsF}} % \begin{macrocode} \cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF -\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} } -\cs_new:Npn \IfLabelExistsF #1 {\property_if_exist:eTF {#1}{} } +\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} } +\cs_new:Npn \IfLabelExistsF #1 {\property_if_recorded:eTF {#1}{} } % \end{macrocode} % \end{macro} % @@ -804,9 +805,12 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\IfPropertyRecordedTF} +% \begin{macro}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF} +% \changes{v1.0h}{2024-10-21}{Define \cs{IfPropertyRecordedT}, \cs{IfPropertyRecordedF}} % \begin{macrocode} -\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF +\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF +\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} } +\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} } % \end{macrocode} % \end{macro} % diff --git a/macros/latex/base/ltshipout-code.pdf b/macros/latex/base/ltshipout-code.pdf Binary files differindex 6d39fbb36d..e8ad2f4e13 100644 --- a/macros/latex/base/ltshipout-code.pdf +++ b/macros/latex/base/ltshipout-code.pdf diff --git a/macros/latex/base/ltshipout-doc.pdf b/macros/latex/base/ltshipout-doc.pdf Binary files differindex 939bcbabb7..998fd34faa 100644 --- a/macros/latex/base/ltshipout-doc.pdf +++ b/macros/latex/base/ltshipout-doc.pdf diff --git a/macros/latex/base/ltshipout.dtx b/macros/latex/base/ltshipout.dtx index 0c9113ce93..c2e70ba6d5 100644 --- a/macros/latex/base/ltshipout.dtx +++ b/macros/latex/base/ltshipout.dtx @@ -34,7 +34,7 @@ %<*driver> % \fi \ProvidesFile{ltshipout.dtx} - [2024/02/11 v1.0n LaTeX Kernel (Shipout)] + [2024/10/22 v1.0n LaTeX Kernel (Shipout)] % \iffalse % \documentclass{l3doc} @@ -469,7 +469,7 @@ % % \begin{variable}{\PreviousTotalPages} % \begin{syntax} -% \cs{thetotalpages}/\cs{PreviousTotalPages} +% \cs{PreviousTotalPages} % \end{syntax} % Command that expands to the number of total pages from the % previous run. If there was no previous run or if used in the diff --git a/macros/latex/base/ltsockets-code.pdf b/macros/latex/base/ltsockets-code.pdf Binary files differindex 8d7fc7e952..b1ac8fa81c 100644 --- a/macros/latex/base/ltsockets-code.pdf +++ b/macros/latex/base/ltsockets-code.pdf diff --git a/macros/latex/base/ltsockets-doc.pdf b/macros/latex/base/ltsockets-doc.pdf Binary files differindex c55707242a..882291ca4f 100644 --- a/macros/latex/base/ltsockets-doc.pdf +++ b/macros/latex/base/ltsockets-doc.pdf diff --git a/macros/latex/base/ltsockets.dtx b/macros/latex/base/ltsockets.dtx index 243963f7bc..a977f8f6aa 100644 --- a/macros/latex/base/ltsockets.dtx +++ b/macros/latex/base/ltsockets.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltsockets.dtx} - [2024/02/11 v0.9a LaTeX Kernel (Sockets)] + [2024/10/27 v0.9b LaTeX Kernel (Sockets)] % \iffalse % \documentclass{l3doc} @@ -87,7 +87,7 @@ % executing code for each command or environment in the document % source. Through various steps this code transforms the input and % eventually generates typeset output appearing in a \enquote{galley} -% from which individual pages are cut off in an asyncronous way. This +% from which individual pages are cut off in an asynchronous way. This % page generating process is normally not directly associated with % commands in the input\footnote{Excepts for directives such as % \cs{newpage}.} but is triggered whenever the galley has received @@ -208,7 +208,7 @@ % simply calls some instance that implements the logic and that instance % is altered by selecting a different templates and/or adjusting their % parameters. However, in many cases customization through parameters is -% overkill in such a case (or otherwise awkward, because paramerization +% overkill in such a case (or otherwise awkward, because parameterization % is better done on a higher level instead of individually for small % blocks of code) and using the template mechanism just to replace one % block of code with a different one results in a fairly high @@ -371,7 +371,7 @@ % number of inputs = 2 % available plugs = noop, plug-A, plug-B % current plug = plug-B -% definition = \protected\long macro:#1#2->\begin {quote}\sffamily +% definition = \long macro:#1#2->\begin {quote}\sffamily % foo-B: #2\textsuperscript {2}\end {quote} % \end{verbatim} % \LogSocket{foo} @@ -400,7 +400,7 @@ % % However, there is no requirement that sockets and % hook names have to be different. In fact, if a certain action that -% could overwise be specified as hook code has to be executed always +% could otherwise be specified as hook code has to be executed always % last (or first) one could ensure this by placing a socket (single % action) after a hook (or vice versa) and using the same name to % indicate the relationship, e.g., @@ -617,6 +617,22 @@ % \end{function} % % +% \begin{function}[EXP]{\socket_use_expandable:nw,\socket_use_expandable:n} +% \begin{syntax} +% \cs{socket_use_expandable:n} \Arg{socket-name} +% \end{syntax} +% Fully expandable variant of \cs{socket_use:n}. This can be used in macro code +% to retrieve code from sockets which need to appear in an expandable context. +% +% This usually requires the plug to only contain expandable code and should therefore +% only be used for sockets which are clearly documented to be used in an expandable context. +% This command does not print any debugging info when \cs{DebugSocketsOn} is active +% and should therefore be avoided whenever possible. +% +% For performance reasons there is no explicit check that the socket was declared! +% \end{function} +% +% % \begin{function}{\ShowSocket,\LogSocket,\socket_show:n,\socket_log:n} % \begin{syntax} % \cs{ShowSocket} \Arg{socket-name} @@ -820,6 +836,7 @@ % % % \begin{macro}{\socket_new_plug:nnn,\socket_set_plug:nnn} +% \changes{v0.9b}{2024/10/27}{Make plug definition non-protected} % % Declaring a code for a socket is just making a definition, taking % the number of arguments from the saved int. @@ -834,7 +851,7 @@ { \cs_generate_from_arg_count:cNnn { @@_#1_plug_#2:w } - \cs_new_protected:Npn + \cs_new:Npn { \int_use:c { c_@@_#1_args_int } } {#3} % \end{macrocode} @@ -862,7 +879,7 @@ { \cs_generate_from_arg_count:cNnn { @@_#1_plug_#2:w } - \cs_set_protected:Npn + \cs_set:Npn { \int_use:c { c_@@_#1_args_int } } {#3} \@@_debug_term:n @@ -942,6 +959,17 @@ % \fmi{Implement?} % \end{macro} % +% \begin{macro}{\socket_use_expandable:nw,\socket_use_expandable:n} +% \changes{v0.9b}{2024/10/27}{Added \cs{socket_use_expandable:n}} +% The same as the non-expandable code, except for the missing debug output. +% \begin{macrocode} +\cs_new:Npn \socket_use_expandable:nw #1 { + \use:c { @@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w } +} +\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs +% \end{macrocode} +% \end{macro} +% % % % diff --git a/macros/latex/base/ltspace.dtx b/macros/latex/base/ltspace.dtx index 206e4f3885..03005f5996 100644 --- a/macros/latex/base/ltspace.dtx +++ b/macros/latex/base/ltspace.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltspace.dtx} - [2024/02/08 v1.3r LaTeX Kernel (spacing)] + [2024/09/12 v1.3s LaTeX Kernel (spacing)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltspace.dtx} @@ -833,25 +833,6 @@ % heading commands to inhibit page breaking after a heading.) % % -%\begin{verbatim} -% \addvspace{SKIP} == -% BEGIN -% if vmode -% then if @minipage -% else if \lastskip =0 -% then \vskip SKIP -% else if \lastskip < SKIP -% then \vskip -\lastskip -% \vskip SKIP -% else if SKIP < 0 and \lastskip >= 0 -% then \vskip -\lastskip -% \vskip \lastskip + SKIP -% fi fi fi fi -% else useful error message (CAR). -% fi -% END -%\end{verbatim} -% % \begin{macro}{\@xaddvskip} % Internal macro for |\vspace| handling the case that space has % previously been added. @@ -880,25 +861,53 @@ % Add vertical space taking into account space already added, as % described above. % \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)} +% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and +% instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)} % \begin{macrocode} %</2ekernel> %<*2ekernel|latexrelease> +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\addvspace}{drop unnecessary no-item error}% +\protected\def\addvspace#1{% +% \end{macrocode} +% When this is encountered in hmode, we check whether we are in an hbox and if so +% generate a \LaTeX{} error, as otherwise this would cause a bunch +% of low-level errors. In unrestricted hmode we simply switch to vmode by +% issuing a \cs{par}. +% \begin{macrocode} + \ifhmode \ifinner \@LRmoderr \else \par \fi \fi +% \end{macrocode} +% +% \begin{macrocode} + \if@minipage\else + \ifdim \lastskip =\z@ + \@vspace@calcify{#1}% + \else + \setlength\@tempskipb{#1}% + \@xaddvskip + \fi + \fi +} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} %<latexrelease>\IncludeInRelease{2020/10/01}% %<latexrelease> {\addvspace}{\addvspace calc support}% -\def\addvspace#1{% - \ifvmode - \if@minipage\else - \ifdim \lastskip =\z@ - \@vspace@calcify{#1}% - \else - \setlength\@tempskipb{#1}% - \@xaddvskip - \fi - \fi - \else - \@noitemerr - \fi} -%</2ekernel|latexrelease> +%<latexrelease>\def\addvspace#1{% +%<latexrelease> \ifvmode +%<latexrelease> \if@minipage\else +%<latexrelease> \ifdim \lastskip =\z@ +%<latexrelease> \@vspace@calcify{#1}% +%<latexrelease> \else +%<latexrelease> \setlength\@tempskipb{#1}% +%<latexrelease> \@xaddvskip +%<latexrelease> \fi +%<latexrelease> \fi +%<latexrelease> \else +%<latexrelease> \@noitemerr +%<latexrelease> \fi} %<latexrelease>\EndIncludeInRelease % \end{macrocode} % @@ -928,73 +937,116 @@ % \changes{v1.2b}{1994/11/12}{Corrected error message} % \changes{v1.2c}{1994/11/13}{Recorrected error message} % \changes{v1.1h}{2015/01/09}{Donald Arseneau's fix from PR/377703 (latexrelease)} +% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and +% instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)} % \begin{macrocode} %</2ekernel> -%<latexrelease>\IncludeInRelease{2015/01/01}% -%<latexrelease> {\addpenalty}{\addpenalty}% +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\addpenalty}{\addpenalty drop error}% %<*2ekernel|latexrelease> % \end{macrocode} +% \begin{macrocode} +\protected\def\addpenalty#1{% +% \end{macrocode} +% See description of \cs{addvspace} for documentation of the next +% line of code. +% \begin{macrocode} + \ifhmode \ifinner \@LRmoderr \else \par \fi \fi +% \end{macrocode} % Fix provided by Donald (though the original fix was not good % enough). In 2005 Plamen Tanovski discovered that this fix wasn't % good enough either as the \cs{vskip} kept getting bigger if % several \cs{addpenalty} commands followed each other. Donald % kindly send a new fix. % \begin{macrocode} -\def\addpenalty#1{% - \ifvmode - \if@minipage + \if@minipage + \else + \if@nobreak \else - \if@nobreak + \ifdim\lastskip=\z@ + \penalty#1\relax \else - \ifdim\lastskip=\z@ - \penalty#1\relax - \else - \@tempskipb\lastskip + \@tempskipb\lastskip % \end{macrocode} % We have to make sure the final \cs{vskip} seen by \TeX\ is the -% correct one, namely \cs{@tempskipb}. However we may have to -% adjust for \cs{prevdepth} when placing the penalty but that +% correct one, namely \cs{@tempskipb}. However, we may have to +% adjust for \cs{prevdepth} when placing the penalty; that % should not affect the skip we pass on to \TeX. % \changes{v1.3e}{2015/01/14}{Avoid adding redundant skips (DPC)} % \begin{macrocode} - \begingroup - \@tempskipa\@tempskipb - \advance \@tempskipb - \ifdim\prevdepth>\maxdepth\maxdepth\else + \begingroup + \@tempskipa\@tempskipb + \advance \@tempskipb + \ifdim\prevdepth>\maxdepth\maxdepth\else % \end{macrocode} % If |\prevdepth| is -1000pt due to |\nointerlineskip| we better % not add it! % \begin{macrocode} - \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi - \fi - \vskip -\@tempskipb - \penalty#1% - \ifdim\@tempskipa=\@tempskipb + \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi + \fi + \vskip -\@tempskipb + \penalty#1% + \ifdim\@tempskipa=\@tempskipb % \end{macrocode} % Do nothing if the |\prevdepth| check made no adjustment. % \begin{macrocode} - \else + \else % \end{macrocode} % Combine the prevdepth adjustment into a single skip. % \begin{macrocode} - \advance\@tempskipb -\@tempskipa - \vskip \@tempskipb - \fi + \advance\@tempskipb -\@tempskipa + \vskip \@tempskipb + \fi % \end{macrocode} % The final skip is always the specified length. % \begin{macrocode} - \vskip \@tempskipa - \endgroup - \fi + \vskip \@tempskipa + \endgroup \fi \fi - \else - \@noitemerr - \fi}% + \fi +} +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} +% +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2015/01/01}% +%<latexrelease> {\addpenalty}{\addpenalty}% +%<latexrelease>\def\addpenalty#1{% +%<latexrelease> \ifvmode +%<latexrelease> \if@minipage +%<latexrelease> \else +%<latexrelease> \if@nobreak +%<latexrelease> \else +%<latexrelease> \ifdim\lastskip=\z@ +%<latexrelease> \penalty#1\relax +%<latexrelease> \else +%<latexrelease> \@tempskipb\lastskip +%<latexrelease> \begingroup +%<latexrelease> \@tempskipa\@tempskipb +%<latexrelease> \advance \@tempskipb +%<latexrelease> \ifdim\prevdepth>\maxdepth\maxdepth\else +%<latexrelease> \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi +%<latexrelease> \fi +%<latexrelease> \vskip -\@tempskipb +%<latexrelease> \penalty#1% +%<latexrelease> \ifdim\@tempskipa=\@tempskipb +%<latexrelease> \else +%<latexrelease> \advance\@tempskipb -\@tempskipa +%<latexrelease> \vskip \@tempskipb +%<latexrelease> \fi +%<latexrelease> \vskip \@tempskipa +%<latexrelease> \endgroup +%<latexrelease> \fi +%<latexrelease> \fi +%<latexrelease> \fi +%<latexrelease> \else +%<latexrelease> \@noitemerr +%<latexrelease> \fi}% % \end{macrocode} % % \begin{macrocode} -%</2ekernel|latexrelease> %<latexrelease>\EndIncludeInRelease %<latexrelease>\IncludeInRelease{0000/00/00}% %<latexrelease> {\addpenalty}{\addpenalty}% diff --git a/macros/latex/base/lttab.dtx b/macros/latex/base/lttab.dtx index a85b4f8cf7..f114757821 100644 --- a/macros/latex/base/lttab.dtx +++ b/macros/latex/base/lttab.dtx @@ -31,7 +31,7 @@ %%% From File: lttab.dtx %<*driver> % \fi -\ProvidesFile{lttab.dtx}[2021/04/20 v1.1s LaTeX Kernel (Columns)] +\ProvidesFile{lttab.dtx}[2024/06/23 v1.1s LaTeX Kernel (Columns)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{lttab.dtx} @@ -1499,7 +1499,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\@testpatch} +% \begin{macro}{\@testpach} % \begin{macrocode} \def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else \ifnum \@lastchclass=3 5 \else diff --git a/macros/latex/base/lttagging.dtx b/macros/latex/base/lttagging.dtx index c70e24f590..6b68cd0e05 100644 --- a/macros/latex/base/lttagging.dtx +++ b/macros/latex/base/lttagging.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{lttagging.dtx} - [2024/06/10 v1.0b LaTeX Kernel (tagging support)] + [2024/10/21 v1.0k LaTeX Kernel (tagging support)] % \iffalse \documentclass{l3doc} \GetFileInfo{lttagging.dtx} @@ -56,18 +56,11 @@ % \providecommand\socket[1]{\texttt{#1\DescribeSocket[noprint]{#1}}} % \providecommand\plug[1]{\texttt{#1\DescribePlug[noprint]{#1}}} % -% \let\ProvideDocElement\NewDocElement -% % \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl} % \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl} % \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl} % % -% \section{} -% -% -% -% \MaybeStop{} % % \begin{macrocode} %<*2ekernel|latexrelease> @@ -82,97 +75,110 @@ % % \DescribeMacro\SuspendTagging % \DescribeMacro\ResumeTagging -% +% \DescribeMacro\tag_suspend:n +% \DescribeMacro\tag_resume:n + +% % The are places in code where it is import top stop any tagging % activities, e.g., when we are doing trial typesetting that it is % done several times. In such a case one must tag only the final % version that is actually used, otherwise tagging structures are -% allowed which then do not end up in the PDF and confuse the +% generated which then do not end up in the PDF and confuse the % mechanism. For this we have two commands that can be used in -% packages: \cs{SuspendTagging} and \cs{ResumeTagging}. They are +% packages: \cs{SuspendTagging} and \cs{ResumeTagging} (with corresponding +% L3 programming layer commands). They are % available as part of the \LaTeX{} kernel, so that they can be -% safely used in packages whether or not tagging is requested .They -% both take string argument that is used for debugging to easily +% safely used in packages whether or not tagging is requested. They +% all take a string argument that is used for debugging to easily % identify why tagging was suspended or restarted, for example, in % \pkg{tabularx} you find \verb=\SuspendTagging{tabularx}=. By default -% they two commands do nothing. +% these four commands do nothing. +% +% The argument is used literally (in \cs{typeout} messages) without any +% expansion when debugging is turned on and otherwise it is not used at all. +% This means it is safe to write something like +% \verb=\SuspendTagging{\foo}= or even \verb=\SuspendTagging\foo= +% which means \LaTeX{} has to parse only +% a single token instead of putting a string of characters into the +% argument. This means a tiny speed improvement but with many such +% debugging strings\ldots % -% TODO: the corresponding L3 layer commands should also have a dummy -% definition in the kernel! % % \DescribeMacro\UseTaggingSocket % \DescribeMacro\tag_socket_use:n % \DescribeMacro\tag_socket_use:nn -% To support tagging in packages we use sockets with names starting -% with \texttt{tagsupport/}. Usually, these sockets have exactly two -% plugs defined: -% \plug{noop} (when no tagging is requested or tagging is not wanted -% for some reason) and a second plug that enables the tagging. There -% may be more, e.g., tagging with special debugging, etc., but right -% now it is usually just on or off. -% -% Given that we sometimes have to suspend tagging, it would be fairly -% inefficient to put different plugs into these sockets whenever that -% happens. We therefore offer \cs{UseTaggingSocket} which is like -% \cs{UseSocket} except that the socket name is specified without -% \texttt{tagsupport/}, i.e., +% \DescribeMacro\tag_socket_use:nnn +% Given that we sometimes have to suspend tagging, it would be fairly +% inefficient to put different plugs into these sockets whenever that +% happens. We therefore offer \cs{UseTaggingSocket} which is like +% \cs{UseSocket} except that is expects a socket starting with +% \texttt{tagsupport/} but the socket name is specified without +% this prefix, i.e., % \begin{quote} % \verb=\UseTaggingSocket{foo}= $\to$ % \verb=\UseSocket{tagsupport/foo}= -% \end{quote} -% Beside being slightly shorter, the big advantage is that this way -% we can change \cs{UseTaggingSocket} to do nothing when tagging is -% suspended with \cs{SuspendTagging} instead of changing the plugs of -% the tagging support sockets back and forth. -% -% It is possible to use the tagging support sockets with -% \cs{UseSocket} directly, but in this case the socket remains active -% if \cs{SuspendTagging} is in force. There my be reasons for doing -% that but in general we expect to always use \cs{UseTaggingSocket}. -% -% The L3 programming layer versions \cs{tag_socket_use:n} and -% \cs{tag_socket_use:nn} are slightly more efficient than +% \end{quote}. +% +% Beside being slightly shorter, the big advantage is that this way +% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean +% instead of changing the plugs of the tagging support sockets back and forth. +% +% Usually, these sockets have (beside the default plug defined for every socket) +% one additional plug defined and directly assigned. This plug is used when +% tagging is active. +% There may be more plugs, e.g., tagging with special debugging or special behaviour +% depending on the class or PDF version etc., but right now it is usually just on or off. +% +% When tagging is suspended they all have the same predefined behaviour: +% The sockets with zero arguments do nothing. The sockets with one argument +% gobble their argument. The sockets with two arguments +% will drop their first argument and pass the second unchanged. +% +% It is possible to use the tagging support sockets with +% \cs{UseSocket} directly, but in this case the socket remains active +% if \cs{SuspendTagging} is in force. There may be reasons for doing +% that but in general we expect to always use \cs{UseTaggingSocket}. +% +% \DescribeMacro\UseExpandableTaggingSocket +% \DescribeMacro\tag_socket_use_expandable:n +% For special cases like in some \cs{halign} contexts we need a fully expandable +% version of the commend. For these cases, \cs{UseExpandableTaggingSocket} can be +% used. To allow being expandable, it does not output any debugging information +% if \cs{DebugSocketsOn} is in effect and therefore should be avoided whenever possible. +% +% The L3 programming layer versions \cs{tag_socket_use_expandable:n}, +% \cs{tag_socket_use:n}, \cs{tag_socket_use:nn}, and \cs{tag_socket_use:nnn} +% are slightly more efficient than % \cs{UseTaggingSocket} because they do not have to determine how -% many arguments the socket takes when disabling it, so in code that -% is using the L3 programming layer we recommend to use them instead -% of the CamelCase command. -% +% many arguments the socket takes when disabling it. % % -% \begin{macro}{\SuspendTagging,\ResumeTagging} -% -% In the kernel, these two commands get dummy definitions so that -% they can be used without harm in packages. The real definition is -% used when tagging gets enabled. -% \begin{macrocode} -\cs_new_eq:NN \SuspendTagging \use_none:n -\cs_new_eq:NN \ResumeTagging \use_none:n -% \end{macrocode} +% \MaybeStop{} % -% A simplified version of this defnition should move to -% \pkg{tagpdf} and dropped here, eventually. -% \begin{macrocode} -\AddToHook{begindocument/before}{ - \cs_if_exist:NT \tag_stop:n - { - \cs_set:Npn \SuspendTagging #1 { -% \end{macrocode}% -% This stops tagging and also disables all tagging sockets so we are done. -% \begin{macrocode} - \tag_stop:n {#1} - } -% \end{macrocode} % +% \section{Implementation} +% +% +% +% \begin{macro}{\tag_suspend:n,\tag_resume:n,\SuspendTagging,\ResumeTagging} +% +% In the kernel, these commands get dummy definitions so that +% they can be used without harm in packages. The real definition is +% used when tagging gets enabled. % \begin{macrocode} - \cs_set:Npn \ResumeTagging #1 { \tag_start:n {#1} } - } -} +\cs_new_eq:NN \tag_suspend:n \use_none:n +\cs_new_eq:NN \tag_resume:n \use_none:n +\cs_new_protected:Npn \SuspendTagging #1 { \tag_suspend:n {#1} } +\cs_new_protected:Npn \ResumeTagging #1 { \tag_resume:n {#1} } % \end{macrocode} % \end{macro} % % \begin{macro}{\tag_socket_use:n, % \tag_socket_use:nn, +% \tag_socket_use:nnn, +% \tag_socket_use_expandable:n, % \UseTaggingSocket, +% \UseExpandableTaggingSocket, % } % Again this is not the final definition for the kernel; it is just % a version to get going while some parts of the kernel support are @@ -189,19 +195,21 @@ % % Dummy definitions in the kernel. % These definitions will get updated in \pkg{tagpdf}. +% The default in the kernel is just to get rid of the first argument, the second is preserved if present: +% \changes{v1.0k}{2024/10/21}{Changed behavior of two argument tagging sockets when disabled.} +% \changes{v1.0k}{2024/10/21}{Added expandable variants} % \begin{macrocode} +\cs_new:Npn \tag_socket_use_expandable:n #1 { } \cs_new_protected:Npn \tag_socket_use:n #1 { } \cs_new_protected:Npn \tag_socket_use:nn #1#2 { } -% \end{macrocode} -% The default in the kernel is just to get rid of the argument: -% \begin{macrocode} +\cs_new_protected:Npn \tag_socket_use:nnn #1#2#3 { #3 } \cs_new_protected:Npn \UseTaggingSocket #1 { \int_case:nnF { \int_use:c { c__socket_tagsupport/#1_args_int } } { 0 \prg_do_nothing: 1 \use_none:n - 2 \use_none:nn + 2 \use_ii:nn % \end{macrocode} % We do not expect tagging sockets with more than one or two % arguments, so for now we only provide those. @@ -209,21 +217,141 @@ } \ERRORusetaggingsocket % that should get a proper error message } -\ExplSyntaxOff +% \end{macrocode} +% The same as an expandable command: +% \begin{macrocode} +\cs_new:Npn \UseExpandableTaggingSocket #1 { + \int_case:nnF + { \int_use:c { c__socket_tagsupport/#1_args_int } } + { + 0 \prg_do_nothing: + 1 \use_none:n + 2 \use_ii:nn + } + \ERRORusetaggingsocket % that should get a proper error message +} % \end{macrocode} % % \end{macro} % +% \subsection{Tagging sockets} +% This collects tagging sockets that should be generally available +% so that they can also be used even if the tagging code is not loaded. +% +% \subsubsection{Tagging support for paragraph setup} % +% Paragraphs are tagged through the code in the para/hooks. This code is sometimes +% adjusted, e.g. to produce a \enquote{flattened} paragraph or to use a different tag. +% Sockets related to such code parts are collected here. % +% \begin{macro}{\l__tag_block_flattened_level_int} +% The block code needs to know if they are nested blockenvs inside +% a flattened environment. For this it uses a counter. Inside some contexts, +% e.g. at the begin of a minipage or a footnote this counter must be reset. +% We therefore define the counter here so that we can use it in the following +% socket. +% \begin{macrocode} +\int_new:N \l__tag_block_flattened_level_int +% \end{macrocode} +% \end{macro} % +% \begin{socketdecl}{tagsupport/para/restore} +% This socket restores the para related settings to their default. It +% should be used in places where ``normal'' paragraph tagging must be ensured, for example +% at the begin of a footnote. +% \begin{macrocode} +\NewSocket{tagsupport/para/restore}{0} +% \end{macrocode} +% \end{socketdecl} % +% \begin{plugdecl}{default} +% \changes{v1.0i}{2024/10/10}{Restore also paratagging (tagging/723)} +% \begin{macrocode} +\NewSocketPlug{tagsupport/para/restore}{default} + { + \tl_set:Nn \l__tag_para_main_tag_tl {text-unit} + \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl + \bool_set_false:N\l__tag_para_flattened_bool + \int_zero:N \l__tag_block_flattened_level_int + \bool_set_true:N \l__tag_para_bool + } +\AssignSocketPlug{tagsupport/para/restore}{default} +% \end{macrocode} +% \end{plugdecl} +% +% \begin{socketdecl}{tagsupport/para/begin,tagsupport/para/end} +% These sockets are currently defined in tagpdf. They overwrite +% definitions in the latex-lab-block code. There is also a simpler +% definition that probably should be a general socket too. +% TODO: move this into lttagging. +% \end{socketdecl} + +% \subsubsection{Tagging socket for targets} + +% \begin{socketdecl}{tagsupport/refstepcounter} +% When tagging is active we want to track the current structure number +% when targets are set. This will be mostly used in \cs{refstepcounter} +% but also if targets are set manually. +% \begin{macrocode} +\NewSocket{tagsupport/recordtarget}{0} +% \end{macrocode} +% \end{socketdecl} % -% \subsection{Tagging support for table/tabular packages} +% \begin{plugdecl}{kernel (tagsupport/recordtarget)} +% \begin{macrocode} +% +\NewSocketPlug{tagsupport/recordtarget}{kernel} + { + \tl_if_blank:VF \@currentHref + { + \prop_gput:Nee + \g__tag_struct_dest_num_prop + {\@currentHref} + {\tag_get:n{struct_num}} + } + } +\AssignSocketPlug{tagsupport/recordtarget}{kernel} +\ExplSyntaxOff +% \end{macrocode} +% \end{plugdecl} +% \subsubsection{Tagging sockets for toc} + +% \begin{socketdecl}{tagsupport/toc/contentsline/before, +% tagsupport/toc/contentsline/after} +% Tagging sockets at the begin and end of contentsline. +% They receive \emph{all} contentsline arguments as one argument +% in four brace groups. The socket code should then use the parts it needs. +% \begin{macrocode} +\NewSocket{tagsupport/toc/contentsline/before}{1} +\NewSocket{tagsupport/toc/contentsline/after}{1} +% \end{macrocode} +% \end{socketdecl} +% +% \begin{socketdecl}{tagsupport/toc/starttoc/before, +% tagsupport/toc/starttoc/after} +% Tagging sockets for the begin and end of start of \cs{@starttoc}. +% They take one argument, the extension. +% \begin{macrocode} +\NewSocket{tagsupport/toc/starttoc/before}{1} +\NewSocket{tagsupport/toc/starttoc/after}{1} +% \end{macrocode} +% \end{socketdecl} +% +% \begin{socketdecl}{tagsupport/toc/leaders/before, +% tagsupport/toc/leaders/after} +% Tagging sockets to make the dot leaders an artifact. +% They do not take an argument. +% \begin{macrocode} +\NewSocket{tagsupport/toc/leaders/before}{0} +\NewSocket{tagsupport/toc/leaders/after}{0} +% \end{macrocode} +% \end{socketdecl} +% +% \subsubsection{Tagging support for table/tabular packages} % % The code uses a number of sockets to inject the tagging % commands. These can be easily set to a noop-plug in case the -% automated tagging is not wanted. +% automated tagging is not wanted. % % \begin{socketdecl}{tagsupport/tbl/cell/begin, % tagsupport/tbl/cell/end, @@ -260,6 +388,14 @@ % \end{macrocode} % \end{socketdecl} % +% \begin{socketdecl}{tagsupport/tbl/init/celldata} +% This socket is used in \cs{tbl_init_cell_data_for_table}, the command +% that stores and initialize cell data to handle nested tables. +% It can be used to restore similar tagging related values +% \begin{macrocode} +\NewSocket{tagsupport/tbl/init/celldata}{0} +% \end{macrocode} +% \end{socketdecl} % % \begin{socketdecl}{tagsupport/tbl/finalize} % To fine tune the structure (change cells to header cells, remove @@ -273,7 +409,14 @@ % \end{macrocode} % \end{socketdecl} % - +% \begin{socketdecl}{tagsupport/tbl/restore/celldata} +% This socket is used in \cs{tbl_restore_outer_cell_data:}, the command +% that restores cell data when quitting a nested table. It can be used to restore +% similar tagging related values +% \begin{macrocode} +\NewSocket{tagsupport/tbl/restore/celldata}{0} +% \end{macrocode} +% \end{socketdecl} % \begin{socketdecl}{tagsupport/tbl/colspan} % This socket is used to manage spanning cells, e.g., a @@ -331,12 +474,71 @@ % \end{socketdecl} % % +% \begin{socketdecl}{tagsupport/tbl/leaders/begin, +% tagsupport/tbl/leaders/end} +% Sockets around leaders such as rules or dotted lines, that should +% be tagged as artifacts, used, for example, in \cs{cline}. +% \changes{v1.0c}{2024/07/13}{Sockets for \cs{cline} leaders added (tagging/134)} +% \begin{macrocode} +\NewSocket{tagsupport/tbl/leaders/begin}{0} +\NewSocket{tagsupport/tbl/leaders/end}{0} +% \end{macrocode} +% \end{socketdecl} % +% \subsubsection{Tagging Support for floats} % +% \begin{socketdecl}{tagsupport/float/hmode/begin, +% tagsupport/float/hmode/end} +% These sockets are used if the float is called in +% hmode. +% \changes{v1.0h}{2024/09/13}{Sockets for floats added} +% \begin{macrocode} +\NewSocket{tagsupport/float/hmode/begin}{0} +\NewSocket{tagsupport/float/hmode/end}{0} +% \end{macrocode} +% \end{socketdecl} +% +% \begin{socketdecl}{tagsupport/float/begin, +% tagsupport/float/end} +% These sockets start and stop the float structure. +% \begin{macrocode} +\NewSocket{tagsupport/float/begin}{0} +\NewSocket{tagsupport/float/end}{0} +% \end{macrocode} +% \end{socketdecl} +% +% +% \begin{socketdecl}{tagsupport/caption/begin, +% tagsupport/caption/end} +% These sockets are used in \cs{@makecaption}. +% They open and close the \texttt{Caption} structure. +% Their default plugs assume that they are used in +% vmode. The argument of the begin socket is +% the structure number of the parent float. If it is +% empty the current structure number is used. +% \begin{macrocode} +\NewSocket{tagsupport/caption/begin}{1} +\NewSocket{tagsupport/caption/end}{0} +% \end{macrocode} +% \end{socketdecl} +% +% \begin{socketdecl}{tagsupport/caption/label/begin, +% tagsupport/caption/label/end} +% These sockets are used in \cs{@makecaption} around the +% label. Their default plugs ensure that +% the label is outside the paragraph and that +% the rest of the caption uses flattened para mode. If the +% caption is not in a hbox, the \texttt{para/begin} +% socket should follow to properly start the paragraph. +% \begin{macrocode} +\NewSocket{tagsupport/caption/label/begin}{0} +\NewSocket{tagsupport/caption/label/end}{0} +% \end{macrocode} +% \end{socketdecl} % % \section{For lttab.dtx parked here for now} % -% +% % \begin{macrocode} %<@@=tbl> \ExplSyntaxOn @@ -357,7 +559,7 @@ % \g_@@_row_int, % \g_@@_span_tl, % \g_@@_table_cols_tl} -% +% % \cs{g_@@_row_int} holds the current row number in the table. The % value \texttt{0} means we haven't yet processed the table % preamble (or in case of longtable are just in front of the next @@ -427,14 +629,14 @@ % \subsection{Tracing/debugging} % % \begin{macro}{\DebugTablesOn,\DebugTablesOff} -% +% % \begin{macrocode} \def\DebugTablesOn{ \cs_set_eq:NN \@@_trace:n \typeout -} +} \def\DebugTablesOff{ \cs_set_eq:NN \@@_trace:n \use_none:n -} +} % \end{macrocode} % % \begin{macrocode} @@ -484,7 +686,7 @@ % % % \begin{macro}{\l_@@_tmpa_seq} -% +% % \begin{macrocode} \seq_new:N \l_@@_tmpa_seq % \end{macrocode} @@ -493,7 +695,7 @@ % % % \begin{macro}{\tbl_count_missing_cells:n} -% +% % We might have the situation that some table package has not % implemented the \cs{tbl_count_table_cols:} in which case % \cs{g_@@_table_cols_tl} would always be zero and we would get an @@ -529,7 +731,7 @@ % % % \begin{macro}{\tbl_save_outer_table_cols:} -% +% % \begin{macrocode} \cs_new_protected:Npn \tbl_save_outer_table_cols: { \tl_set_eq:NN \l_@@_saved_table_cols_tl \g_@@_table_cols_tl @@ -539,7 +741,7 @@ % % % \begin{macro}{\tbl_init_cell_data_for_table:} -% +% % \begin{macrocode} \cs_new_protected:Npn \tbl_init_cell_data_for_table: { \tl_set:No \l_@@_saved_col_tl {\int_use:N \g_@@_col_int } @@ -557,6 +759,10 @@ ) } % \end{macrocode} +% Tagging has to initialize cell data too. +% \begin{macrocode} + \UseTaggingSocket{tbl/init/celldata} +% \end{macrocode} % These are the initial values when starting a table: % \begin{macrocode} \int_gzero:N \g_@@_row_int @@ -649,13 +855,14 @@ % % % \begin{macro}{\tbl_restore_outer_cell_data:} -% +% % \begin{macrocode} \cs_new_protected:Npn \tbl_restore_outer_cell_data: { \int_gset:Nn \g_@@_col_int { \l_@@_saved_col_tl } \int_gset:Nn \g_@@_row_int { \l_@@_saved_row_tl } \tl_gset_eq:NN \g_@@_span_tl \l_@@_saved_span_tl \tl_gset_eq:NN \g_@@_table_cols_tl \l_@@_saved_table_cols_tl + \UseTaggingSocket{tbl/restore/celldata} \@@_trace:n { ==>~ restored~cell~data:~ \int_use:N \g_@@_row_int, \int_use:N \g_@@_col_int, @@ -717,7 +924,7 @@ % the macro \cs{tbl_count_missing_cells:n} is executed and % then the row is finished with a final \cs{cr}. % \begin{macrocode} -\cs_new:Npn \tbl_crcr:n #1 { +\cs_new:Npn \tbl_crcr:n #1 { \int_compare:nNnT \g_@@_col_int > 0 { \tbl_count_missing_cells:n {#1} @@ -725,7 +932,7 @@ % \end{macrocode} % Even if we are at the start of a row we my have to do a \cs{cr}, % so we do a \cs{crcr} always at the end. -% \changes{v1.ob}{2024/06/10} +% \changes{v1.0b}{2024/06/10} % {Always issue a \cs{crcr} even if we are at the start of a % row to avoid problems with tabulary and similar code} % \begin{macrocode} @@ -741,14 +948,10 @@ %<@@=> % \end{macrocode} % +% \changes{v1.0h}{2024/09/20}{moved \cs{@kernel@refstepcounter} into ltxref} % This is needed for \pkg{longtable} because \cs{refstepcounter} is % setting up a target when \pkg{hyperref} is loaded and we don't -% want that in \pkg{longtable}. -% -% TODO: move to right .dtx file -% \begin{macrocode} -\let\@kernel@refstepcounter\refstepcounter -% \end{macrocode} +% want that in \pkg{longtable}.%% % Prevent longtable patching by hyperref until hyperref does so automatically: % \begin{macrocode} \def\hyper@nopatch@longtable{} diff --git a/macros/latex/base/lttemplates-code.pdf b/macros/latex/base/lttemplates-code.pdf Binary files differnew file mode 100644 index 0000000000..0863507a6d --- /dev/null +++ b/macros/latex/base/lttemplates-code.pdf diff --git a/macros/latex/base/lttemplates-code.tex b/macros/latex/base/lttemplates-code.tex new file mode 100644 index 0000000000..b85e223057 --- /dev/null +++ b/macros/latex/base/lttemplates-code.tex @@ -0,0 +1,5 @@ +% This will typeset documentation + code +% + +\AtBeginDocument{\AlsoImplementation} +\input{lttemplates.dtx} diff --git a/macros/latex/base/lttemplates-doc.pdf b/macros/latex/base/lttemplates-doc.pdf Binary files differnew file mode 100644 index 0000000000..c75c15ae27 --- /dev/null +++ b/macros/latex/base/lttemplates-doc.pdf diff --git a/macros/latex/base/lttemplates-doc.tex b/macros/latex/base/lttemplates-doc.tex new file mode 100644 index 0000000000..18b2ac119f --- /dev/null +++ b/macros/latex/base/lttemplates-doc.tex @@ -0,0 +1,8 @@ +% This will typeset only documentation but not the code +% + +\AtBeginDocument{\OnlyDescription +% \let\tableofcontents\relax + \RenewCommandCopy\MaybeStop\StopEventually + } +\input{lttemplates.dtx} diff --git a/macros/latex/base/lttemplates.dtx b/macros/latex/base/lttemplates.dtx index 7192359e72..66a69c173e 100644 --- a/macros/latex/base/lttemplates.dtx +++ b/macros/latex/base/lttemplates.dtx @@ -36,7 +36,7 @@ %<*driver> % \fi \ProvidesFile{lttemplates.dtx} - [2024-04-17 v1.0c LaTeX Kernel (Prototype document functions)] + [2024-10-07 v1.0d LaTeX Kernel (Prototype document functions)] % \iffalse \documentclass{l3doc} \GetFileInfo{lttemplates.dtx} @@ -471,7 +471,7 @@ % the general idea of fixing some settings. % \end{function} % -% \begin{function}{\IfInstanceExistsT, \IfInstanceExisstF, \IfInstanceExistsTF} +% \begin{function}{\IfInstanceExistsT, \IfInstanceExistsF, \IfInstanceExistsTF} % \begin{syntax} % \cs{IfInstanceExistsTF} \Arg{type} \Arg{instance} \Arg{true code} \Arg{false code} % \end{syntax} @@ -730,13 +730,13 @@ % \end{macrocode} % \end{variable} % -% \begin{macro}{\l_@@_default_tl} +% \begin{variable}{\l_@@_default_tl} % The default value for a key is recovered here from the property list % in which it is stored. % \begin{macrocode} \tl_new:N \l_@@_default_tl % \end{macrocode} -%\ end{macro} +% \end{variable} % % \begin{variable}{\l_@@_error_bool} % A flag for errors to be carried forward. @@ -1322,7 +1322,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \subsubsection{Storing values} % @@ -1926,7 +1925,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}{\@@_find_global:} % \begin{macro}{\@@_find_global_aux:w} @@ -2100,30 +2098,44 @@ % \end{macro} % % \begin{macro}{\@@_assign_variable:} -% \begin{macro}{\@@_assign_variable:N, \@@_assign_variable:c} +% \changes{2024-10-07}{v1.0d}{Correct passing of \cs{KeyValue} contents} +% \begin{macro}{\@@_assign_variable:n} % A general-purpose function for all of the other assignments. % As long as the value is not coming from another variable, the stored -% value is simply transferred for output. +% value is simply transferred for output. We use \texttt{V}-type expansion +% for the \cs{KeyValue} case: for token lists this is essential, whilst +% for register-based variables, it does no harm and avoids needing a +% low-level test. % \begin{macrocode} \cs_new_protected:Npn \@@_assign_variable: { - \@@_assign_variable:c + \exp_args:Ne \@@_assign_variable:n { - \@@_map_var_type: _ - \bool_if:NT \l_@@_global_bool { g } set:Nn + \@@_map_var_type: + _ + \bool_if:NT \l_@@_global_bool { g } + set:N } } -\cs_new_protected:Npn \@@_assign_variable:N #1 +\cs_new_protected:Npn \@@_assign_variable:n #1 { - \@@_if_key_value:VT \l_@@_value_tl - { \@@_key_to_value: } - \tl_put_right:Ne \l_@@_assignments_tl + \@@_if_key_value:VTF \l_@@_value_tl + { + \@@_key_to_value: + \tl_put_right:Ne \l_@@_assignments_tl + { + \exp_not:c { #1 V } \exp_not:V \l_@@_var_tl + \exp_not:V \l_@@_value_tl + } + } { - #1 \exp_not:V \l_@@_var_tl - { \exp_not:V \l_@@_value_tl } + \tl_put_right:Ne \l_@@_assignments_tl + { + \exp_not:c { #1 n } \exp_not:V \l_@@_var_tl + { \exp_not:V \l_@@_value_tl } + } } } -\cs_generate_variant:Nn \@@_assign_variable:N { c } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/macros/latex/base/lttextcomp.dtx b/macros/latex/base/lttextcomp.dtx index 7f247747d6..1ee4a18b7a 100644 --- a/macros/latex/base/lttextcomp.dtx +++ b/macros/latex/base/lttextcomp.dtx @@ -2357,8 +2357,8 @@ % \changes{v1.1a}{2024/01/27}{Added check file for encoding subset} % \begin{macrocode} %<*TS1check> -\Providesfile{checkencodingsubset.tex} - [2024/01/27 v0.5a Figure out safe TS1 encoding subsets] +\ProvidesFile{checkencodingsubset.tex} + [2024/10/18 v0.5b Figure out safe TS1 encoding subsets] % \end{macrocode} % % \begin{macrocode} diff --git a/macros/latex/base/ltvers.dtx b/macros/latex/base/ltvers.dtx index 15e662d843..1489d6bafd 100644 --- a/macros/latex/base/ltvers.dtx +++ b/macros/latex/base/ltvers.dtx @@ -112,10 +112,10 @@ %</2ekernel> %<latexrelease>\edef\latexreleaseversion %<*2ekernel|latexrelease> - {2024-06-01} + {2024-11-01} %</2ekernel|latexrelease> %<*2ekernel> -\def\patch@level{2} +\def\patch@level{0} % \end{macrocode} % % \begin{macro}{\development@branch@name} diff --git a/macros/latex/base/ltx3info.pdf b/macros/latex/base/ltx3info.pdf Binary files differindex aa6a8811cb..cf2da05bd1 100644 --- a/macros/latex/base/ltx3info.pdf +++ b/macros/latex/base/ltx3info.pdf diff --git a/macros/latex/base/ltxdoc.pdf b/macros/latex/base/ltxdoc.pdf Binary files differindex a6a6d37d0f..2e42322f56 100644 --- a/macros/latex/base/ltxdoc.pdf +++ b/macros/latex/base/ltxdoc.pdf diff --git a/macros/latex/base/ltxref.dtx b/macros/latex/base/ltxref.dtx index 79cf01be77..4464409abd 100644 --- a/macros/latex/base/ltxref.dtx +++ b/macros/latex/base/ltxref.dtx @@ -33,7 +33,7 @@ %<*driver> % \fi \ProvidesFile{ltxref.dtx} - [2023/05/16 v1.1q LaTeX Kernel (Cross Referencing)] + [2024/09/20 v1.1r LaTeX Kernel (Cross Referencing)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltxref.dtx} @@ -56,6 +56,9 @@ %</driver> % \fi % +% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl} +% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl} +% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl} % % \changes{v1.0c}{1994/03/29} % {Create file ltcntlen from parts of ltmiscen and ltherest.} @@ -413,18 +416,55 @@ % \end{macrocode} % \end{macro} % -% \begin{macrocode} -%<latexrelease>\IncludeInRelease{2022/06/01}% -%<latexrelease> {\Ref}{Add starred version}% -% \end{macrocode} % % \begin{macro}{\refstepcounter} % Step the counter and allow for labels to point to its current value. % \changes{v1.1n}{2020/05/05}{record the counter name in \cs{@currentcounter}} % \changes{v1.1o}{2020/08/23}{add default definition of \cs{@currentcounter}} +% \changes{v1.1r}{2024/09/20}{set also \@currentHref} +% \changes{v1.1r}{2024/09/20}{provide a kernel copy \@kernel@refstepcounter} +% \changes{v1.1r}{2024/09/20}{add sockets} % \begin{macrocode} +%<latexrelease>\IncludeInRelease{2022/06/01}% +%<latexrelease> {\Ref}{Add starred version}% \def\@currentcounter{} -\def\refstepcounter#1{\stepcounter{#1}% +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{2024/11/01}% +%<latexrelease> {\@currentHref}{set theHcounter representation}% +% \end{macrocode} +% \begin{socketdecl}{refstepcounter} +% This socket takes the whole code as argument. +% The default kernel plug is identity. By changing +% the plug hyperref can add a conditional and e.g. +% suppress the processing in a PDF context. +% \begin{macrocode} +\NewSocket{refstepcounter}{1} +% \end{macrocode} +% \end{socketdecl} +% \begin{socketdecl}{refstepcounter/target} +% This socket takes an argument, the counter name, and +% should at least set from it the target name |\@currentHref|. +% With hyperref it sets also the actual target. +% This is done with a socket so that the target name +% is not set more than once to (possibly) different names. +% The socket is not used in |\@kernel@refstepcounter|. +% The tagging code needs the target name so it is added after +% this socket. +% \begin{macrocode} +\NewSocket{refstepcounter/target}{1} +% \end{macrocode} +% \end{socketdecl} +% \begin{plugdecl}{kernel (refstepcounter/target)} +% \begin{macrocode} +\NewSocketPlug{refstepcounter/target}{kernel} + {\xdef\@currentHref {#1.\csname theH#1\endcsname}}% +\AssignSocketPlug{refstepcounter/target}{kernel} +% \end{macrocode} +% \end{plugdecl} +% \begin{macrocode} +\def\refstepcounter#1{% + \UseSocket{refstepcounter}{% + \stepcounter{#1}% \edef\@currentcounter{#1}% \protected@edef\@currentlabel % \end{macrocode} @@ -449,10 +489,41 @@ % argument} % \begin{macrocode} {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% + \UseSocket{refstepcounter/target}{#1}% + \UseTaggingSocket{recordtarget}% + }% } % \end{macrocode} -% \end{macro} +% \begin{macro}{\@kernel@refstepcounter} +% This is a version of \cs{refstepcounter} which does not set and use +% targets. +% \begin{macrocode} +\def\@kernel@refstepcounter#1{% + \UseSocket{refstepcounter}{% + \stepcounter{#1}% + \edef\@currentcounter{#1}% + \protected@edef\@currentlabel + {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}}% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{2022/06/01}% +%<latexrelease> {\@currentHref}{set theHcounter representation}% +%<latexrelease>\def\refstepcounter#1{\stepcounter{#1}% +%<latexrelease> \edef\@currentcounter{#1}% +%<latexrelease> \protected@edef\@currentlabel +%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}% +%<latexrelease>} +%<latexrelease>\let\@kernel@refstepcounter\refstepcounter +%<latexrelease>\EndIncludeInRelease +% \end{macrocode} % +% \end{macro} +% \begin{macrocode} +%<latexrelease>\IncludeInRelease{2022/06/01}% +%<latexrelease> {\Ref}{Add starred version}% +% \end{macrocode} % \begin{macro}{\labelformat} % A shortcut to set the |\p@...| macro for a counter. It will pick % up the counter representation as an argument so that it can be diff --git a/macros/latex/base/makeindx.pdf b/macros/latex/base/makeindx.pdf Binary files differindex c2be4c35d3..7953692171 100644 --- a/macros/latex/base/makeindx.pdf +++ b/macros/latex/base/makeindx.pdf diff --git a/macros/latex/base/manifest.txt b/macros/latex/base/manifest.txt index ff7bf49ad1..97c8082556 100644 --- a/macros/latex/base/manifest.txt +++ b/macros/latex/base/manifest.txt @@ -74,7 +74,9 @@ % ltnews35.tex -- What was new in the release dated 2022/06. % ltnews36.tex -- What was new in the release dated 2022/11. % ltnews37.tex -- What was new in the release dated 2023/06. - +% ltnews38.tex -- What was new in the release dated 2023/11. +% ltnews39.tex -- What was new in the release dated 2024/06. +% ltnews40.tex -- What was new in the release dated 2024/11. % % ltx3info.tex -- Information about the LaTeX3 project. % @@ -91,61 +93,69 @@ % % cmfonts.fdd -- Font definitions for Computer modern fonts. % fontdef.dtx -- Code for font definitions. -% lthyphen.dtx -- Hyphenation support. +% ltalloc.dtx -- Allocation of counters and others. +% ltbibl.dtx -- Bibliography commands. % ltboxes.dtx -- Code for making boxes. % ltclass.dtx -- Class and option handling. +% ltcntrl.dtx -- Program control macros. % ltcounts.dtx -- Counters. -% ltpageno.dtx -- Page numbering. -% ltxref.dtx -- Cross referencing. -% ltlength.dtx -- Lengths. +% ltdefns.dtx -- Initial definitions. % ltdirchk.dtx -- Support for search in current directory. +% lterror.dtx -- Error handling. % ltfiles.dtx -- File handling. % ltfinal.dtx -- Code for debugging and final initialisations. % ltfloat.dtx -- Float handling. % ltfntcmd.dtx -- Various font switching commands. +% ltfssaxes.dtx -- NFSS font axes % ltfssbas.dtx -- NFSS Base macros -% ltfsstrc.dtx -- NFSS Tracing (and tracefnt.sty) +% ltfsscmp.dtx -- NFSS1 compatibility % ltfssdcl.dtx -- NFSS Declarative interface % ltfssini.dtx -- NFSS Initialisation -% ltfsscmp.dtx -- NFSS1 compatibility +% ltfsstrc.dtx -- NFSS Tracing (and tracefnt.sty) +% lthyphen.dtx -- Hyphenation support. % ltidxglo.dtx -- Index and glossary. -% ltbibl.dtx -- Bibliography commands. -% ltalloc.dtx -- Allocation of counters and others. -% ltdefns.dtx -- Initial definitions. -% ltcntrl.dtx -- Program control macros. -% lterror.dtx -- Error handling. -% ltpar.dtx -- Paragraphs. -% ltspace.dtx -- Spacing, line and page breaking. -% ltlogos.dtx -- Logos. +% ltlength.dtx -- Lengths. % ltlists.dtx -- Code for lists and related environments. +% ltlogos.dtx -- Logos. % ltluatex.dtx -- LuaTeX engine related code. % ltmath.dtx -- Code for math. % ltmiscen.dtx -- Code for miscellaneous environments. % ltoutenc.dtx -- Code for output encoding commands. % ltoutput.dtx -- LaTeX page makeup (output routine). -% ltpictur.dtx -- The picture environment. % ltpage.dtx -- Page styles and related commands. +% ltpageno.dtx -- Page numbering. +% ltpar.dtx -- Paragraphs. +% ltpictur.dtx -- The picture environment. % ltplain.dtx -- Things borrowed from the plain format. +% ltsect.dtx -- Sectioning and title commands. +% ltspace.dtx -- Spacing, line and page breaking. % lttab.dtx -- The tabbing, tabular and array environments. % lttextcomp -- The text companion symbols % ltthm.dtx -- The theorem-like environments. -% ltsect.dtx -- Sectioning and title commands. % ltvers.dtx -- Version identification code. +% ltxref.dtx -- Cross referencing. % preload.dtx -- Code for preloading fonts. % tulm.fdd -- Font definitions for TU latin modern fonts. % +% % L3 Programming layer: % ----------------- % -% ltexpl.dtx -- Basic support -% ltcmd.dtx -- Document command definition -% lthooks.dtx -- Hook management -% ltfilehook.dtx -- Hook management for file loading -% ltshipout.dtx -- Hook management for \shipout -% ltcmdhooks.dtx -- Hook management (generic) for commands -% ltpara.dtx -- Hook management for paragraphs +% ltcmd.dtx -- Document command definitions +% ltexpl.dtx -- Basic support (LaTeX3 kernel integration) +% lthooks.dtx -- Hook management (core commands and core hooks) +% ltfilehook.dtx -- Hook management for file loading +% ltshipout.dtx -- Hook management for \shipout +% ltcmdhooks.dtx -- Hook management (generic) for commands +% ltpara.dtx -- Hook management for paragraphs +% ltkeys.dtx -- Key/value options % ltmarks.dtx -- Mark management +% ltmeta.dtx -- Document metadata +% ltproperties.dtx -- Properties mechanism % ltsockets.dtx -- Sockets and plugs management +% lttagging.dtx -- Tagging support +% lttemplate.dtx -- Template management +% % % Standard Classes: % ----------------- @@ -168,7 +178,7 @@ % % alltt.dtx -- Implements the alltt environment. % fix-cm.dtx -- Implements modified font choices for cm fonts. -% latexrelease.dtx -- Controls fixes to LaTeX. +% latexrelease.dtx -- Rollback functionality to previous releases % graphpap.dtx -- Implements programming \graphpaper command.. % inputenc.dtx -- Implements eight-bit input. % utf8ienc.dtx -- Supplement for inputenc to implement UTF8 encoding. @@ -248,4 +258,6 @@ % ltxcheck.tex -- Test file for checking the LaTeX installation. % % +% (There are probably a few files missing) +% % ====================================================================== diff --git a/macros/latex/base/modguide.pdf b/macros/latex/base/modguide.pdf Binary files differindex f54d380d3e..f7052aab35 100644 --- a/macros/latex/base/modguide.pdf +++ b/macros/latex/base/modguide.pdf diff --git a/macros/latex/base/nfssfont.pdf b/macros/latex/base/nfssfont.pdf Binary files differindex 194a851e49..d86427ff26 100644 --- a/macros/latex/base/nfssfont.pdf +++ b/macros/latex/base/nfssfont.pdf diff --git a/macros/latex/base/proc.pdf b/macros/latex/base/proc.pdf Binary files differindex 8d7b5ec43e..9e79947564 100644 --- a/macros/latex/base/proc.pdf +++ b/macros/latex/base/proc.pdf diff --git a/macros/latex/base/slides.pdf b/macros/latex/base/slides.pdf Binary files differindex b372bbba23..1bfe196e88 100644 --- a/macros/latex/base/slides.pdf +++ b/macros/latex/base/slides.pdf diff --git a/macros/latex/base/slifonts.pdf b/macros/latex/base/slifonts.pdf Binary files differindex 1bbfdf9ed1..cc561489ef 100644 --- a/macros/latex/base/slifonts.pdf +++ b/macros/latex/base/slifonts.pdf diff --git a/macros/latex/base/source2e.pdf b/macros/latex/base/source2e.pdf Binary files differindex c7c8afd1dd..1d99b62e2b 100644 --- a/macros/latex/base/source2e.pdf +++ b/macros/latex/base/source2e.pdf diff --git a/macros/latex/base/source2e.tex b/macros/latex/base/source2e.tex index 6ff2928a42..b82ef5664a 100644 --- a/macros/latex/base/source2e.tex +++ b/macros/latex/base/source2e.tex @@ -256,6 +256,8 @@ page_precedence "rnaA" \DocInclude{ltsockets}% Socket and plug management (L3 module) + \DocInclude{lttemplates} % Prototype document functions (was xtemplate) + \DocInclude{ltalloc} % Allocation of counters and others. \DocInclude{ltcntrl} % Program control macros. @@ -266,7 +268,7 @@ page_precedence "rnaA" \DocInclude{ltpara} % Paragraph hooks (L3 module) - \DocInclude{ltmeta} % Document Metadara interface (L3 module) + \DocInclude{ltmeta} % Document Metadata interface (L3 module) \DocInclude{ltspace} % Spacing, line and page breaking. diff --git a/macros/latex/base/syntonly.pdf b/macros/latex/base/syntonly.pdf Binary files differindex 7702a6d7c4..ac7e78ba64 100644 --- a/macros/latex/base/syntonly.pdf +++ b/macros/latex/base/syntonly.pdf diff --git a/macros/latex/base/tlc2.pdf b/macros/latex/base/tlc2.pdf Binary files differindex 6491a2990a..3da12766f3 100644 --- a/macros/latex/base/tlc2.pdf +++ b/macros/latex/base/tlc2.pdf diff --git a/macros/latex/base/tlc3.err b/macros/latex/base/tlc3.err index 6700a6b962..a7f8af1bfa 100644 --- a/macros/latex/base/tlc3.err +++ b/macros/latex/base/tlc3.err @@ -1,4 +1,4 @@ -\newcommand\erratafiledate{2024/05/31} % needs / and not - +\newcommand\erratafiledate{2024/08/07} % needs / and not - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % To produce a printed version of this errata file run this file through @@ -469,6 +469,10 @@ beyond \> \u{B}eyond \erroronpage{I-xx\ldots I-xxi}{}{FMi}{2023/04/04}{s} Dot leaders have been changed on all sections. +\erroronpage{xxv}{footnote}{FMi}{2024/07/11}{s} +The package implementing the Silly Walk is called \u{\texttt{sillypage}} +not \u{\texttt{sillywalk}} as claimed in the footnote. + \CHAPTER{Bibliography (Part I)} @@ -558,7 +562,12 @@ ones. %\CHAPTER{General} % -%\CHAPTER{Front matter} + +\CHAPTER{Front matter} + +\erroronpage{I-xli}{footnote}{FMi}{2024/07/11}{s} +The package implementing the Silly Walk is called \u{\texttt{sillypage}} +not \u{\texttt{sillywalk}} as claimed in the footnote. \CHAPTER{Bibliography} @@ -606,13 +615,25 @@ the index is always fully regenerated for new printings. \erroronpage{I-5}{para 4, l.4}{kb}{2023/04/04}{s} \u{of} the bugs \> \u{with} the bugs - - \erroronpage{I-5}{para 5, l.5}{kb}{2023/04/04}{s} not least \> \u{but} not least +\erroronpage{I-10}{para -1, l.2}{ACa}{2024/06/05}{s} + +The value should have been shown with an upright mu, using +\verb=\qty{0.01}{\micro\metre}= from the \pkg{siunitx} package. +\erroronpage{I-18}{before 1.3.3}{ACa/FMi}{2024/06/05}{s} + +Add paragraph:\\ +% +There are also two sections (2.2.8 and 2.3.4) providing low-level +background information for reference---useful when looking at existing +code in older document class files. They are set in a slightly smaller +typeface to save space and to indicate their special nature as +reference material, rather than material for daily use. + \CHAPTER{Chapter 2 --- The Structure of a \LaTeX{} Document} \erroronpage{I-31}{para-1,l.-1}{BeB}{2024/03/17}{s} @@ -627,6 +648,11 @@ Moved first line of page 35 to 34. Moved first line of page 35 to 34. +\erroronpage{I-70}{section 2.3.4}{FMi}{2023/06/05}{s} + +Add footnote: The whole section is set in a smaller font to indicate +that is more a reference — helpful mainly when studying existing code. + \erroronpage{I-113}{listing}{FMi}{2023/05/14}{s} Situation is the same in the 2023 distributions; listing output updated. @@ -672,6 +698,14 @@ so that both text and math usage of \verb=\qty= are compared in the example. \erroronpage{I-182}{para 4}{BeB}{2024/03/17}{s} Add sentence: The command \verb+\textcquote+ is used in Example 16-5-50 on page II-535. +\erroronpage{I-195}{para 2}{FMi}{2024/07/20}{s} +Replace the whole paragraph with:\\ +For the same reason \texttt{soul} was unable to cope with UTF-8 input +characters if they are internally represented by several bytes. If you +used such characters, you had to load \texttt{soulutf8} (by Heiko Oberdiek) +instead of \texttt{soul} — since 2023, both packages are equivalent, thus you may +always use the \texttt{soul} package. + \CHAPTER{Chapter 4 --- Basic Formatting Tools -- Larger \ldots} \erroronpage{I-253}{para 2, l.-3}{YEi}{2023/11/27}{s} @@ -679,6 +713,17 @@ Move comma:\\ and \textsf{thmtools} packages and \textsf{typed-checklist}\u{,} helps you write \> \\ and \textsf{thmtools} packages\u{,} and \textsf{typed-checklist} helps you write +\erroronpage{I-286}{para 1, l.3}{DPC}{2024/07/15}{s} +in this case \texttt{shade\u{d}thm} \> in this case \texttt{shadethm} + +\erroronpage{I-322}{para -1, l.-2}{MBe/FMi}{2024/08/07}{s} + +Change: \texttt{algorithm\u{s}} \> \texttt{algorithm\u{ic}} + +\textit{Reason: The package is called \texttt{algorithmic} and there +is also \texttt{algorithm} to make floats, but the CTAN bundle (and +its documentation) calls it \texttt{algorithms}.} + \erroronpage{I-323}{Table 4.4, left column}{BeB}{2023/07/25}{s} Typo: Assembler (\u{N}otorola68k, x86masm) \> \\ Assembler (\u{M}otorola68k, x86masm) @@ -745,9 +790,10 @@ result in ``31.00'', which is probably not desired. is not really an error, but it looks better---and is consistent with the `actual' item of `profit' for Booklet 113.) +\erroronpage{I-492}{footnote}{DPC}{2024/07/15}{s} +called \u{\texttt{threetableex}} \> called \u{\texttt{threeparttablex}} \erroronpage{I-494}{para -2, l.3}{MRu}{2024/03/16}{s} - Use plural: The allowed key\u{s} are \ldots @@ -785,6 +831,10 @@ Correct hyphenation: stan-dalone \> stand-alone \CHAPTER{Chapter 9 --- Font Selection and Encodings} +\erroronpage{I-687}{table 9.6, l.21}{YvH}{2024/06/19}{s} + cmdh \> lmdh + + \erroronpage{I-688}{para -2, l. 1}{BeB}{2023/08/13}{s} acronym PSNFSS not explained: PSNFSS \> PostScript New Font Selection Scheme (PSNFSS) @@ -848,6 +898,9 @@ Open Type font is available: \\ There are no italic blackletters (so it should be in blue): \\ \textit{phœnix's official rôle} \> \textit{\bl phœnix's official rôle} +\erroronpage{II-27}{para 1, l.1}{MBe/FMi}{2024/08/02}{s} +Package was renamed: \texttt{droidmono} \> \texttt{droid\u{sans}mono} + \erroronpage{II-28}{table 10.14, l. 3}{BeB}{2023/08/13}{s} Inconsistent order: sl, l \> l, sl @@ -1169,6 +1222,10 @@ point in front of the display, thus \cs{predisplaypenalty} is no longer honored. +\erroronpage{II-149}{para 2, l.4}{DPC}{2024/07/15}{s} +package \texttt{flex\u{y}sym} \> +package \texttt{flex\u{i}sym} + \erroronpage{II-167}{para. 3, l. -2}{BeB}{2023/08/13}{s} option\u e \> option\u{s} @@ -1179,7 +1236,8 @@ option\u e \> option\u{s} \erroronpage{II-178}{Tab. 11.3, l.10}{BeB}{2023/08/13}{s} in the description column: \u{array}-symbol-arrow \> \u{arrow}-symbol-arrow - +\erroronpage{II-189}{footnote}{DPC}{2024/07/15}{s} +\texttt{oubrace} package \> \texttt{oubrace\u{s}} package @@ -1346,6 +1404,10 @@ The keyword \texttt{Harf\u{b}uzz} should be spelled \texttt{Harf\u{B}uzz}. Both names are supported, but the recommended spelling is \texttt{HarfBuzz}. +\erroronpage{II-341}{para -4, l.4}{DPC/FMi}{2024/07/15}{s} +\texttt{devnag} \u{package} \> \texttt{devnag} \u{program} + + \CHAPTER{Chapter 14 --- Index Generation} % Das Beispiel von S. II-352 als File wäre schön, dann könnte man das mit @@ -1382,6 +1444,8 @@ Changes the output of example 16-7-31 on page II-560 as well. the \cs{MakeUpper}\texttt{\u{C}ase} trick \> the \cs{MakeUpper}\texttt{\u{c}ase} trick +\erroronpage{II-423}{table 15.9}{MBe/FMi}{2024/08/04}{s} +Drop \texttt{nature.bst} line. Style no longer supported. \erroronpage{II-435}{code}{FMi}{2023/05/26}{s} \verb=\textcolor{See= \> \cs{textcolor}\u{\texttt{\{blue\}}}\texttt{\{See} @@ -1494,13 +1558,16 @@ Appendix title not properly capitalized. \begin{multicols}{3}[Thanks to all who have found errors or omissions. Listed are the people who found an errata entry first.] +\contributor{ACa}{Alfredo Canziani} \contributor{BeB}{Bernd Burghardt} \contributor{BYu}{Boshi Yuan} \contributor{CAR}{Chris Rowley} +\contributor{DPC}{David Carlisle} \contributor{DC}{Davide Campagnari} \contributor{DFl}{Daniel Flipo} \contributor{EOl}{Edgar Olthof} \contributor{FMi}{Frank Mittelbach} +\contributor{MBe}{Matthew Bertucci} \contributor{MJo}{Maciej Jończyk} \contributor{MRu}{Mark Rudolph} \contributor{YFu}{FUJIMURA Yukitoshi} diff --git a/macros/latex/base/tlc3.pdf b/macros/latex/base/tlc3.pdf Binary files differindex 198cbb1636..fcf83875b8 100644 --- a/macros/latex/base/tlc3.pdf +++ b/macros/latex/base/tlc3.pdf diff --git a/macros/latex/base/tulm.pdf b/macros/latex/base/tulm.pdf Binary files differindex 0a64636e3a..f2fd1d93c7 100644 --- a/macros/latex/base/tulm.pdf +++ b/macros/latex/base/tulm.pdf diff --git a/macros/latex/base/usrguide-historic.pdf b/macros/latex/base/usrguide-historic.pdf Binary files differindex e532c7d8a7..15099abf65 100644 --- a/macros/latex/base/usrguide-historic.pdf +++ b/macros/latex/base/usrguide-historic.pdf diff --git a/macros/latex/base/usrguide.pdf b/macros/latex/base/usrguide.pdf Binary files differindex 10b446a294..53b784dee9 100644 --- a/macros/latex/base/usrguide.pdf +++ b/macros/latex/base/usrguide.pdf diff --git a/macros/latex/base/usrguide.tex b/macros/latex/base/usrguide.tex index 2b9e959627..e4ea6e4e0c 100644 --- a/macros/latex/base/usrguide.tex +++ b/macros/latex/base/usrguide.tex @@ -43,7 +43,7 @@ \texttt{usrguide.tex} for full details.}% } -\date{2024-05-24} +\date{2024-10-22} \NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}} \NewDocumentCommand\marg{m}{\arg{#1}} @@ -265,7 +265,16 @@ These commands work in the same way as \cs{NewDocumentCommand}, etc.\@, but create environments (\cs{begin}\arg{env} \ldots{} \cs{end}\arg{env}). Both the \meta{beg-code} and \meta{end-code} may access the arguments as defined by \meta{arg spec}. The arguments will be -given following \cs{begin}\arg{env}. +given following \cs{begin}\arg{env}. Any spaces at the start and end of the +\arg{env} are removed before the definition takes place, thus +\begin{verbatim} +\NewDocumentEnvironment{foo} +\end{verbatim} +and +\begin{verbatim} +\NewDocumentEnvironment{ foo } +\end{verbatim} +both create the same \enquote{\texttt{foo}} environment. \subsection{Optional arguments} \label{sec:cmd:opt} diff --git a/macros/latex/base/utf8ienc.pdf b/macros/latex/base/utf8ienc.pdf Binary files differindex 3fea56f827..463a21b04e 100644 --- a/macros/latex/base/utf8ienc.pdf +++ b/macros/latex/base/utf8ienc.pdf diff --git a/macros/latex/base/webcomp.pdf b/macros/latex/base/webcomp.pdf Binary files differindex 0f4a1d8f76..1971cc39e8 100644 --- a/macros/latex/base/webcomp.pdf +++ b/macros/latex/base/webcomp.pdf diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md index cb465f9ec2..9793140a0c 100644 --- a/macros/latex/contrib/easybook/README.md +++ b/macros/latex/contrib/easybook/README.md @@ -1,5 +1,5 @@ # The `easybook` document class -Easily typesetting Chinese theses or books (v2024eu) +Easily typesetting Chinese theses or books (v2024ex) ## Abstract `easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the theses of many universities in China, providing multiple commands and interfaces allows users to easily customize the theses templates. Its basic macro package `easybase` can also be used with `ctex` and standard document classes. diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index ba2d5d7adb..527731744b 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -14,7 +14,7 @@ % This work has the LPPL maintenance status `maintained'. %<class|package>\NeedsTeXFormat{LaTeX2e}[2021/11/15] %<*class> -\ProvidesExplClass{easybook}{2024/10/28}{2024eu} +\ProvidesExplClass{easybook}{2024/10/31}{2024ex} {Easily typesetting Chinese theses or books} \bool_new:N \l__eb_compile_draft_bool @@ -302,7 +302,7 @@ %</class> %<*package> \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2024/10/28}{2024eu} +\ProvidesExplPackage{easybase}{2024/10/31}{2024ex} {Easily typesetting Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -1341,12 +1341,12 @@ \cs_set:Npn \thebisection { \eb_section_counter_prefix:n { bi } } \cs_set:Npn \thebisubsection { \thebisection.\@arabic\c@bisubsection } \cs_set:Npn \thesection { \eb_section_counter_prefix:n { } } -\tl_new:N \eb@before@bitocline@hook +\NewHook{bitocline/before} +\DeclareHookRule{bitocline/before}{chapter}{<}{code} \NewDocumentCommand{\BeforeAddtoBitoc}{sm} { - \IfBooleanTF{#1} - {\tl_gset:Nn \eb@before@bitocline@hook {#2}} - {\tl_gput_right:Nn \eb@before@bitocline@hook {#2}} + \IfBooleanT{#1}{\RemoveFromHook{bitocline/before}[code]} + \AddToHook{bitocline/before}[code]{#2} } \cs_set_eq:NN \BeforeAddBitoc \BeforeAddtoBitoc \cs_new_protected:Npn \CTEX@addbitocline #1#2 @@ -1355,7 +1355,7 @@ \def\CTEX@prechapter{\CTEX@prebichapter} \def\CTEX@thechapter{\CTEX@bichapter@number} \def\CTEX@postchapter{\CTEX@postbichapter} - \eb@before@bitocline@hook + \UseHook{bitocline/before} \tl_if_eq:NnTF \g__eb_bilist_permute_value_tl { mix } { \addcontentsline{toc}{#1} } { \addcontentsline{tec}{#1} } @@ -2049,7 +2049,7 @@ \ctex_assign_heading_name:nn { biappendix } {#1} \bool_if:NTF \l__eb_class_mode_book_bool { - \eb_preto_cmd:nn { eb@before@bitocline@hook } + \AddToHook{bitocline/before}[chapter] { \def\CTEX@prechapter{\CTEX@prebiappendix} \def\CTEX@thechapter{#2} @@ -2967,7 +2967,7 @@ } %</package> %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2024/10/28}{2024eu} +\ProvidesExplFile{eb-tcolorbox.cfg}{2024/10/31}{2024ex} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf Binary files differindex 20fba53175..f96776ddf1 100644 --- a/macros/latex/contrib/easybook/easybook.pdf +++ b/macros/latex/contrib/easybook/easybook.pdf diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index 683b538b3a..4b33570c0e 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -23,8 +23,8 @@ name = easybook, color-scheme = blue, title = EASYBOOK使用手册, - version = v2024eu, - date = 2024/10/28, + version = v2024ex, + date = 2024/10/31, authors = 瞿毅, info = 简便地排版中文学位论文或书籍, email = toquyi@163.com, diff --git a/macros/latex/contrib/eolang/DEPENDS.txt b/macros/latex/contrib/eolang/DEPENDS.txt index d4273d3323..d10a65d74f 100644 --- a/macros/latex/contrib/eolang/DEPENDS.txt +++ b/macros/latex/contrib/eolang/DEPENDS.txt @@ -1,6 +1,7 @@ hard adjustbox hard amsfonts hard amsmath +hard everyshi hard fancyvrb hard hyperref hard iexec diff --git a/macros/latex/contrib/eolang/README.md b/macros/latex/contrib/eolang/README.md index 2214b74e38..1d71ee7817 100644 --- a/macros/latex/contrib/eolang/README.md +++ b/macros/latex/contrib/eolang/README.md @@ -1,3 +1,5 @@ +# LaTeX package for 𝜑-calculus + [![l3build](https://github.com/objectionary/eolang.sty/actions/workflows/l3build.yml/badge.svg)](https://github.com/objectionary/eolang.sty/actions/workflows/l3build.yml) [![CTAN](https://img.shields.io/ctan/v/eolang)](https://ctan.org/pkg/eolang) [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/eolang.sty/blob/master/LICENSE.txt) @@ -6,7 +8,7 @@ This LaTeX package helps you write 𝜑-calculus formulas and draw [SODG](https://github.com/objectionary/sodg) graphs for [EO](https://www.eolang.org) programming language. -First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages) +First, [install it][install] from [CTAN](https://ctan.org/pkg/eolang) and then use in the preamble: @@ -22,10 +24,13 @@ x -> [ \end{document} ``` -Otherwise, you can download [`eolang.sty`](https://objectionary.github.io/eolang.sty/eolang.sty) and add to your project. +Otherwise, you can download [`eolang.sty`][sty] and add to your project. -If you want to contribute yourself, make a fork, then create a branch, +If you want to contribute yourself, make a fork, then create a branch, then run `l3build ctan` in the root directory. It should compile everything without errors. If not, submit an issue and wait. Otherwise, make your changes and then run `l3build ctan` again. If the build is still clean, submit a pull request. + +[install]: https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages +[sty]: https://objectionary.github.io/eolang.sty/eolang.sty diff --git a/macros/latex/contrib/eolang/eolang.1 b/macros/latex/contrib/eolang/eolang.1 index 8ab1954d87..d14e5fb8c2 100644 --- a/macros/latex/contrib/eolang/eolang.1 +++ b/macros/latex/contrib/eolang/eolang.1 @@ -1,4 +1,4 @@ -.TH eolang 1 "2024-02-14" +.TH eolang 1 "0000-00-00" .SH NAME eolang \- Automated Editor of TeX Files that Use "eolang" Package .SH SYNOPSIS @@ -21,4 +21,4 @@ Yegor Bugayenko (yegor256@gmail.com) Please log issues on the GitHub homepage: https://github.com/objectionary/eolang.sty/issues. .SH SEE ALSO -See eolang.pdf for more details. +See eolang.pdf for more details.
\ No newline at end of file diff --git a/macros/latex/contrib/eolang/eolang.bib b/macros/latex/contrib/eolang/eolang.bib index 34ca47a8f2..71e181fa5c 100644 --- a/macros/latex/contrib/eolang/eolang.bib +++ b/macros/latex/contrib/eolang/eolang.bib @@ -1,3 +1,25 @@ +% (The MIT License) +% +% Copyright (c) 2021-2024 Yegor Bugayenko +% +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the 'Software'), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be included in all +% copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +% SOFTWARE. + @misc{bugayenko2021eolang, title={EOLANG and $\varphi$-calculus}, author={Yegor Bugayenko}, diff --git a/macros/latex/contrib/eolang/eolang.dtx b/macros/latex/contrib/eolang/eolang.dtx index 97d558ccaa..23df252323 100644 --- a/macros/latex/contrib/eolang/eolang.dtx +++ b/macros/latex/contrib/eolang/eolang.dtx @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{eolang} %<*package> -[2024-02-14 0.18.1 Formulas and Graphs for EO Programming Language] +[2024/10/31 0.18.2 Formulas and Graphs for EO Programming Language] %</package> %<*driver> \documentclass{ltxdoc} @@ -877,7 +877,7 @@ $macro = $ARGV[0]; open(my $fh, '<', $ARGV[1]); my $tex; { local $/; $tex = <$fh>; } -print "% This file is auto-generated by 0.18.1\n"; +print "% This file is auto-generated by eolang.sty 0.18.2\n"; print '% There are ', length($tex), ' chars in the input: ', $ARGV[1], "\n"; print '% ---', "\n"; @@ -1149,7 +1149,7 @@ print '\endinput'; {\eolang@tmpdir/\jobname/\hash-phiq-post.tex} {% \iexec[log,trace,quiet,stdout=\eolang@tmpdir/\jobname/phiq.tex]{ - /bin/echo '\clean'}% + printf '\%s' '\clean'}% \iexec[quiet,null]{cp "\eolang@tmpdir/\jobname/phiq.tex" "\eolang@tmpdir/\jobname/\hash-phiq.tex"}% \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-phiq-post.tex]{ diff --git a/macros/latex/contrib/eolang/eolang.pdf b/macros/latex/contrib/eolang/eolang.pdf Binary files differindex 2bf8e39de4..47d3f5bcda 100644 --- a/macros/latex/contrib/eolang/eolang.pdf +++ b/macros/latex/contrib/eolang/eolang.pdf diff --git a/macros/latex/contrib/eolang/eolang.pl b/macros/latex/contrib/eolang/eolang.pl index 48ba53dc5b..6018cd5251 100755 --- a/macros/latex/contrib/eolang/eolang.pl +++ b/macros/latex/contrib/eolang/eolang.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # (The MIT License) # -# Copyright (c) 2022-2024 Yegor Bugayenko +# Copyright (c) 2021-2024 Yegor Bugayenko # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal @@ -21,58 +21,22 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -# 2024-02-14 0.18.1 +# 0000-00-00 0.18.2 package eolang; use warnings; use strict; +use lib('.'); +use tools; use File::Basename; # Hash of incoming command line arguments. my %args = map { $_ => 1 } @ARGV; -# Read file content. -sub readfile { - my ($path) = @_; - open(my $h, '<', $path) or die('Cannot open file: ' . $path); - my $content; { local $/; $content = <$h>; } - return $content; -} - -# Save content to file. -sub savefile { - my ($path, $content) = @_; - open(my $f, '>', $path) or error('Cannot open file for writing: ' . $path); - print $f $content; - close($f); - my $size = -s $path; - info("File saved to '$path' ($size bytes)"); -} - -# Print INFO message to the console. -sub info { - my ($txt) = @_; - print $txt . "\n"; -} - -# Print DEBUG message to the console. -sub debug { - my ($txt) = @_; - if (exists $args{'--verbose'}) { - print $txt . "\n"; - } -} - -# Print ERROR message to the console. -sub error { - my ($txt) = @_; - print STDERR $txt . "\n"; -} - if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) { info("This script helps embedding \\phiquation and \\phiq into .tex document\n\n" . "Usage:\n" . - " eolang [<options>] <.tex file path>\n\n" . + " eolang [<options>] <.tex input file path> <.tex output file path>\n\n" . "Options:\n" . " -v, --version Print the current version of the tool and exit\n" . " -?, --help Print this help screen\n" . @@ -80,7 +44,7 @@ if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) { " --tmpdir=path Temp directory with .tex files ('_eolang' by default)\n\n" . "If any issues, report to GitHub: https://github.com/yegor256/bibcop"); } elsif (exists $args{'--version'} or exists $args{'-v'}) { - info('0.18.1 2024-02-14'); + info('0.18.2 0000-00-00'); } else { my ($src, $target) = grep { not($_ =~ /^-.*$/) } @ARGV; if (not $src) { diff --git a/macros/latex/contrib/letterswitharrows/README.txt b/macros/latex/contrib/letterswitharrows/README.txt index 1a4d4d98fc..5a6a95a81c 100644 --- a/macros/latex/contrib/letterswitharrows/README.txt +++ b/macros/latex/contrib/letterswitharrows/README.txt @@ -1,5 +1,5 @@ The letterswitharrows package -Copyright 2019-2021 J. M. Teegen +Copyright 2019-2024 J. M. Teegen The letterswitharrows package provides LaTeX math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols. While it is possible to set arrows over longer strings of symbols, the focus lies on single characters. diff --git a/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx b/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx index 1b2820bd82..15ff5152c6 100644 --- a/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx +++ b/macros/latex/contrib/letterswitharrows/letterswitharrows.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % %% File: letterswitharrows.dtx -%% Copyright 2019-2020 J. Maximilian Teegen +%% Copyright 2019-2024 J. Maximilian Teegen %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -54,14 +54,14 @@ % \title{The \pkg{letterswitharrows} package} % \author{Max Teegen\\ \href{mailto:tex@jmteegen.eu}{tex@jmteegen.eu}} -% \date{Released 2021-07-19} +% \date{Released 2024-10-31} % \maketitle % \begin{documentation} % This package provides math-mode commands for setting left and right arrows over mathematical symbols, so that the arrows dynamically scale with the symbols. % Here is a sample: {\large\[ -% \vs \le \tv \in \vec{U_{\mathrlap\vr}} \qquad \left\vert \vec{AB} \right\vert = \left\vert \cev{AB} \right\vert \qquad A \mathrel{\arrowoverset*[-2mu]{\between}} B +% \vs \le \tv \in \vec{U_{\mathrlap\vrv}} \qquad \left\vert \vec{AB} \right\vert = \left\vert \cev{AB} \right\vert \qquad A \mathrel{\arrowoverset*[-2mu]{\between}} B % \]} % \iffalse Somehow embellishments don't work in the documentation!? \fi % While it is possible to set arrows over longer strings of symbols, the focus lies on single characters. @@ -81,40 +81,40 @@ % By default, the \verb|abc|, \verb|ABC| and \verb|cAcBcC| presets are loaded. % \DescribeOption{abc} -% Passing \verb|abc| to the \verb|presets| option allows you to use the \tn{v\meta{char}} and \tn{\meta{char}v} commands for all the lower-case letters \verb|a| through \verb|z| except for \verb|v|. -% \begin{function}{\v<char>,\<char>v,\vleft,\vright} +% Passing \verb|abc| to the \verb|presets| option allows you to use the \tn{v\meta{char}}, \tn{\meta{char}v}, and \tn{v\meta{char}v} commands for all the lower-case letters \verb|a| through \verb|z| except for \verb|v|. +% \begin{function}{\v<char>,\<char>v,\vleft,\vright,\v<char>v} % For the letter \verb|v| the commands \tn{vleft} and \tn{vright} are provided. -% \[ \va, \vb, \vc, \dv, \mv, F_\tv \] +% \[ \va, \vb, \vc, \dv, \vmv, F_\tv \] % \begin{verbatim} -% \[ \va, \vb, \vc, \dv, \mv, F_\tv \] +% \[ \va, \vb, \vc, \dv, \vmv, F_\tv \] % \end{verbatim} % \end{function} % \DescribeOption{ABC} -% Passing \verb|ABC| to the \verb|presets| option allows you to use the \tn{v\meta{CHAR}} and \tn{\meta{CHAR}v} commands for all the upper-case letters \verb|A| through \verb|Z|. +% Passing \verb|ABC| to the \verb|presets| option allows you to use the \tn{v\meta{CHAR}}, \tn{\meta{CHAR}v}, and \tn{v\meta{CHAR}v} commands for all the upper-case letters \verb|A| through \verb|Z|. % \begin{function}{\v<CHAR>,\<CHAR>v} -% \[ \vA, \vB, \vC, \Dv, \Ev, F_\Gv \] +% \[ \vA, \vB, \vC, \Dv, \vEv, F_\Gv \] % \begin{verbatim} -% \[ \vA, \vB, \vC, \Dv, \Ev, F_\Gv \] +% \[ \vA, \vB, \vC, \Dv, \vEv, F_\Gv \] % \end{verbatim} % \end{function} % \DescribeOption{cAcBcC} -% Passing \verb|cAcBcC| to the \verb|presets| option allows you to use the \tn{vc\meta{CHAR}} and \tn{c\meta{CHAR}v} commands for all the upper-case letters \verb|A| through \verb|Z| to set arrows over \tn{mathcal}-letters. +% Passing \verb|cAcBcC| to the \verb|presets| option allows you to use the \tn{vc\meta{CHAR}}, \tn{c\meta{CHAR}v}, and \tn{vc\meta{CHAR}v} commands for all the upper-case letters \verb|A| through \verb|Z| to set arrows over \tn{mathcal}-letters. % \begin{function}{\vc<CHAR>,\c<CHAR>v} -% \[ \vcA, \vcB, \vcC, \cDv, \cEv, F_\cGv \] +% \[ \vcA, \vcB, \vcC, \cDv, \vcEv, F_\cGv \] % \begin{verbatim} -% \[ \vcA, \vcB, \vcC, \cDv, \cEv, F_\cGv \] +% \[ \vcA, \vcB, \vcC, \cDv, \vcEv, F_\cGv \] % \end{verbatim} % \end{function} % \DescribeOption{vec-cev} -% Passing \verb|vec-cev| to the \verb|presets| option (re)defines the \tn{vec} and \tn{cev} commands. +% Passing \verb|vec-cev| to the \verb|presets| option (re)defines the \tn{vec}, \tn{cev}, and \tn{vecev} commands. % \begin{function}{\vec,\cev} % Unlike the other commands these do not automatically consume subsequent subscripts or \verb|'| tokens. -% \[ \vec{\mathbf{x}} := \cev{AB} \qquad \langle \vw, \vright \rangle = 42 \] +% \[ \vec{\mathbf{x}} := \cev{AB}\] % \begin{verbatim} -% \[ \vec{\mathbf{x}} := \cev{AB} \qquad \langle \vw, \vright \rangle = 42 \] +% \[ \vec{\mathbf{x}} := \cev{AB}\] % \end{verbatim} % \end{function} @@ -134,6 +134,7 @@ % \subsection{Other package options} % \DescribeOption{pgf} % If you specify the \verb|pgf| option, every arrow is drawn as a \verb|pgfpicture|. This requires the \pkg{pgf} package. +% Double arrows are not implemented in pgf mode. % \begin{texnote} % You can set up custom arrow drawing code by redefining \cs{__jmt_lwa_arrow_draw:nnn}. % The command is expected to draw an arrow with its head at the current position. Its length should be \verb|#1| and it should be drawn at a font size of \verb|#2|pt. @@ -158,7 +159,7 @@ % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\ProvidesExplPackage {letterswitharrows} {2021/07/19} {} {Draw arrows over math letters.} +\ProvidesExplPackage {letterswitharrows} {2024/10/31} {} {Draw arrows over math letters.} \RequirePackage{xparse,l3keys2e,mathtools} % TODO: I just use mathtools for mathrlap; replace. @@ -172,7 +173,8 @@ % \end{macrocode} % The drawing code. % \changes{2021/07/10}{2021/07/19}{Implement adjustable linewidth.} -% \begin{macro}{\__@@_arrow_draw_special:nnn,\__@@_arrow_draw_pgf:nnn,\__@@_arrow_left:nn,\__@@_arrow_right:nn} +% \changes{2024/10/31}{2023/03/11}{Add double arrows.} +% \begin{macro}{\__@@_arrow_draw_special:nnn,\__@@_arrow_draw_double:nn,\__@@_arrow_draw_pgf:nnn,\__@@_arrow_left:nn,\__@@_arrow_right:nn,\__@@_arrow_double:nn} % \begin{macrocode} \cs_new:Nn \__@@_arrow_draw_special:nnn % length, font size, sign { @@ -218,6 +220,7 @@ } } + % TODO % \tl_new:N \g_@@_pgf_arrow_style_tl % \tl_set:Nn \g_@@_pgf_arrow_style_tl @@ -238,17 +241,51 @@ \cs_new_eq:NN \__@@_arrow_draw:nnn \use_none:nnn + +\cs_new:Nn \__@@_arrow_draw_double:nn +{ + \tex_special:D {pdf:~ + q~ + 1~J~1~j~ + 1~0~0~\dim_to_decimal:n{#2pt/10}~0~0~cm~ + \fp_use:c{g__@@_line_width}~w~ + q~ + \dim_to_decimal:n{#2pt/10}~0~0~1~0~0~cm~ + 1~0~0~1~-1~0~cm~ + 0~1~m~ + .25~0~1~0~1~0~c~ + 1~0~.25~0~0~-1~c~ + S~ + Q~ + 0~0~m~ + -1~0~0~1~0~0~cm~ + \dim_to_decimal:n{#1}~0~l~S~ + \dim_to_decimal:n{#2pt/10}~0~0~1~\dim_to_decimal:n{#1}~0~cm~ + 1~0~0~1~-1~0~cm~ + 0~1~m~ + .25~0~1~0~1~0~c~ + 1~0~.25~0~0~-1~c~ + S~ + Q + } +} + + \cs_new:Nn \__@@_arrow_right:nn { \skip_horizontal:n {#1} - % \rule[\dimexpr -#2pt/6\relax]{#1}{\dimexpr #2pt/3\relax} \__@@_arrow_draw:nnn {#1} {#2} {} } \cs_new:Nn \__@@_arrow_left:nn { \__@@_arrow_draw:nnn {#1} {#2} {-} \skip_horizontal:n {#1} - % \rule[\dimexpr -#2pt/6\relax]{#1}{\dimexpr #2pt/3\relax} } + +\cs_new:Nn \__@@_arrow_double:nn { + \skip_horizontal:n {#1} + \__@@_arrow_draw_double:nn {#1} {#2} +} + % \end{macrocode} % \end{macro} @@ -305,33 +342,33 @@ \__@@_arrow_overset_aux:w } -\cs_new:Nn \__jmt_lwa_bool_convert:n { +\cs_new:Nn \__@@_bool_convert:n { \IfBooleanTF {#1} {\c_true_bool} {\c_false_bool} } % This exp_args is necessary because _ generates the wrong token in expl3 syntax \exp_args:NNx \NewDocumentCommand \__@@_arrow_overset_aux:w - {s O{0mu} O{1} O{0ex} m t' e{\char_generate:nn {95}{8}} t'} { + {s s O{0mu} O{1} O{0ex} m t' e{\char_generate:nn {95}{8}} t'} { \__@@_arrow_overset:nnnnn { - #5 - \exp_args:Nf\bool_if:nT{\__jmt_lwa_bool_convert:n{#6} || \__jmt_lwa_bool_convert:n{#8}} { + #6 + \exp_args:Nf\bool_if:nT{\__@@_bool_convert:n{#7} || \__@@_bool_convert:n{#9}} { \c_math_superscript_token { - \scriptscriptstyle\IfBooleanT{#6}{\prime}\IfBooleanT{#8}{\prime} + \scriptscriptstyle\IfBooleanT{#7}{\prime}\IfBooleanT{#9}{\prime} } } % TODO: Better positioning etc? - \exp_args:Nf\IfValueT{\use:n#7} { + \exp_args:Nf\IfValueT{\use:n#8} { \c_math_subscript_token { - \mathrlap{#7} + \mathrlap{#8} } } } - {\IfBooleanTF{#1}{left}{right}} - {#2} {#3} {#4} + {\IfBooleanTF{#1}{\IfBooleanTF{#2}{double}{left}}{right}} + {#3} {#4} {#5} - \exp_args:Nf\IfValueTF{\use:n#7}{ + \exp_args:Nf\IfValueTF{\use:n#8}{ % TODO: Better way to do this? This is all kinds of wrong. - \hphantom{\c_math_subscript_token{#7}} + \hphantom{\c_math_subscript_token{#8}} } {} \c_group_end_token } @@ -389,7 +426,7 @@ % \end{macro} % \end{variable} -% \begin{macro}{\v<char>,\<char>v,\vleft,\vright} +% \begin{macro}{\v<char>,\<char>v,\vleft,\vright,\v<char>v} % \begin{macrocode} \prop_if_in:NnTF \g_@@_selected_presets_prop {abc} { \int_step_inline:nnn {1} {26} { @@ -400,6 +437,9 @@ \cs_new:cpx {vleft} { \exp_not:N\@@_arrow_overset:w*{v} } + \cs_new:cpx {vvv} { + \exp_not:N\@@_arrow_overset:w**{v} + } } { \cs_new:cpx {v\int_to_alph:n{#1}} { \exp_not:N\@@_arrow_overset:w{\int_to_alph:n{#1}} @@ -407,12 +447,15 @@ \cs_new:cpx {\int_to_alph:n{#1}v} { \exp_not:N\@@_arrow_overset:w*{\int_to_alph:n{#1}} } + \cs_new:cpx {v\int_to_alph:n{#1}v} { + \exp_not:N\@@_arrow_overset:w**{\int_to_alph:n{#1}} + } } } } {} % \end{macrocode} % \end{macro} -% \begin{macro}{\v<CHAR>,\<CHAR>v} +% \begin{macro}{\v<CHAR>,\<CHAR>v,\v<CHAR>v} % \begin{macrocode} \prop_if_in:NnTF \g_@@_selected_presets_prop {ABC} { \int_step_inline:nnn {1} {26} { @@ -422,11 +465,14 @@ \cs_new:cpx {\int_to_Alph:n{#1}v} { \exp_not:N\@@_arrow_overset:w*{\int_to_Alph:n{#1}} } + \cs_new:cpx {v\int_to_Alph:n{#1}v} { + \exp_not:N\@@_arrow_overset:w**{\int_to_Alph:n{#1}} + } } } {} % \end{macrocode} % \end{macro} -% \begin{macro}{\vc<CHAR>,\c<CHAR>v} +% \begin{macro}{\vc<CHAR>,\c<CHAR>v,\vc<CHAR>v} % \begin{macrocode} \prop_if_in:NnTF \g_@@_selected_presets_prop {cAcBcC} { \int_step_inline:nnn {1} {26} { @@ -436,11 +482,14 @@ \cs_new:cpx {c\int_to_Alph:n{#1}v} { \exp_not:N\@@_arrow_overset:w*{\exp_not:N\mathcal{\int_to_Alph:n{#1}}} } + \cs_new:cpx {vc\int_to_Alph:n{#1}v} { + \exp_not:N\@@_arrow_overset:w**{\exp_not:N\mathcal{\int_to_Alph:n{#1}}} + } } } {} % \end{macrocode} % \end{macro} -% \begin{macro}{\vec,\cev} +% \begin{macro}{\vec,\cev,\vecev} % \begin{macrocode} \prop_if_in:NnTF \g_@@_selected_presets_prop {vec-cev} { \RenewDocumentCommand \vec {m} { @@ -449,6 +498,9 @@ \DeclareDocumentCommand \cev {m} { \@@_arrow_overset:w* {#1} \scan_stop: } + \DeclareDocumentCommand \vecev {m} { + \@@_arrow_overset:w** {#1} \scan_stop: + } } {} % \end{macrocode} % \end{macro} @@ -464,27 +516,36 @@ \cs_set:cpx {\int_to_Alph:n{#1}v} { \exp_not:N\@@_arrow_overset:w*[2.5mu][7/10]{\int_to_Alph:n{#1}} } + \cs_set:cpx {v\int_to_Alph:n{#1}v} { + \exp_not:N\@@_arrow_overset:w**[1.5mu][9/10]{\int_to_Alph:n{#1}} + } } \cs_set:cpn {vS} { \@@_arrow_overset:w[3mu][7/10]{S} } + \cs_set:cpn {vSv} { + \@@_arrow_overset:w**[2mu][9/10]{S} + } \cs_set:cpn {vT} { - \__jmt_lwa_arrow_overset:w[2mu][8/10]{T} + \@@_arrow_overset:w[2mu][8/10]{T} } \cs_set:cpn {Tv} { - \__jmt_lwa_arrow_overset:w*[1mu][8/10]{T} + \@@_arrow_overset:w*[1mu][8/10]{T} } \cs_set:cpn {vU} { - \__jmt_lwa_arrow_overset:w[2mu][7/10]{U} + \@@_arrow_overset:w[2mu][7/10]{U} } \cs_set:cpn {Uv} { - \__jmt_lwa_arrow_overset:w*[2mu][7/10]{U} + \@@_arrow_overset:w*[2mu][7/10]{U} + } + \cs_set:cpn {vUv} { + \@@_arrow_overset:w**[1.5mu][8/10]{U} } \cs_set:cpn {vV} { - \__jmt_lwa_arrow_overset:w[2.5mu][7/10]{V} + \@@_arrow_overset:w[2.5mu][7/10]{V} } \cs_set:cpn {Vv} { - \__jmt_lwa_arrow_overset:w*[2mu][7/10]{V} + \@@_arrow_overset:w*[2mu][7/10]{V} } \cs_set:cpn {vX} { \@@_arrow_overset:w[3mu][7/10]{X} @@ -493,7 +554,7 @@ \@@_arrow_overset:w[2mu][8/10]{Y} } \cs_set:cpn {Yv} { - \__jmt_lwa_arrow_overset:w*[2mu][7/10]{Y} + \@@_arrow_overset:w*[2mu][7/10]{Y} } } {} \prop_if_in:NnTF \g_@@_selected_presets_prop {cAcBcC} { @@ -511,7 +572,10 @@ \@@_arrow_overset:w{\ell} } \cs_new:cpn {ellv} { - \@@_arrow_overset:w{\ell} + \@@_arrow_overset:w*{\ell} + } + \cs_new:cpn {vellv} { + \@@_arrow_overset:w**{\ell} } } {} } {} diff --git a/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf b/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf Binary files differindex ae959a886f..a9439e5989 100644 --- a/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf +++ b/macros/latex/contrib/letterswitharrows/letterswitharrows.pdf diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf Binary files differindex 65f5d2eab8..d10f18c4ca 100644 --- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf +++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty b/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty index 949c3d6fbe..eb98631aed 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee-Light.sty @@ -3,7 +3,7 @@ % licence cliparts...: CC0 from openclipart \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLyceeLight}[2024/10/24 1.00b Aide pour l'utilisation de LaTeX en lycee] +\ProvidesPackage{ProfLycee-Light}[2024/10/24 1.00b Aide pour l'utilisation de LaTeX en lycee] %1.00b Changement du préfixage de certaines commandes + \logo calculatrice interdite %1.00a Refonte du fonctionnement diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty index 63b47ebf2d..dbeb301429 100644 --- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty +++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty @@ -5,8 +5,9 @@ % code \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{ProfLycee}[2024/10/24 3.10e Aide pour l'utilisation de LaTeX en lycee] -% 3.10e Corection de noms de commandes + \logo calculatrice interdite +\ProvidesPackage{ProfLycee}[2024/10/30 3.10f Aide pour l'utilisation de LaTeX en lycee] +% 3.10f Ajout de quelques commandes arithmétiques (test premier + décompo) +% 3.10e Correction de noms de commandes + \logo calculatrice interdite % 3.10d Correction d'un nom de commande (doublon avec ProfMaquette) % 3.10c Ajout de clés/arguments pour les arbres de probas + paramètres stats + arbres de dénombrement(s) % 3.10b Ajout des empilements d'oranges + commandes sur les dates diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex index 76b2d3016b..63258375ca 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-arithm.tex @@ -3,8 +3,91 @@ % Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \RequirePackage{ifthen} +\RequirePackage{etoolbox} \RequirePackage{modulus} +%%-----Nombres premiers (code venant de la documentation de xint :-)) +\NewDocumentCommand\pflboolestpremier{ m }{% + \ifnumodd{#1}% + {% + \ifnumless{#1}{8}% + {% + \ifnumequal{#1}{1}{0}{1}% + }%le cas 3,5,7 qui sont premiers + {% + \if\xintiloop[3+2]% + \ifnum#1<\numexpr\xintiloopindex*\xintiloopindex\relax% + \expandafter\xintbreakiloopanddo\expandafter1\expandafter.% + \fi% + \ifnum#1=\numexpr(#1/\xintiloopindex)*\xintiloopindex\relax% + \else + \repeat 00\expandafter0% + \else% + \expandafter1% + \fi% + }% + }%fin de la partie impaire + {% + \ifnumequal{#1}{2}{1}{0}% + }%partie paire +}% + +\NewDocumentCommand\pflestpremier{ O{est premier} O{n'est pas premier} m }{% + \num{#3} \xintifboolexpr{\pflboolestpremier{#3} == 1}{#1}{#2}\relax% +}% + +%%------Décomposition, adaptée de pfc +\NewDocumentCommand\pfldecompnb{ s m }{% + \xdef\tmpcalc{\xinteval{#2}}% + \xdef\tmparg{}% + \newcount\pflanp\newcount\pflbnp\newcount\pflcnp% + \newcount\pflpileb\newcount\pflexposant% + \pflexposant=0\relax% + \pflanp=\tmpcalc\relax% + \pflbnp=2\relax% + \pflpileb=2\relax% + \ensuremath{% + \whiledo{\the\pflanp > 1}{% + \modulo{\the\pflanp}{\the\pflbnp}% + \ifnum\remainder=0\relax% + \pflcnp=\numexpr\pflanp/\pflbnp\relax% + \pflexposant=\numexpr\pflexposant+1\relax% + \pflanp=\pflcnp\relax% + \else% + \ifnum\pflexposant>0\relax% + \IfBooleanTF{#1}% + {% + \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}\times}% + }% + {% + \ifnum\pflexposant=1\relax% + \xdef\tmparg{\tmparg\num{\the\pflpileb}\times}% + \else% + \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}\times}% + \fi% + }% + \fi% + \pflbnp=\numexpr\pflbnp+1\relax% + \pflpileb=\pflbnp\relax% + \pflexposant=0\relax% + \fi% + }% + \IfBooleanTF{#1}% + {% + \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}}% + }% + {% + \ifnum\pflexposant=1\relax% + \xdef\tmparg{\tmparg\num{\the\pflpileb}}% + \else% + \xdef\tmparg{\tmparg\num{\the\pflpileb}^{\the\pflexposant}}% + \fi% + }% + \tmparg\relax% + }% +} + + %%------ConversionsBases %dec->bin avec blocs de 4 chiffres \setKVdefault[CONVDECBIN]{% @@ -1287,8 +1370,6 @@ \StrChar{#1}{##1}[\tmpchar]% \settowidth{\charwd}{\tmpchar}% \setlength{\widestcharwd}{\maxof{\widestcharwd}{\charwd}}% - - }% } diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex index e8cb62a601..7086b10b22 100644 --- a/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex +++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-ecritures.tex @@ -42,7 +42,6 @@ }% } - %===ENSEMBLES CLASSIQUES \ifthenelse{\isundefined{\N}}% {% @@ -212,11 +211,57 @@ } %====COORDONNEES, VECTEURS -\NewDocumentCommand\CoordPtPl{ m m }{\ensuremath{\left(#1;#2\right)}} -\NewDocumentCommand\CoordPtEsp{ m m m }{\ensuremath{\left(#1;#2;#3\right)}} -\NewDocumentCommand\CoordVecPl{ m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \end{pmatrix}}} -\NewDocumentCommand\CoordVecEsp{ m m m }{\ensuremath{\begin{pmatrix} #1 \\ #2 \\ #3 \end{pmatrix}}} -\NewDocumentCommand\MatDeux{ m m m m }{\ensuremath{\begin{pmatrix} #1 & #2 \\ #3 & #4 \end{pmatrix}}} +\RequirePackage{nicematrix} + +\NewDocumentCommand\CoordPtPl{ O{0} m m }{% + \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits + {% + \ensuremath{\left(#2;#3\right)}% + }% + {% + \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 ; #3 \end{pNiceMatrix}}% + }% +} +\NewDocumentCommand\CoordPtEsp{ O{0} m m m }{% + \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits + {% + \ensuremath{\left(#2;#3;#4\right)}% + }% + {% + \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 ; #3 ; #4 \end{pNiceMatrix}}% + }% +} + +\NewDocumentCommand\CoordVecPl{ O{0} m m }{% + \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits + {% + \ensuremath{\begin{pmatrix} #2 \\ #3 \end{pmatrix}}% + }% + {% + \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 \\ #3 \end{pNiceMatrix}}% + }% +} + +\NewDocumentCommand\CoordVecEsp{ O{0} m m m }{% + \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits + {% + \ensuremath{\begin{pmatrix} #2 \\ #3 \\ #4 \end{pmatrix}}% + }% + {% + \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 \\ #3 \\ #4 \end{pNiceMatrix}}% + }% +} + +\NewDocumentCommand\MatDeux{ O{0} m m m m }{% + \IfEq{#1}{0}%si pas d'argument optionnel := array, sinon nicematrix avec cell-space-limits + {% + \ensuremath{\begin{pmatrix} #2 & #3 \\ #4 & #5 \end{pmatrix}}% + }% + {% + \ensuremath{\begin{pNiceMatrix}[cell-space-limits=#1] #2 & #3 \\ #4 & #5 \end{pNiceMatrix}}% + }% +} + \NewDocumentCommand\Vecteur{ s m O{} }{% \IfBooleanTF{#1}{\ensuremath{\vv*{#2}{#3}}}{\ensuremath{\vv{#2}}}% } diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf Binary files differindex 0cbc015c8a..fb39e43845 100644 --- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf +++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte-example.pdf diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx index d41d99379d..f8b7415396 100644 --- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx +++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.dtx @@ -29,7 +29,7 @@ %<class>\NeedsTeXFormat{LaTeX2e}[2022-06-01] %<class>\ProvidesClass{rub-kunstgeschichte} %<*class> - [2024-09-06 v0.2.0 RUB Kunstgeschichte class] + [2024-10-30 v0.3.0 RUB Kunstgeschichte class] %</class> %<*driver> \documentclass{ltxdoc} @@ -60,6 +60,12 @@ % \DoNotIndex{\section,\subsection,\subsubsection} % \DoNotIndex{\title,\author,\tableofcontents} % \DoNotIndex{\LaTeX,\verb} +% \DoNotIndex{\texorpdfstring} +% \DoNotIndex{\@rubkgi@bibheading,\@rubkgi@bibheading@primary,\@rubkgi@bibheading@secondary} +% \DoNotIndex{\@rubkgi@maketitle} +% \DoNotIndex{\@rubkgi@titlepage@gradebox@width} +% \DoNotIndex{\@author,\@date,\@title} +% \DoNotIndex{\@rubkgi@titlepage@author@email,\@rubkgi@titlepage@author@matricnum,\@rubkgi@titlepage@author@semester,\@rubkgi@titlepage@seminar@semester,\@rubkgi@titlepage@seminar@lecturer,\@rubkgi@titlepage@seminar@name,\@rubkgi@titlepage@seminar@degree,\@rubkgi@titlepage@seminar@module,\@rubkgi@titlepage@seminar@creditpoints} % %^^A define helper commands for consistent typesetting in the documentation % \DeclareDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}} @@ -148,6 +154,63 @@ % % If neither \optn{parksip} nor \optn{noparskip} are given, the \pkg{parskip} package is automatically loaded by default. % +% \subsection{Macros}\label{sec:usage:macros} +% +% \DescribeMacro{\printbibliographies} \oarg{options} +% +% Prints the bibliography, divided into two subbibliographies. +% One for primary sources and one for secondary literature, as suggested in section 3.7.1 of the guidelines on page 14. +% It uses the keyword mechanism to distinguish primary sources i.e. in order for a bib entry to be sorted into the primary sources section, it needs the \texttt{source} keyword. +% E.g. the bible would be considered a primary source: +% \begin{sourceverb} +% @inbook{bible, +% author = {{The Bible}}, +% title = {The Holy Bible: King James Version}, +% |ldots +% keywords = {source} +% } +% \end{sourceverb} +% All other entries which don't have the \texttt{source} keyword will be sorted into the secondary literature section of the bibliography. +% +% You can customize the behavior of the macro using key-value \meta{options}. The option keys that are currently available are \optn{heading}, \optn{heading-primary} and \optn{heading-secondary} to overwrite the headings of the bibliography and the two subbibliographies respectively. +% +% \DescribeMacro{\maketitle} \oarg{titlepage-info} +% +% The native command \cs{maketitle} is redefined to create the title page according to the template in the guidelines. +% The new title page needs more information than the standard one. +% Besides the name of the author and title it needs more details about the author such as the matriculation number as well as information about the seminar the work is associated with. +% The extra info can be passed as key-value pairs to the optional \meta{titlepage-info} argument of the redefined \cs{maketitle} macro +% \DescribeMacro{\configureTitlepage} +% or to the \cs{configureTitlepage} macro implemented for just this task. +% The following custom keys are implemented: +% \begin{description} +% \ItemDescribeOption[titlepage]{email} The email of the author. +% \ItemDescribeOption[titlepage]{matricnum} The matriculation number of the author. +% \ItemDescribeOption[titlepage]{author-semester} The number of semesters the author has studied the subject. +% \ItemDescribeOption[titlepage]{seminar-semester} The semester in which the seminar takes place in. E.g. \optn{Sommersemester 2024} or \optn{Wintersemester 2023/24}. +% \ItemDescribeOption[titlepage]{seminar-lecturer} The name of the lecturer of the seminar. +% \ItemDescribeOption[titlepage]{seminar-name} The name of the seminar itself. +% \ItemDescribeOption[titlepage]{seminar-degree} The degree in which the author has taken the seminar in. +% \ItemDescribeOption[titlepage]{seminar-module} The module in which the author has taken the seminar in. +% \ItemDescribeOption[titlepage]{seminar-cp} The credit points the author will be rewarded with when completing the seminar. +% \end{description} +% Additionally you should set the normal \cs{author}, \cs{date} and \cs{title} info in the preamble. +% +% Note, that in contrast to e.g. the headers of the bibliography, the title page is not translated into the document language. +% The guidleines specify that exactly this template should be used and to our understanding this means that it should always be written in german, regardless of the document language. +% +% \subsection{Translations}\label{sec:usage:translations} +% +% The class uses the \pkg{translations} package to allow multi-lingual strings. The default language is english. To tell it which language it should use, you can load a package like \pkg{babel} with the corresponding language as the package option in the preamble. E.g. for german using the new spelling rules +% \begin{sourceverb} +% \usepackage[ngerman]{babel} +% \end{sourceverb} +% +% All pre-defined strings this class prints on the page of the document (such as the headings of the bibliographies when using \cs{printbibliographies}) are available in multiple languages. +% So far this package only defines its strings for english and german, but you can define them for other languages too.\footnote{E.g. using the \cs{declaretranslation} command. For more info, refer to the documentation of the \pkg{translations} package: \url{https://ctan.org/pkg/translations}} +% +% The translation string definitions can be found in \autoref{sec:implementation:translations}. +% % \StopEventually{} % % \clearpage @@ -240,6 +303,7 @@ % % \DescribePackage{biblatex} % \changes{v0.2.0}{2024-09-06}{Use biblatex with authortitle-dw style from biblatex-dw package.}^^A +% \changes{v0.3.0}{2024-10-30}{Use arthistory-bonn biblatex style instead of authortitle-dw.}^^A % To support bibliography facilities out of the box, the \pkg{biblatex} package is loaded. To customize the behavior, a few options are passed to the package. % \iffalse %% biblatex options @@ -267,40 +331,48 @@ % \end{macrocode} % % \DescribeOption[biblatex]{autopunct} -% Controls whether the citation commands scan ahead for punctuation marks. +% Controls whether the citation commands scan ahead for punctuation marks and move the citation after the punctuation. % \begin{macrocode} - autopunct=false + autopunct=true }{biblatex} % \end{macrocode} % -% \DescribePackage{biblatex-dw} +% \DescribePackage{biblatex-arthistory-bonn} % \iffalse -%% biblatex-dw package +%% biblatex-arthistory-bonn package % \fi -% Further approximation of the suggested bibliography and citation styles in the guidelines is achieved by using the \pkg{biblatex-dw} package. +% Further approximation of the suggested bibliography and citation styles in the guidelines is achieved by using the \pkg{biblatex-arthistory-bonn} package. % To use it, a few more options are passed to \pkg{biblatex}: % \begin{macrocode} \PassOptionsToPackage{ % \end{macrocode} % % \DescribeOption[biblatex]{style} -% The \optn{authortitle-dw} provided by the \pkg{biblatex-dw} package is probably the closest style to the one suggested in the guidelines. +% The \optn{arthistory-bonn} style provided by the \pkg{biblatex-arthistory-bonn} package is suited to approximate the citation style suggested in the guidelines. % \begin{macrocode} - style=authortitle-dw, + style=arthistory-bonn, % \end{macrocode} % -% The following options are provided by the \pkg{biblatex-dw} package: +% The following options of the \optn{arthistory-bonn} biblatex style are set to further implement the guidelines: % -% \DescribeOption[biblatex]{firstfull} +% \DescribeOption[biblatex]{firstcitefull} % Delivers a full citation for the first occurence of an entry. % \begin{macrocode} - firstfull=true, + firstcitefull=true, +% \end{macrocode} +% +% \DescribeOption[biblatex]{enddot} +% Every bibliography entry will end with a dot. +% \begin{macrocode} + enddot=true, % \end{macrocode} % -% \DescribeOption[biblatex]{addyear} -% Adds the year of the publication after the title. +% The next \optn{arthistory-bonn} option is not implementing any part of the guidelines but is still useful: +% +% \DescribeOption[biblatex]{namelinked} +% Both name and year in a short citation will link to the respective bibliography entry. % \begin{macrocode} - addyear=true + namelinked=true }{biblatex} % \end{macrocode} % @@ -371,8 +443,250 @@ % \end{macrocode} % By default, we configure it to not highlight clickable elements. % \begin{macrocode} -\hypersetup{hidelinks=true} +\hypersetup{hidelinks} +% \end{macrocode} +% +% \DescribePackage{translations} +% Used internally by the class to create multilingual strings that react to the document language set e.g. by \pkg{babel}. +% \iffalse +%% Translations +% \fi +% \begin{macrocode} +\RequirePackage{translations} +% \end{macrocode} +% +% \iffalse +%% Other +% \fi +% +% \DescribePackage{tabularx} +% To make fancy tables. Is used e.g. in the title page. +% \begin{macrocode} +\RequirePackage{tabularx} % For fancy tables. Is used in title page. +% \end{macrocode} +% +% \DescribePackage{boxedminipage} +% Used by title page. +% \begin{macrocode} +\RequirePackage{boxedminipage} % Used in title page. % \end{macrocode} +% +% \subsection{Macros}\label{sec:implementation:macros} +% \iffalse +%% Macros +% \fi +% +% \begin{macro}{\printbibliographies} +% \changes{v0.3.0}{2024-10-30}{was added}^^A +% Prints the bibliography using the native \cs{printbibliography} macro, but divides it into sections for primary sources and secondary literature. The keyword \texttt{source} is used to sort entries into the primary sources section. +% +% We start by defining the macro with an optional argument that is passed to \cs{SetKeys} to allow customization using key-value pairs. +% \begin{macrocode} +\newcommand{\printbibliographies}[1][]{% + \SetKeys[rubkgi@printbibliographies]{#1}% +% \end{macrocode} +% We add an entry to the table of contents and insert the main bibliography heading. +% \begin{macrocode} + \addcontentsline{toc}{section}{% + \texorpdfstring{\@rubkgi@bibheading}{bibliography}% + }% + \printbibheading[% + heading = bibliography,% + title = {\@rubkgi@bibheading}% + ] +% \end{macrocode} +% Then we print the subbibliographies. +% \begin{macrocode} + \printbibliography[% + keyword = source,% + heading = subbibliography,% + title = {\@rubkgi@bibheading@primary}% + ] + \printbibliography[% + notkeyword = source,% + heading = subbibliography,% + title = {\@rubkgi@bibheading@secondary}% + ] +} +% \end{macrocode} +% For greater flexibility we define the heading strings as internal macros that can be redefined by the user with key-value options and use the \pkg{translations} package for the default strings. See \autoref{sec:implementation:translations} for the implementation of the translations. We don't want heading strings to include paragraphs, this is why we use the starred variant of \cs{newcommand}. +% \begin{macrocode} +\newcommand*{\@rubkgi@bibheading}{ + \GetTranslationWarn{Bibliography} +} +\newcommand*{\@rubkgi@bibheading@primary}{ + \GetTranslationWarn{Primary Bibliography} +} +\newcommand*{\@rubkgi@bibheading@secondary}{ + \GetTranslationWarn{Secondary Bibliography} +} +% \end{macrocode} +% Finally, we declare the keys that the user can use to redefine the headings. +% \begin{macrocode} +\DeclareKeys[rubkgi@printbibliographies] +{ + heading .store = \@rubkgi@bibheading, + heading-primary .store = \@rubkgi@bibheading@primary, + heading-secondary .store = \@rubkgi@bibheading@secondary +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\maketitle} +% \changes{v0.3.0}{2024-10-30}{Redefined for custom title page according to template in guidelines.}^^A +% We redefine the \cs{maketitle} macro to print a custom title page. +% We also add the ability to customize it using key-value pairs in the optional argument. +% \begin{macrocode} +\renewcommand{\maketitle}[1][]{% + \SetKeys[rubkgi@titlepage]{#1}% + \@rubkgi@maketitle% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@rubkgi@maketitle} +% The custom title page is defined as a dedicated internal command. +% \begin{macrocode} +\newcommand{\@rubkgi@maketitle}{ +% \end{macrocode} +% It uses the \env{titlepage} environment to dedicate a full page to the titel. +% Inside, it uses groups, minipages and tabularx tables to arrange the fields to resemble the template of the guidelines. +% \begin{macrocode} + \begin{titlepage} + % set page margins for the title page + \newgeometry{left=2.5cm,top=2.5cm,bottom=2cm,right=2.5cm}% + % define the width of the grade box + \def\@rubkgi@titlepage@gradebox@width{5.03cm}% + % + % create a group for the top part of the title page + {\raggedright% + % create a minipage for the top left part + \begin{minipage}[t]% + % calculate the width of the top left part + % based on the grade box width + {\dimexpr\textwidth% + -\@rubkgi@titlepage@gradebox@width% + -0.5cm\relax}% + \vspace{0pt}% somehow helps aligning at the top + \begin{tabularx}{\linewidth}{@{}lX}% + \multicolumn{2}{@{}l}{% + Ruhr-Universität Bochum% + }\\% + \multicolumn{2}{@{}l}{% + Fakultät für Geschichtswissenschaft% + }\\% + \multicolumn{2}{@{}l}{% + Kunstgeschichtliches Institut% + }\\% + \multicolumn{2}{@{}l}{% + \@rubkgi@titlepage@seminar@semester% + }\\% + Dozent:in: & \@rubkgi@titlepage@seminar@lecturer\\% + Seminartitel: & \@rubkgi@titlepage@seminar@name\\% + Studiengang: & \@rubkgi@titlepage@seminar@degree\\% + Modul: & \@rubkgi@titlepage@seminar@module\\% + Kreditpunkte: & \@rubkgi@titlepage@seminar@creditpoints\\% + \end{tabularx}% + \end{minipage}% + % align grade box on the right side by filling in the gap + \hfill% + % define the grade box as a boxedminipage + \begin{boxedminipage}[t][3.78cm][t]% + {\@rubkgi@titlepage@gradebox@width}% + % leave a little space and add the text inside + \vspace{1em}% + \hspace{1em}Note:% + \end{boxedminipage}% + }% top part ends here + % + \vfill% vertical space to fill + % + % create center part (title and author) + \begin{center}% + % add title relatively LARGE + {\LARGE \@title \par}% + \vskip 2em% add space between title and author + % add author slightly larger than normal text + {\large \@author \par}% + % end the center environment + % and switch back to normal paragraph text style + \end{center}\par% + % + \vfill% fill gap to put next part at bottom + % + % create bottom part + {\raggedright% + \begin{tabular}{@{}ll}% + Matrikelnr.: & \@rubkgi@titlepage@author@matricnum\\% + % Add email as a clickable link + Email: & \href{mailto:\@rubkgi@titlepage@author@email}% + {\@rubkgi@titlepage@author@email}\\% + Fachsemester: & \@rubkgi@titlepage@author@semester\\% + Abgabetermin: & \@date\\% + \end{tabular} + }% + \end{titlepage}% +% \end{macrocode} +% The guidelines specify that the titlepage counts towards the page numbers but should not display one. Therefore we set the page number counter to two after the title page. +% \begin{macrocode} + \setcounter{page}{2}% +% \end{macrocode} +% We also reset the geometry to the one defined before the title page and then end the custom titlepage macro. +% \begin{macrocode} + \restoregeometry% +} +% \end{macrocode} +% The custom title page needs extra information which we want the user to be able to set via key-value pairs. We first define the key-value pairs and then set the defaults. +% \begin{macrocode} +\DeclareKeys[rubkgi@titlepage] +{ + email .store = \@rubkgi@titlepage@author@email, + matricnum .store = \@rubkgi@titlepage@author@matricnum, + author-semester .store = \@rubkgi@titlepage@author@semester, + seminar-semester .store = \@rubkgi@titlepage@seminar@semester, + seminar-lecturer .store = \@rubkgi@titlepage@seminar@lecturer, + seminar-name .store = \@rubkgi@titlepage@seminar@name, + seminar-degree .store = \@rubkgi@titlepage@seminar@degree, + seminar-module .store = \@rubkgi@titlepage@seminar@module, + seminar-cp .store = \@rubkgi@titlepage@seminar@creditpoints +} +\SetKeys[rubkgi@titlepage] +{ + email = {YOUR-EMAIL}, + matricnum = {YOUR MATRICULATION NUMBER}, + author-semester = {YOUR NUMBER OF SEMESTERS}, + seminar-semester = {THE SEMESTER IN WHCIH THE SEMINAR IS HELD}, + seminar-lecturer = {NAME OF SEMINAR LECTURER}, + seminar-name = {NAME OF THE SEMINAR}, + seminar-degree = {DEGREE SEMINAR IS TAKEN IN}, + seminar-module = {MODULE SEMINAR IS TAKEN IN}, + seminar-cp = {SEMINAR CP} +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\configureTitlepage} +% Lastly, we create a macro that can be used in the preamble to set the titlepage info keys. +% \begin{macrocode} +\newcommand{\configureTitlepage}[1]{% + \SetKeys[rubkgi@titlepage]{#1}% +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Translations}\label{sec:implementation:translations} +% \changes{v0.3.0}{2024-10-30}{Use translations package for multi-lingual support.}^^A +% +% The \pkg{translations} package offers an easy interface to create multilingual strings. We can define them all at once here, at the end of the class, since they are only used when the user commands are expanded in the document. +% +% \subsubsection*{Bibliography headings} +% +% The \pkg{translations} package already comes with translations for the main heading of the bibliography. Additionally, we provide the headings for the subbibliographies in english and german. +% \begin{macrocode} +\DeclareTranslation{english}{Primary Bibliography}{Primary sources} +\DeclareTranslation{german}{Primary Bibliography}{Primärliteratur} +\DeclareTranslation{english}{Secondary Bibliography}{Secondary literature} +\DeclareTranslation{german}{Secondary Bibliography}{Sekundärliteratur} +% \end{macrocode} +% % \iffalse %</class> @@ -398,11 +712,18 @@ % \fi % -% followed by the information that is needed to typeset a title: +% followed by the information that is needed to typeset a normal title: % \begin{macrocode} \title{Example usage of the \textsf{rub-kunstgeschichte} class} \author{Joran Schneyer} % \end{macrocode} +% For the custom title we need to set additional information, such as +% \begin{macrocode} +\configureTitlepage{ + email = {joran.schneyer@ruhr-uni-bochum.de} +} +% \end{macrocode} +% We leave the rest to their default values for now. % % For citations, the bibtex entries are usually written to a seperate \filenm{.bib} file. % For the sake of this example we keep everything in one \filenm{.tex} file and use the \env{filecontents} environment instead. @@ -420,8 +741,18 @@ } @book{exampleBook, author = {John Smith}, - title = {A long example book}, - year = {2024} + title = {A long example book marked as primary literature}, + year = {2024}, + keywords = {source} +} +@inbook{bible, + author = {{The Bible}}, + title = {The Holy Bible: King James Version}, + booktitle = {The New Testament}, + publisher = {Oxford University Press}, + year = {1769}, + location = {Oxford}, + keywords = {source} } @online{exampleWebsite, author = {{Example consortium}}, @@ -455,7 +786,18 @@ % \begin{macrocode} \addbibresource{rub-kunstgeschichte-example.bib} % \end{macrocode} +% \iffalse + +%% Load additional packages +% \fi +% To set our language to german (using the new spelling rules) we load \pkg{babel}. % +% \begin{macrocode} +\usepackage[ngerman]{babel} % Sets the language of the document +% \end{macrocode} +% \iffalse + +% \fi % Having finished the preamble, we begin the document, typeset the title and include a table of contents. % \begin{macrocode} \begin{document} @@ -489,6 +831,10 @@ is automatically loaded to enable clickable links and references. + Notably, the first page is a custom title page that aims to recreate the titlepage template of the guidelines in \LaTeX. Note, how the fields have descriptive default values in CAPS, so that you can easily see which information is still missing for the title page. As the documentation of this class states, you can either pass the corresponding key-value options into an optional argument of \verb|\maketitle|, or use the \verb|\configureTitlepage| macro in the preamble.\footnote{For a full list of titlepage options refer to the \texttt{rub-kunstgeschichte} class documentation.} + + We use the \texttt{babel} package to set the language to german (even though this example document is actually written in english) to showcase how headings are automatically translated. + \section{How to cite sources} This class automatically loads the \texttt{biblatex} package for sophisticated bibliography and citations. @@ -515,15 +861,10 @@ \autocite{biblatexCheatsheet}. At the end of the document we can include a bibliography - containing all cited sources with \verb|\printbibliography|. -% \end{macrocode} -% \iffalse + containing all cited sources, divided into primary and secondary literature, with \verb|\printbibliographies|. Primary literature (also called a \textit{source}) is something like the bible\autocite{bible}, letters, treatises etc. We put the bibliography on a new page by using \verb|\clearpage| before printing it. Note, that since we used \verb|\usepackage[ngerman]{babel}| in the preamble, the headings of the bibliography are typed in german. -% \fi -% -% As suggested in the example document itself, we include the bibliography. -% \begin{macrocode} - \printbibliography + \clearpage + \printbibliographies % \end{macrocode} % % Finally we end the document environment diff --git a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf Binary files differindex e62e392a4b..22fc8ba8d0 100644 --- a/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf +++ b/macros/latex/contrib/rub-kunstgeschichte/rub-kunstgeschichte.pdf diff --git a/macros/latex/contrib/spbmark/README.md b/macros/latex/contrib/spbmark/README.md index 6155a4f2af..ed53b50d7e 100644 --- a/macros/latex/contrib/spbmark/README.md +++ b/macros/latex/contrib/spbmark/README.md @@ -1,5 +1,5 @@ # The `spbmark` package -Customize superscripts and subscripts (v1.46s) +Customize superscripts and subscripts (v1.46t) ## Abstract `spbmark` provides three commands `\super`, `\sub` and `\supersub` to improve the layout of superscripts and subscripts which can be adjusted the relative position and format, and can be used in text and math mode. diff --git a/macros/latex/contrib/spbmark/spbmark.pdf b/macros/latex/contrib/spbmark/spbmark.pdf Binary files differindex 9b5004aecc..e0b1d38ce1 100644 --- a/macros/latex/contrib/spbmark/spbmark.pdf +++ b/macros/latex/contrib/spbmark/spbmark.pdf diff --git a/macros/latex/contrib/spbmark/spbmark.sty b/macros/latex/contrib/spbmark/spbmark.sty index 7c29aa7b4a..ada39cfc91 100644 --- a/macros/latex/contrib/spbmark/spbmark.sty +++ b/macros/latex/contrib/spbmark/spbmark.sty @@ -9,7 +9,7 @@ % https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2018/12/31] \RequirePackage{xparse} -\ProvidesExplPackage{spbmark}{2024/10/30}{1.46s} +\ProvidesExplPackage{spbmark}{2024/10/31}{1.46t} {Customize superscripts and subscripts} \cs_generate_variant:Nn \box_set_ht:Nn { cv } diff --git a/macros/latex/contrib/spbmark/spbmark.tex b/macros/latex/contrib/spbmark/spbmark.tex index 54e18b842a..026e2b157c 100644 --- a/macros/latex/contrib/spbmark/spbmark.tex +++ b/macros/latex/contrib/spbmark/spbmark.tex @@ -8,8 +8,8 @@ \setcnltx { package = spbmark, - version = v1.46s, - date = 2024/10/30, + version = v1.46t, + date = 2024/10/31, authors = Qu Yi, title = \spbmark{} package, info = Customize superscripts and subscripts, @@ -171,7 +171,7 @@ The options common to \meta{kv list} of the three commands are as follows. They \begin{demohigh} \spbset{sbhmove=-\llastwd,sbthiswd=auto,sbcmd=\color{red}} 1A\super{bcd}\sub[thiswd=keep]{e}Some texts\sub{e} \\ -3A\super{bcd}\sub{e}Some texts\sub{e} \\ +2A\super{bcd}\sub{e}Some texts\sub{e} \\ 3A\sub{bcd}[thiswd=keep]\sub{e}Some texts\sub{e} \\ 4A\sub{bcd}\sub{e}Some texts\sub{e} \end{demohigh} diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-bw-admonitions.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-bw-admonitions.css.cls.sty index 3e6d8ba489..ab94402799 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-bw-admonitions.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-bw-admonitions.css.cls.sty @@ -24,10 +24,10 @@ %%% % We use two ''prop'' variables to factorize the code just after. %%% -\prop_new:N \__g_tutodoc_focus_color_prop -\prop_new:N \__g_tutodoc_focus_icon_prop +\prop_new:N \g__tutodoc_focus_color_prop +\prop_new:N \g__tutodoc_focus_icon_prop -\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop { note = DarkGray, tip = DarkGray, imp = DarkGray, @@ -35,7 +35,7 @@ warn = DarkGray, } -\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop { note = \faInfoCircle, tip = \faLightbulb, imp = \faHighlighter, diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-bw-listing.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-bw-listing.css.cls.sty index b4ecb1bf5f..cb370a4953 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-bw-listing.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-bw-listing.css.cls.sty @@ -10,21 +10,21 @@ \colorlet{tutodoc@latex@frame@color}{darkgray} -\newcommand{\tutodoc@latex@left}{1mm} -\newcommand{\tutodoc@latex@right}{1mm} -\newcommand{\tutodoc@latex@top}{1mm} -\newcommand{\tutodoc@latex@bottom}{1mm} +\newcommand{\tutodoc@latex@left@len}{1mm} +\newcommand{\tutodoc@latex@right@len}{1mm} +\newcommand{\tutodoc@latex@top@len}{1mm} +\newcommand{\tutodoc@latex@bottom@len}{1mm} -\newcommand{\tutodoc@latex@arc}{.75mm} +\newcommand{\tutodoc@latex@arc@len}{.75mm} -\newcommand{\tutodoc@latex@left@rule}{1pt} -\newcommand{\tutodoc@latex@right@rule}{1pt} -\newcommand{\tutodoc@latex@top@rule}{1pt} -\newcommand{\tutodoc@latex@bottom@rule}{1pt} +\newcommand{\tutodoc@latex@left@rule@len}{1pt} +\newcommand{\tutodoc@latex@right@rule@len}{1pt} +\newcommand{\tutodoc@latex@top@rule@len}{1pt} +\newcommand{\tutodoc@latex@bottom@rule@len}{1pt} \colorlet{tutodoc@latex@shadow@color}{black!30} -\newcommand{\tutodoc@latex@shadow@xshift}{.75mm} -\newcommand{\tutodoc@latex@shadow@yshift}{-.75mm} -\newcommand{\tutodoc@latex@shadow@offset}{0mm} +\newcommand{\tutodoc@latex@shadow@xshift@len}{.75mm} +\newcommand{\tutodoc@latex@shadow@yshift@len}{-.75mm} +\newcommand{\tutodoc@latex@shadow@offset@len}{0mm} \colorlet{tutodoc@latex@segment@color}{gray} diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-bw-version-n-change.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-bw-version-n-change.css.cls.sty index 2c3666acc2..fb32c4d116 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-bw-version-n-change.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-bw-version-n-change.css.cls.sty @@ -1,9 +1,5 @@ % -- VERSION & CHANGES -- % -\NewExpandableDocumentCommand{\tutodoc@changes@version@color}{}{% - gray% -} - -\NewExpandableDocumentCommand{\tutodoc@changes@date@color}{}{% +\NewExpandableDocumentCommand{\tutodoc@changes@when@color}{}{% gray% } diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-color-admonitions.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-color-admonitions.css.cls.sty index 5adf17f85c..1ce4b721d7 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-color-admonitions.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-color-admonitions.css.cls.sty @@ -28,10 +28,10 @@ %%% % We use two ''prop'' variables to factorize the code just after. %%% -\prop_new:N \__g_tutodoc_focus_color_prop -\prop_new:N \__g_tutodoc_focus_icon_prop +\prop_new:N \g__tutodoc_focus_color_prop +\prop_new:N \g__tutodoc_focus_icon_prop -\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop { note = cyan, tip = ForestGreen, imp = orange, @@ -39,7 +39,7 @@ warn = red, } -\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop { note = \faInfoCircle, tip = \faLightbulb, imp = \faHighlighter, diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-color-listing.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-color-listing.css.cls.sty index 2d9972e893..1d62d2eb92 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-color-listing.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-color-listing.css.cls.sty @@ -10,21 +10,21 @@ \colorlet{tutodoc@latex@frame@color}{darkgray} -\newcommand{\tutodoc@latex@left}{1mm} -\newcommand{\tutodoc@latex@right}{1mm} -\newcommand{\tutodoc@latex@top}{1mm} -\newcommand{\tutodoc@latex@bottom}{1mm} +\newcommand{\tutodoc@latex@left@len}{1mm} +\newcommand{\tutodoc@latex@right@len}{1mm} +\newcommand{\tutodoc@latex@top@len}{1mm} +\newcommand{\tutodoc@latex@bottom@len}{1mm} -\newcommand{\tutodoc@latex@arc}{.75mm} +\newcommand{\tutodoc@latex@arc@len}{.75mm} -\newcommand{\tutodoc@latex@left@rule}{1pt} -\newcommand{\tutodoc@latex@right@rule}{1pt} -\newcommand{\tutodoc@latex@top@rule}{1pt} -\newcommand{\tutodoc@latex@bottom@rule}{1pt} +\newcommand{\tutodoc@latex@left@rule@len}{1pt} +\newcommand{\tutodoc@latex@right@rule@len}{1pt} +\newcommand{\tutodoc@latex@top@rule@len}{1pt} +\newcommand{\tutodoc@latex@bottom@rule@len}{1pt} \colorlet{tutodoc@latex@shadow@color}{black!30} -\newcommand{\tutodoc@latex@shadow@xshift}{.75mm} -\newcommand{\tutodoc@latex@shadow@yshift}{-.75mm} -\newcommand{\tutodoc@latex@shadow@offset}{0mm} +\newcommand{\tutodoc@latex@shadow@xshift@len}{.75mm} +\newcommand{\tutodoc@latex@shadow@yshift@len}{-.75mm} +\newcommand{\tutodoc@latex@shadow@offset@len}{0mm} \colorlet{tutodoc@latex@segment@color}{gray} diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-color-version-n-change.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-color-version-n-change.css.cls.sty index 6fcd348f9e..998e5ad08b 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-color-version-n-change.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-color-version-n-change.css.cls.sty @@ -1,9 +1,5 @@ % -- VERSION & CHANGES -- % -\NewExpandableDocumentCommand{\tutodoc@changes@version@color}{}{% - \tdoclightcolor[60]{DarkBlue}% -} - -\NewExpandableDocumentCommand{\tutodoc@changes@date@color}{}{% +\NewExpandableDocumentCommand{\tutodoc@changes@when@color}{}{% \tdoclightcolor[60]{DarkBlue}% }
\ No newline at end of file diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-dark-admonitions.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-dark-admonitions.css.cls.sty index b5ecb10d4a..5716737a1a 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-dark-admonitions.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-dark-admonitions.css.cls.sty @@ -28,10 +28,10 @@ %%% % We use two ''prop'' variables to factorize the code just after. %%% -\prop_new:N \__g_tutodoc_focus_color_prop -\prop_new:N \__g_tutodoc_focus_icon_prop +\prop_new:N \g__tutodoc_focus_color_prop +\prop_new:N \g__tutodoc_focus_icon_prop -\prop_set_from_keyval:Nn \__g_tutodoc_focus_color_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop { note = cyan, tip = ForestGreen, imp = orange, @@ -39,7 +39,7 @@ warn = red, } -\prop_set_from_keyval:Nn \__g_tutodoc_focus_icon_prop { +\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop { note = \faInfoCircle, tip = \faLightbulb, imp = \faHighlighter, diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-dark-listing.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-dark-listing.css.cls.sty index 64d3cc7a35..d285e06253 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-dark-listing.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-dark-listing.css.cls.sty @@ -10,21 +10,21 @@ \colorlet{tutodoc@latex@frame@color}{darkgray} -\newcommand{\tutodoc@latex@left}{1mm} -\newcommand{\tutodoc@latex@right}{1mm} -\newcommand{\tutodoc@latex@top}{1mm} -\newcommand{\tutodoc@latex@bottom}{1mm} +\newcommand{\tutodoc@latex@left@len}{1mm} +\newcommand{\tutodoc@latex@right@len}{1mm} +\newcommand{\tutodoc@latex@top@len}{1mm} +\newcommand{\tutodoc@latex@bottom@len}{1mm} -\newcommand{\tutodoc@latex@arc}{.75mm} +\newcommand{\tutodoc@latex@arc@len}{.75mm} -\newcommand{\tutodoc@latex@left@rule}{1pt} -\newcommand{\tutodoc@latex@right@rule}{1pt} -\newcommand{\tutodoc@latex@top@rule}{1pt} -\newcommand{\tutodoc@latex@bottom@rule}{1pt} +\newcommand{\tutodoc@latex@left@rule@len}{1pt} +\newcommand{\tutodoc@latex@right@rule@len}{1pt} +\newcommand{\tutodoc@latex@top@rule@len}{1pt} +\newcommand{\tutodoc@latex@bottom@rule@len}{1pt} \colorlet{tutodoc@latex@shadow@color}{black!30} -\newcommand{\tutodoc@latex@shadow@xshift}{.75mm} -\newcommand{\tutodoc@latex@shadow@yshift}{-.75mm} -\newcommand{\tutodoc@latex@shadow@offset}{0mm} +\newcommand{\tutodoc@latex@shadow@xshift@len}{.75mm} +\newcommand{\tutodoc@latex@shadow@yshift@len}{-.75mm} +\newcommand{\tutodoc@latex@shadow@offset@len}{0mm} \colorlet{tutodoc@latex@segment@color}{gray} diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-dark-version-n-change.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-dark-version-n-change.css.cls.sty index 029eef63ff..501e579578 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-dark-version-n-change.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-dark-version-n-change.css.cls.sty @@ -1,9 +1,5 @@ % -- VERSION & CHANGES -- % -\NewExpandableDocumentCommand{\tutodoc@changes@version@color}{}{% +\NewExpandableDocumentCommand{\tutodoc@changes@when@color}{}{% \tdoclightcolor[60]{cyan}% -} - -\NewExpandableDocumentCommand{\tutodoc@changes@date@color}{}{% - \tdoclightcolor[60]{cyan}% -} +}
\ No newline at end of file diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-draft-admonitions.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-draft-admonitions.css.cls.sty index d424f4668c..e0e006b048 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-draft-admonitions.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-draft-admonitions.css.cls.sty @@ -5,9 +5,9 @@ %%% % We use a ''seq'' variable to factorize the code just after. %%% -\seq_new:N \__g_tutodoc_focus_color_seq +\seq_new:N \g__tutodoc_focus_color_seq -\seq_set_from_clist:Nn \__g_tutodoc_focus_color_seq { +\seq_set_from_clist:Nn \g__tutodoc_focus_color_seq { note, tip, imp, diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-draft-listing.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-draft-listing.css.cls.sty index 123b7e472c..f4e86a62a2 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-draft-listing.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-draft-listing.css.cls.sty @@ -11,21 +11,21 @@ \colorlet{tutodoc@latex@frame@color}{darkgray} -\newcommand{\tutodoc@latex@left}{1mm} -\newcommand{\tutodoc@latex@right}{1mm} -\newcommand{\tutodoc@latex@top}{1mm} -\newcommand{\tutodoc@latex@bottom}{1mm} +\newcommand{\tutodoc@latex@left@len}{1mm} +\newcommand{\tutodoc@latex@right@len}{1mm} +\newcommand{\tutodoc@latex@top@len}{1mm} +\newcommand{\tutodoc@latex@bottom@len}{1mm} -\newcommand{\tutodoc@latex@arc}{0pt} +\newcommand{\tutodoc@latex@arc@len}{0pt} -\newcommand{\tutodoc@latex@left@rule}{1pt} -\newcommand{\tutodoc@latex@right@rule}{0pt} -\newcommand{\tutodoc@latex@top@rule}{0pt} -\newcommand{\tutodoc@latex@bottom@rule}{0pt} +\newcommand{\tutodoc@latex@left@rule@len}{1pt} +\newcommand{\tutodoc@latex@right@rule@len}{0pt} +\newcommand{\tutodoc@latex@top@rule@len}{0pt} +\newcommand{\tutodoc@latex@bottom@rule@len}{0pt} \colorlet{tutodoc@latex@shadow@color}{black} -\newcommand{\tutodoc@latex@shadow@xshift}{0mm} -\newcommand{\tutodoc@latex@shadow@yshift}{0mm} -\newcommand{\tutodoc@latex@shadow@offset}{0mm} +\newcommand{\tutodoc@latex@shadow@xshift@len}{0mm} +\newcommand{\tutodoc@latex@shadow@yshift@len}{0mm} +\newcommand{\tutodoc@latex@shadow@offset@len}{0mm} \colorlet{tutodoc@latex@segment@color}{black} diff --git a/macros/latex/contrib/tutodoc/code/tutodoc-draft-version-n-change.css.cls.sty b/macros/latex/contrib/tutodoc/code/tutodoc-draft-version-n-change.css.cls.sty index 0f89f5c86d..a503714978 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc-draft-version-n-change.css.cls.sty +++ b/macros/latex/contrib/tutodoc/code/tutodoc-draft-version-n-change.css.cls.sty @@ -1,9 +1,5 @@ % -- VERSION & CHANGES -- % -\NewExpandableDocumentCommand{\tutodoc@changes@version@color}{}{% +\NewExpandableDocumentCommand{\tutodoc@changes@when@color}{}{% black% -} - -\NewExpandableDocumentCommand{\tutodoc@changes@date@color}{}{% - black% -} +}
\ No newline at end of file diff --git a/macros/latex/contrib/tutodoc/code/tutodoc.cls b/macros/latex/contrib/tutodoc/code/tutodoc.cls index 4c5ae4b693..fad3c185fe 100644 --- a/macros/latex/contrib/tutodoc/code/tutodoc.cls +++ b/macros/latex/contrib/tutodoc/code/tutodoc.cls @@ -9,8 +9,8 @@ \ProvidesExplClass {tutodoc} - {2024-10-28} % Creation: 2023-11-29 - {1.6.1} + {2024-10-30} % Creation: 2023-11-29 + {1.6.2} {This package proposes tools for writing "human friendly" documentations of LaTeX packages.} @@ -24,7 +24,7 @@ \ExplSyntaxOn -\tl_new:N \l__tutodoc_remaining_cls_options_tl +\tl_new:N \l__tutodoc_other_cls_options_tl \newcommand{ \tutodoc@theme } { color } @@ -40,13 +40,13 @@ } }, unknown .code:n = { - \tl_set:Nn \l__tutodoc_remaining_cls_options_tl { #1 } + \tl_set:Nn \l__tutodoc_other_cls_options_tl { #1 } } } \ProcessKeyOptions[tutodoc / main / class / options] -\LoadClass[ \tl_use:N \l__tutodoc_remaining_cls_options_tl ]% +\exp_last_unbraced:NNV \LoadClass[ \l__tutodoc_other_cls_options_tl ]% { article }% [ 2022-06-01 ] @@ -128,7 +128,7 @@ [2022-05-02] \RequirePackage{marginnote}% - [2023-09-07] + [2018/08/09] % =============== % @@ -213,12 +213,12 @@ \makeatletter \InputIfFileExists{tutodoc-main-locale-\tdoclang.cfg.cls.sty}{}{ - \input{tutodoc-main-locale-en.cfg.cls.sty} + \input{tutodoc-main-locale-en.cfg.cls.sty} - \msg_critical:nnx { tutodoc ~ (main) } + \msg_critical:nnx { tutodoc ~ (main) } { main : unsupported-lang } { \tdoclang } - } + } \makeatother } @@ -314,7 +314,7 @@ %%% % prototype:: -% #1 : (text-en) +% #1 : (EN-text) % an english text that will be explained in another \lang. % % :extra: this macro has a star version. @@ -354,8 +354,8 @@ %%% % We use a ''seq'' variable to factorize the code just after. %%% -\seq_new:N \__g_tutodoc_focus_std_seq -\seq_set_from_clist:Nn \__g_tutodoc_focus_std_seq { +\seq_new:N \g__tutodoc_focus_std_seq +\seq_set_from_clist:Nn \g__tutodoc_focus_std_seq { exa, rem } @@ -363,12 +363,12 @@ %%% % prototype:: -% :action: looping over ''\__g_tutodoc_focus_std_seq'' to build new +% :action: looping over ''\g__tutodoc_focus_std_seq'' to build new % numbered theorems sharing the same section level counter. % To achieve that, we use the ''\newkeytheorem'' macro from % the ''keytheorems'' \pack. %%% -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \str_if_eq:nnTF { #1 } { exa } { \newkeytheorem{tdoc#1}[ name = \use:c { tutodoc@trans@#1@title }, @@ -398,22 +398,21 @@ % note:: % We provide two ways to define admonitions. % -% 1) ''\__g_tutodoc_focus_color_prop'' and ''__g_tutodoc_focus_icon_prop'' +% 1) ''\g__tutodoc_focus_color_prop'' and ''g__tutodoc_focus_icon_prop'' % are for iconised and colored frames. % -% 1) ''\__g_tutodoc_focus_color_seq'' is to use a dedicated basic theorem +% 1) ''\g__tutodoc_focus_color_seq'' is to use a dedicated basic theorem % (this should be only useful for the draft theme). % % warning:: % The variables should be defined inside the themes! %%% -\ifcsundef{__g_tutodoc_focus_color_seq}{ +\ifcsundef{g__tutodoc_focus_color_seq}{ %%% -% note:: -% The settings used come from the following sources. -% * https://tex.stackexchange.com/a/727022/6880 -% * https://tex.stackexchange.com/a/682332/6880 -% * https://tex.stackexchange.com/a/623232/6880 +% source:: +% + https://tex.stackexchange.com/a/727022/6880 +% + https://tex.stackexchange.com/a/682332/6880 +% + https://tex.stackexchange.com/a/623232/6880 %%% \tcbset{ tutodoc-focus-color-style/.style = { @@ -439,35 +438,35 @@ \ExplSyntaxOn -\ifcsundef{__g_tutodoc_focus_color_seq}{ +\ifcsundef{g__tutodoc_focus_color_seq}{ %%% % prototype:: -% :action: ''key/value'' iteration over ''\__g_tutodoc_focus_color_prop'' +% :action: ''key/value'' iteration over ''\g__tutodoc_focus_color_prop'' % to build new colorful unumbered theorems. To achieve that, % we use a ''tcolorbox'' style given to the ''\newkeytheorem'' % macro from the ''keytheorems'' \pack, and icons from the % ''fontawesome5'' \pack. %%% - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \newkeytheorem{tdoc#1}[ numbered = false, % tcolorbox-no-titlebar can be used. tcolorbox = {tutodoc-focus-color-style=#2}, name = { - \tdocicon{ \prop_item:Nn \__g_tutodoc_focus_icon_prop { #1 } } + \tdocicon{ \prop_item:Nn \g__tutodoc_focus_icon_prop { #1 } } \use:c { tutodoc@trans@#1@title } - }, + } ] } } { %%% % prototype:: -% :action: looping over ''\__g_tutodoc_focus_color_seq'' to build new +% :action: looping over ''\g__tutodoc_focus_color_seq'' to build new % numbered theorems sharing the same section level counter. % To achieve that, we use the ''\newkeytheorem'' macro from % the ''keytheorems'' \pack. %%% - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \newkeytheorem{tdoc#1}[ name = \use:c { tutodoc@trans@#1@title }, numberlike = tdocexa, @@ -551,7 +550,7 @@ % Cleaner code from https://tex.stackexchange.com/a/703379/6880 . \NewDocumentCommand{\tdocenv}{s O{} m}{% \IfBooleanTF{#1}{% - \texttt{#3}% + \texttt{#3}% }{% \texttt{\string\begin\string{#3\string}#2 % \!\!...\@\!\!\! % @@ -580,6 +579,11 @@ % :: PREFIX FROM... :: % % :::::::::::::::::::: % +\seq_new:N \l__tutodoc_prewhy_parts_seq +\int_new:N \l__tutodoc_prewhy_nbparts_int +\tl_new:N \l__tutodoc_pretext_tl +\tl_new:N \l__tutodoc_posttext_tl + %%% % prototype:: % #1 : (pre.fix) @@ -589,22 +593,28 @@ %%% \NewDocumentCommand{\tdocprewhy}{m}{% % Do we have 2 parts? - \seq_set_split:Nnn \l_tmpa_seq { . } { #1 } + \seq_set_split:Nnn \l__tutodoc_prewhy_parts_seq { . } { #1 } - \int_set:Nn \l_tmpa_int - {\int_eval:n {\seq_count:N \l_tmpa_seq}} + \int_set:Nn \l__tutodoc_prewhy_nbparts_int + {\int_eval:n {\seq_count:N \l__tutodoc_prewhy_parts_seq}} - \if_int_compare:w \l_tmpa_int = 2 + \if_int_compare:w \l__tutodoc_prewhy_nbparts_int = 2 \else: \msg_error:nn { tutodoc ~ (macroenv) } { macroenv : prefix-why-bad-format } \fi: % Let's go. - \seq_pop:NN \l_tmpa_seq \l_tmpa_tl - \seq_pop:NN \l_tmpa_seq \l_tmpb_tl - - \textbf{\tdocpre{\tl_use:N \l_tmpa_tl}\kern.5pt\textperiodcentered\kern.5pt{\tl_use:N \l_tmpb_tl}} + \seq_pop:NN \l__tutodoc_prewhy_parts_seq \l__tutodoc_pretext_tl + \seq_pop:NN \l__tutodoc_prewhy_parts_seq \l__tutodoc_posttext_tl + + \textbf{ + \tdocpre{\tl_use:N \l__tutodoc_pretext_tl} + \kern.5pt + \textperiodcentered + \kern.5pt + {\tl_use:N \l__tutodoc_posttext_tl} + } } \ExplSyntaxOff @@ -643,6 +653,10 @@ \ExplSyntaxOn +\box_new:N \l__tutodoc_content_box +\dim_new:N \l__tutodoc_content_dim + + %%% % prototype:: % #1 : (color) @@ -659,7 +673,7 @@ % https://tex.stackexchange.com/a/604708/6880''. %%% -\NewDocumentCommand{\tdocruler}{O{\tutodoc@showcase@rule@color} m}{ +\NewDocumentCommand{\tdocruler}{ O{\tutodoc@showcase@rule@color} m }{ \par { \centering @@ -668,15 +682,15 @@ \bfseries \color{#1} - \hbox_set:Nn \l_tmpa_box { \,\, #2 \,\, } - \dim_set:Nn \l_tmpa_dim { - .35 \linewidth - .5 \box_wd:N \l_tmpa_box + \hbox_set:Nn \l__tutodoc_content_box { \,\, #2 \,\, } + \dim_set:Nn \l__tutodoc_content_dim { + .35 \linewidth - .5 \box_wd:N \l__tutodoc_content_box } - \rule[.75pt] { \dim_use:N \l_tmpa_dim } + \rule[.75pt] { \dim_use:N \l__tutodoc_content_dim } { 2.5pt } - \box_use:N \l_tmpa_box - \rule[.75pt] { \dim_use:N \l_tmpa_dim } + \box_use:N \l__tutodoc_content_box + \rule[.75pt] { \dim_use:N \l__tutodoc_content_dim } { 2.5pt } \par } @@ -700,9 +714,9 @@ % This color is used to set the one for the decorated texts printed % corresponding to the two first arguments. % #4 : (text color) -% XXXXX +% color of the content % #5 : (rule color builder) -% YYY +% the macro used to build the color from the user's rule color % % :action: this environment just adds its content processed by \latex % between centered materials produced by the macro ''\tdocruler'' @@ -766,11 +780,6 @@ % ''tdocshowcase''. %%% \keys_define:nn { tutodoc / showcase } { -% Texts. - before .tl_set:N = \l_tutodoc_showcase_before_tl, - before .initial:n = \tutodoc@trans@latex@show@start, - after .tl_set:N = \l_tutodoc_showcase_after_tl, - after .initial:n = \tutodoc@trans@latex@show@end, % Colors. colstripe .tl_set:N = \l_tutodoc_showcase_stripe_color_tl, colstripe .initial:n = \tutodoc@showcase@stripe@color, @@ -779,6 +788,11 @@ % Stripe? nostripe .bool_set:N = \l_tutodoc_showcase_nostripe_bool, nostripe .initial:n = false, +% Texts. + before .tl_set:N = \l_tutodoc_showcase_before_tl, + before .initial:n = \tutodoc@trans@latex@show@start, + after .tl_set:N = \l_tutodoc_showcase_after_tl, + after .initial:n = \tutodoc@trans@latex@show@end, } @@ -787,7 +801,7 @@ % :::::::::::::::::::::::::::::: % % prototype:: -% #1 : (key-val) +% #1 : (key-val options) % the key-value options (see above). % % :action: this \env formats \latex code, given as an argument, @@ -834,20 +848,23 @@ % :: SHOWCASE FROM FILE :: % % :::::::::::::::::::::::: % +\tl_new:N \l__tutodoc_showcase_options_tl + + %%% % prototype:: -% #1 : (key-val) +% #1 : (key-val options) % :see: env.tdocshowcase -% #2 : (file-path) +% #2 : (file path) % the path of a file %%% -\NewDocumentCommand{\tdocshowcaseinput}{O{} m}{ +\NewDocumentCommand{\tdocshowcaseinput}{ O{} m }{ \group_begin: \keys_set_known:nnN { tutodoc / showcase } { #1 } - \l_tmpa_tl + \l__tutodoc_showcase_options_tl - \exp_last_unbraced:NNV \tdocshowcase [\l_tmpa_tl] + \exp_last_unbraced:NNV \tdocshowcase [\l__tutodoc_showcase_options_tl] \input{#2} \endtdocshowcase \group_end: @@ -879,7 +896,7 @@ %%% \newmintinline[tdocinlatex]{\tutodoc@latex@lexer}{% bgcolor = tutodoc@latex@back@color,% - style/.expand once = \tutodoc@latex@style% <-- This needs minted3! + style/.expand once = \tutodoc@latex@style % <-- This needs minted3! } @@ -907,7 +924,7 @@ % % See the pgfkeys package documentation for explanation. %%% -\NewExpandableDocumentCommand{\tutodoc@latex@listing@formating}{ m }{ +\NewExpandableDocumentCommand{\tutodoc@latex@listing@format@option}{ m }{ \str_case:nnF { #1 } { { sbs } { listing ~ side ~ text } { code } { listing ~ only } @@ -935,20 +952,20 @@ colupper = tutodoc@latex@text@color, collower = tutodoc@latex@text@color, % Padding. - left = \tutodoc@latex@left, - right = \tutodoc@latex@right, - bottom = \tutodoc@latex@bottom, - top = \tutodoc@latex@top, + left = \tutodoc@latex@left@len, + right = \tutodoc@latex@right@len, + bottom = \tutodoc@latex@bottom@len, + top = \tutodoc@latex@top@len, % Frame. - shadow = {\tutodoc@latex@shadow@xshift}% - {\tutodoc@latex@shadow@yshift}% - {\tutodoc@latex@shadow@offset}% + shadow = {\tutodoc@latex@shadow@xshift@len}% + {\tutodoc@latex@shadow@yshift@len}% + {\tutodoc@latex@shadow@offset@len}% {tutodoc@latex@shadow@color}, - arc = \tutodoc@latex@arc, - leftrule = \tutodoc@latex@left@rule, - rightrule = \tutodoc@latex@right@rule, - bottomrule = \tutodoc@latex@bottom@rule, - toprule = \tutodoc@latex@top@rule, + arc = \tutodoc@latex@arc@len, + leftrule = \tutodoc@latex@left@rule@len, + rightrule = \tutodoc@latex@right@rule@len, + bottomrule = \tutodoc@latex@bottom@rule@len, + toprule = \tutodoc@latex@top@rule@len, % Separating line. segmentation style = { tutodoc@latex@segment@color, @@ -973,7 +990,7 @@ % ''tcolorbox'' to have \infos about the environment ''tdoclatex''. %%% \newtcblisting{tdoclatex}[1][std]{% - tutodoc-latex-listing-style = \tutodoc@latex@listing@formating{#1} + tutodoc-latex-listing-style = \tutodoc@latex@listing@format@option{#1} } @@ -985,7 +1002,7 @@ % prototype:: % #1 : (tdoclatex-style) % :see: ''\newtcblisting{tdoclatex}'' -% #2 : (file-path) +% #2 : (file path) % the path of the file to input and format. % % note:: @@ -994,7 +1011,7 @@ %%% \newtcbinputlisting{\tdoclatexinput}[2][std]{ listing file = {#2}, - tutodoc-latex-listing-style = \tutodoc@latex@listing@formating{#1} + tutodoc-latex-listing-style = \tutodoc@latex@listing@format@option{#1} } @@ -1027,13 +1044,16 @@ % :: LATEXSHOW MACRO :: % % ::::::::::::::::::::: % +\tl_new:N \l__tutodoc_showcase_options_passed_tl + + %%% % prototype:: -% #1 : (key-val) +% #1 : (key-val options) % the key-value options supported by the ''tdocshowcase'' \env, % plus one allowing you to change the description of a line % printed between the code and its highlighted output. -% #2 : (file-path) +% #2 : (file path) % the path of a file % % :see: env.tdocshowcase , @@ -1043,14 +1063,14 @@ \group_begin: \keys_set_known:nnN { tutodoc / listing / latexshow } { #1 } - \l_tmpa_tl + \l__tutodoc_showcase_options_passed_tl \tdoclatexinput[code]{#2} \tl_use:N \l_tutodoc_listing_explain_tl % Source: https://tex.stackexchange.com/a/696700/6880 - \exp_last_unbraced:NNV \tdocshowcaseinput [\l_tmpa_tl] {#2} + \exp_last_unbraced:NNV \tdocshowcaseinput [\l__tutodoc_showcase_options_passed_tl] {#2} \group_end: } @@ -1087,16 +1107,19 @@ % the second material (a date or nothing) % #4 : (spacing) % the last negative vertical spacing for the 2nd rule +% #5 : (vertical offset) +% algebraic distance to move vertically the material % % :action: this macro factorizes the printing of the changes % in the left margin. % % :see: \__tutodoc_translate_date:n %%% -\NewDocumentCommand{\tutodoc@new@change@margin}{m m m m}{ +\NewDocumentCommand{\tutodoc@new@change@margin}{m m m m m}{ \marginnote{ \color{#1} \scriptsize + \normalfont \centering \vspace{0pt} @@ -1115,13 +1138,14 @@ } \par - \__tutodoc_translate_date:n { #3 }\vphantom{Mp} + \__tutodoc_translate_date:n { #3 } + \vphantom{Mp} \par } \vspace{#4} \rule{1.65cm}{.95pt} - }[-.345cm] + }[#5] } @@ -1151,9 +1175,7 @@ % to use the format expected for a "localised" date. %%% \cs_new:Npn \__tutodoc_translate_date_process:w #1 - #2 - #3 \q_stop { - \tutodoc@trans@date{#1} - {#2} - {#3} + \tutodoc@trans@date{#1}{#2}{#3} } \ExplSyntaxOff @@ -1165,6 +1187,13 @@ \input{tutodoc-\tutodoc@theme-version-n-change.css.cls.sty} +\newlength{\tutodoc@version@vertical@sep@len} +\setlength{\tutodoc@version@vertical@sep@len}{-4.25pt} + +\newlength{\tutodoc@version@vertical@offset@len} +\setlength{\tutodoc@version@vertical@offset@len}{-.345cm} + + %%% % prototype:: % #1 : (color) @@ -1173,6 +1202,8 @@ % a version number % #3 : (date) % a date ''YYYY-MM-DD'' +% #4 : (vertical offset) +% algebraic distance to move vertically the material % % :action: this macro prints a margin note showing a version number % below a date, and the optional argument is used to colorize @@ -1183,11 +1214,13 @@ % to parse the date such as to display it following the standard convention % of the language chosen when loading the package. %%% -\NewDocumentCommand{\tdocversion}{O{\tutodoc@changes@version@color} m O{}}{ - \tutodoc@new@change@margin{#1} % Color - {#2} % Version - {#3} % Date - {-4.25pt} % Last negative vertical spacing +\NewDocumentCommand{\tdocversion}{ O{\tutodoc@changes@when@color} m O{} D<>{\tutodoc@version@vertical@offset@len} }{ + \tutodoc@new@change@margin% + {#1} % Color + {#2} % Version + {#3} % Date + {\tutodoc@version@vertical@sep@len} % Last negative vertical spacing + {#4} % Vertical offset } @@ -1195,21 +1228,31 @@ % :: DATE :: % % :::::::::: % +\newlength{\tutodoc@date@vertical@sep@len} +\setlength{\tutodoc@date@vertical@sep@len}{-5.35pt} + +\newlength{\tutodoc@date@vertical@offset@len} +\setlength{\tutodoc@date@vertical@offset@len}{-.345cm} + %%% % prototype:: % #1 : (color) % the color of the margin note % #2 : (date) % a date ''YYYY-MM-DD'' +% #3 : (vertical offset) +% algebraic distance to move vertically the material % % :action: this macro is similar to ''\tdocversion'' except that it just % prints a date. %%% -\NewDocumentCommand{\tdocdate}{O{\tutodoc@changes@date@color} m}{ - \tutodoc@new@change@margin{#1} % Color - {} % Version - {#2} % Date - {-5.35pt} % Last negative spacing +\NewDocumentCommand{\tdocdate}{ O{\tutodoc@changes@when@color} m D<>{\tutodoc@date@vertical@offset@len} }{ + \tutodoc@new@change@margin% + {#1} % Color + {} % Version + {#2} % Date + {\tutodoc@date@vertical@sep@len} % Last negative spacing + {#3} % Vertical offset } @@ -1229,9 +1272,33 @@ { One ~ single ~ title ~ must ~ be ~ indicated. } -% ::::::::::::::::::::: % -% :: CHANGES - TOPIC :: % -% ::::::::::::::::::::: % +% ::::::::::::::::::: % +% :: GENERIC TOPIC :: % +% ::::::::::::::::::: % + +\tl_new:N \l_tutodoc_topic_when_color_tl +\tl_new:N \l_tutodoc_topic_date_tl +\tl_new:N \l_tutodoc_topic_version_tl + +\keys_define:nn { tutodoc / version-n-change / topic / options } { +% Colors. + col .tl_set:N = \l_tutodoc_topic_when_color_tl, + col .initial:n = \tutodoc@changes@when@color, +% Date. + date .tl_set:N = \l_tutodoc_topic_date_tl, + date .initial:n = \c_empty_tl, +% Version. + version .tl_set:N = \l_tutodoc_topic_version_tl, + version .initial:n = \c_empty_tl, +} + + +\tl_new:N \l__tutodoc_topic_all_user_options_tl + + +\newlength{\tutodoc@topic@vertical@offset@len} +\setlength{\tutodoc@topic@vertical@offset@len}{-.745cm} + %%% % prototype:: @@ -1239,36 +1306,56 @@ % a title that will be followed by a colon. % #2 : (aws-icon) % one material that expects to be an icon command from the -% ''fontawsome5'' \pack. +% ''fontawsome5'' \pack +% #3 : (key-val options) +% see above % % :action: this environment prints some \infos about specific changes % achieved in a new version (no special formatting is applied). +% Key-val options allow to add a date \andor a \nbver with +% a specific color if needed. %%% -\NewDocumentEnvironment{tdoctopic}{ m O{} }{ +\NewDocumentEnvironment{tdoctopic}{ m D<>{} O{} }{ \IfBlankT{#1}{ \msg_fatal:nn { tutodoc ~ (version-n-change) } { version-n-change : topic-missing-title } - }% -% \paragraph{% - \textbf{% - \IfBlankF{#2}{\tdocicon{#2}}% + } + + \keys_set:nn { tutodoc / version-n-change / topic / options } { #3 } + + \tl_clear:N \l__tutodoc_topic_all_user_options_tl + \tl_set_eq:NN \l__tutodoc_topic_all_user_options_tl \l_tutodoc_topic_version_tl + \tl_put_right:Nn \l__tutodoc_topic_all_user_options_tl { \l_tutodoc_topic_date_tl } + + \paragraph{% + \IfBlankF{#2}{\tdocicon{#2}} \textsc{#1.} + \exp_args:Ne \IfBlankF{\l__tutodoc_topic_all_user_options_tl}{ +% A date and/or a version. + \exp_args:NNee \tutodoc@new@change@margin% + {\l_tutodoc_topic_when_color_tl} + {\l_tutodoc_topic_version_tl} + {\l_tutodoc_topic_date_tl} + {\tutodoc@version@vertical@sep@len} + {\tutodoc@topic@vertical@offset@len} + } } + \begin{itemize} }{ \end{itemize} } -% :::::::::::::::::::::::::: % -% :: CHANGES - NEW THINGS :: % -% :::::::::::::::::::::::::: % +% :::::::::::::::::::::: % +% :: CLASSICAL TOPICS :: % +% :::::::::::::::::::::: % %%% % We use a ''prop'' variable to factorize the code just after. %%% -\prop_new:N \__g_tutodoc_topic_change_prop -\prop_set_from_keyval:Nn \__g_tutodoc_topic_change_prop { +\prop_new:N \g__tutodoc_topic_change_prop +\prop_set_from_keyval:Nn \g__tutodoc_topic_change_prop { break = \faCodeBranch, fix = \faWrench, new = \faGem, @@ -1282,13 +1369,13 @@ % prototype:: % :see: env.tdoctopic % -% :action: ''key/value'' iteration over ''\__g_tutodoc_topic_change_prop'' +% :action: ''key/value'' iteration over ''\g__tutodoc_topic_change_prop'' % to build topic-like \envs using the \env ''tdoctopic'' % (the title used is translated into the good language). %%% -\prop_map_inline:Nn \__g_tutodoc_topic_change_prop { - \NewDocumentEnvironment{ tdoc#1 } {} { - \begin{tdoctopic}{ \use:c { tutodoc@trans@chges@#1 } } [ #2 ] +\prop_map_inline:Nn \g__tutodoc_topic_change_prop { + \NewDocumentEnvironment{ tdoc#1 } { O{} } { + \begin{tdoctopic}{ \use:c { tutodoc@trans@chges@#1 } } < #2 > [##1] }{ \end{tdoctopic} } @@ -1298,7 +1385,7 @@ %%% % prototype:: % #1 : (short-desc) -% a short text expected t indicate the very first version of a project. +% a short text expected to indicate the very first version of a project. % % :action: the short text printed will be preceded by a pretty anchor icon. %%% @@ -1314,19 +1401,29 @@ % ----------------- % % Source -% * https://tex.stackexchange.com/a/705938/6880 -% (for \addvspace{\medskipamount} instead of \medskip) +% + https://tex.stackexchange.com/a/130529/6880 +% (for the leaders trick) +% + https://tex.stackexchange.com/a/269887/6880 +% (for the \hrule width) +% + https://tex.stackexchange.com/a/729710/6880 +% (centering the \hrule) + +\newlength{\tutodoc@vertical@space@deco@len} +\setlength{\tutodoc@vertical@space@deco@len}{\dimeval{2\medskipamount+1.25pt}} %%% % prototype:: % :action: this macro draws a centered horizontal rule with a height % of qty::''0.75 pt'', and a width equal to half of the current -% text width, and extra vertical spaces are added above and +% text width, and extra vertical spaces are added above and % below the rule. +% +% :see: len.tutodoc@vertical@space@deco@len %%% \NewDocumentCommand{\tdocsep}{}{ - \par\addvspace{\medskipamount} - \hfill\rule{0.5\textwidth}{0.75pt}\hfill\null - \medskip - \smallskip + \par + \cleaders + \vbox to \tutodoc@vertical@space@deco@len{ + \vfill\centerline{\vrule width 0.5\hsize height 0.75pt}\vfill + }\vskip\tutodoc@vertical@space@deco@len } diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf Binary files differindex d053e393a0..e4bed6a6c1 100644 --- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf +++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.pdf diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex index f2990d6068..c35343b020 100644 --- a/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex +++ b/macros/latex/contrib/tutodoc/doc/tutodoc-en.tex @@ -35,7 +35,7 @@ \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -47,8 +47,8 @@ \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -60,7 +60,7 @@ \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -127,7 +127,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -139,8 +139,8 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -152,7 +152,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -219,7 +219,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -231,8 +231,8 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -244,7 +244,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -311,7 +311,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -323,8 +323,8 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -336,7 +336,7 @@ $E = m c^2$ or $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -394,7 +394,7 @@ Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu... \begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex} -\begin{tdoctopic}{To hide}[\faEyeSlash] +\begin{tdoctopic}{To hide}<\faEyeSlash> % An icon from fontawesome5. \item Info 1... \item Info 2... @@ -434,6 +434,32 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... \end{filecontents*} +\begin{filecontents*}[overwrite]{examples-version-n-change-side-effect.tex} +\tdocversion[red]{1.2.3}[2024-10-29]% +\paragraph{Before it's problematic.} +Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla... + + +\paragraph{After it's misplaced}% +\tdocversion[red]{1.2.3}[2024-10-29] + +Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... + + +\paragraph{No miracle solution.\tdocversion[red]{1.2.3}[2024-10-29]} + +Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli... + + +\paragraph{Manual problem management.\tdocversion{1.2.3}[2024-10-29]<-.7cm>} + +Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo... +\end{filecontents*} + + \begin{filecontents*}[overwrite]{examples-version-n-change-first.tex} \tdocstartproj{1st version of the project.} \end{filecontents*} @@ -447,6 +473,27 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... \end{filecontents*} +\begin{filecontents*}[overwrite]{examples-version-n-change-what-n-when.tex} +\begin{tdoctech}[col = red, + date = 2024-10-29] + \item Info 1... + \item Info 2... +\end{tdoctech} + +\begin{tdocupdate}[col = ForestGreen, + version = 1.2.3] + \item Info 1... + \item Info 2... +\end{tdocupdate} + +\begin{tdoctopic}{To hide}<\faEyeSlash>% + [version = 4.5.6, date = 2025-11-30] + \item Info 1... + \item Info 2... +\end{tdoctopic} +\end{filecontents*} + + \begin{filecontents*}[overwrite]{examples-version-n-change-break.tex} \begin{tdocbreak} \item Info 1... @@ -845,7 +892,7 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli... \title{The \texttt{tutodoc} class - Tutorial-style documentation} \author{Christophe, BAL} -\date{Oct 28, 2024 - Version 1.6.1} +\date{Oct 30, 2024 - Version 1.6.2} \maketitle @@ -874,9 +921,23 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli... \begin{tdocnote}[Last changes] \small -\begin{tdoctech} - \item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,. -\end{tdoctech} +\begin{tdocnew} + \item The macros \tdocmacro{tdocdate} and \tdocmacro{tdocversion} has a new final optional argument \tdocinlatex{<voffset>} to choose a specific vertical offset. + + \item Better environments to indicate the changes made. + \begin{enumerate} + \item The new optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a specific topic. + + \item Use of \tdocmacro{paragraph} for the title. + \end{enumerate} +\end{tdocnew} + + +\begin{tdocupdate} + \item Version and changes: the font of the margin notes will always have a normal shape. + + \item Ornament: use of a \tdocinlatex{\cleaders} to avoid orphean rules at the bottom of a page. +\end{tdocupdate} \end{tdocnote} \end{minipage} \end{center} @@ -1091,23 +1152,23 @@ To modify the general layout, there is the \thisproj\ class option \tdocinlatex{ % The gallery starts here... \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-bw} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-color} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-dark} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-draft} } @@ -1176,14 +1237,14 @@ Everything happens via \tdocenv{tdocrem}, which works identically to the \tdocen \label{tutodoc-admonitions} \begin{tdocnote} - The formatting proposed here is the default one, but others are possible by changing the theme: see the gallery of use cases in the appendix page \pageref{tutodoc-theme-gallery}. - As for the icons, they are obtained via the \tdocpack{fontawesome5} package, and the \tdocmacro{tdocicon} macro manages the spacing in relation to the text. - \footnote{ - For example, - \tdocinlatex|\fbox{tdocicon{faBed}{Fatigued}}| - produces - \fbox{\tdocicon{\faBed}{Fatigued}},. - } + The formatting proposed here is the default one, but others are possible by changing the theme: see the gallery of use cases in the appendix page \pageref{tutodoc-theme-gallery}. + As for the icons, they are obtained via the \tdocpack{fontawesome5} package, and the \tdocmacro{tdocicon} macro manages the spacing in relation to the text. + \footnote{ + For example, + \tdocinlatex|\fbox{tdocicon{faBed}{Fatigued}}| + produces + \fbox{\tdocicon{\faBed}{Fatigued}}\,. + } \end{tdocnote} @@ -1201,7 +1262,7 @@ The \tdocenv*{tdoctip} environment is used to give tips. Here's how to use it. \begin{tdoctip} Sometimes, highlighted content can be reduced to a list. In this case, the formatting can be improved as follows where we use the \tdocinlatex{wide} option from the \tdocpack{enumitem} package. - \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex} + \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex} \end{tdoctip} @@ -1667,6 +1728,7 @@ To make it easier to monitor a project, it is essential to provide a history ind \subsection{When?} +\label{tutodoc-changes-when} You can either date something, or version it, in which case the version number can be dated. @@ -1702,12 +1764,22 @@ You can either date something, or version it, in which case the version number c \end{tdocimp} -\begin{tdocwarn} +\begin{tdoccaut} Only the use of the digital format \tdocinlatex+YYYY-MM-DD+ is verified, \footnote{ Technically, checking the validity of a date using \LaTeX3 presents no difficulty. } and this is a choice! Why? Quite simply because dating and versioning explanations should be done semi-automatically to avoid any human bugs. +\end{tdoccaut} + + +\begin{tdocwarn} + Behind the scenes, most of the work is done by the \tdocmacro{marginnote} macro in the eponymous package. + The \tdocmacro{tdocdate} and \tdocmacro{tdocversion} macros therefore suffer from the same side effects as in the following example. + However, these problems can be solved using an optional argument \tdocinlatex{<vertical-displacement>}, as at the end of the following example. It's ugly, but functional. + + \tdoclatexshow[nostripe, colstripe=red]{examples-version-n-change-side-effect.tex} + \end{tdocwarn} @@ -1726,23 +1798,23 @@ You can either date something, or version it, in which case the version number c \foreach \exatitle/\filename in { {Just for the very first version}/%<-- Translate me! - first, + first, {For new features}/% <-- Translate me! - new, + new, {For updates}/% <-- Translate me! - update, + update, {For breaks}/% <-- Translate me! - break, + break, {For problems}/% <-- Translate me! - pb, + pb, {For fixes}/% <-- Translate me! - fix, + fix, {Technical information}/% <-- Translate me! - tech, + tech, {Selectable themes with an icon}/% <-- Translate me! - user-choice-icon, + user-choice-icon, {Selectable themes without icons}/%<-- Translate me! - user-choice% + user-choice% } { \begin{tdocexa}[\exatitle] \leavevmode @@ -1753,7 +1825,19 @@ You can either date something, or version it, in which case the version number c } -\section{Ornaments} +\subsection{The what and the when} + +The optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a particular type.% +\footnote{ + The warning at the end of the section \ref{tutodoc-changes-when} gives the technique used behind the scene, while showing the need to offer specialized keys. +} +Here are some examples of use. + +\tdoclatexshow{examples-version-n-change-what-n-when.tex} + + + +\section{Ornament} Let's finish this documentation with a small formatting tool that is very useful. @@ -1800,7 +1884,7 @@ Ble, ble, ble... \begin{figure}[ht] - \centering + \centering \contribtranslatedirtree\ \caption{Simplified view of the translation folder} \label{tutodoc-contrib-translate-dir} @@ -1811,7 +1895,7 @@ The translations are roughly organized as in figure \ref{tutodoc-contrib-transla \footnote{ This was the organization on October 5, 2024, but it's still relevant today. } -\textbf{A little further down, the \ref{tutodoc-contrib-translate} section explains how to add new translations}. +\textbf{A little further down, the section \ref{tutodoc-contrib-translate} explains how to add new translations}. \subsubsection{The \texttt{fr} and \texttt{en} folders} @@ -1920,13 +2004,23 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver \small -\tdocversion{1.6.1}[2024-10-28] +\begin{tdocnew}[version = 1.6.2, date = 2024-10-30] + \item The macros \tdocmacro{tdocdate} and \tdocmacro{tdocversion} has a new final optional argument \tdocinlatex{<voffset>} to choose a specific vertical offset. -\small + \item Better environments to indicate the changes made. + \begin{enumerate} + \item The new optional keys \tdocinlatex{col}\,, \tdocinlatex{date} and \tdocinlatex{version} allow to date and version a change of a specific topic. -\begin{tdoctech} - \item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,. -\end{tdoctech} + \item Use of \tdocmacro{paragraph} for the title. + \end{enumerate} +\end{tdocnew} + + +\begin{tdocupdate} + \item Version and changes: the font of the margin notes will always have a normal shape. + + \item Ornament: use of a \tdocinlatex{\cleaders} to avoid orphean rules at the bottom of a page. +\end{tdocupdate} \tdocsep @@ -1934,38 +2028,44 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.6.0}[2024-10-27] +\begin{tdoctech}[version = 1.6.1, date = 2024-10-28] + \item The naming rules of \ctan\ need the use of \trademark{CSS} files named \verb+tutodoc-*.css.cls.sty+\,. +\end{tdoctech} -\small +\tdocsep -\begin{tdocbreak} - \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{color} key has been renamed \tdocinlatex{colstripe}. - \item The macro \tdocmacro{tdoclinkcolor} has been renamed \tdocinlatex{tutodoc@link@color} for internal use. +% ------------------ % + + +\begin{tdocbreak}[version = 1.6.0, date = 2024-10-27] + \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{color} key has been renamed \tdocinlatex{colstripe}. + + \item The macro \tdocmacro{tdoclinkcolor} has been renamed \tdocinlatex{tutodoc@link@color} for internal use. \end{tdocbreak} \begin{tdocnew} - \item The \tdocinlatex{theme} class option allows you to choose different formatting themes. + \item The \tdocinlatex{theme} class option allows you to choose different formatting themes. - \item Change log: addition of the \tdocenv*{tdoctech} environment for technical information. + \item Change log: addition of the \tdocenv*{tdoctech} environment for technical information. - \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{coltext} key can also be used to change the text color. + \item The \tdocenv*{showcase} environment and its descendants: the \tdocinlatex{coltext} key can also be used to change the text color. - \item The new functionalities have been documented. + \item The new functionalities have been documented. \end{tdocnew} \begin{tdocupdate} - \item Change log: the \tdocenv*{tdocupdate} environment uses the icon - \raisebox{0pt}[0pt][0pt]{\fbox{\reflectbox{\faHistory}}} - instead of - \raisebox{0pt}[0pt][0pt]{\fbox{\faMagic}}\,. + \item Change log: the \tdocenv*{tdocupdate} environment uses the icon + \raisebox{0pt}[0pt][0pt]{\fbox{\reflectbox{\faHistory}}} + instead of + \raisebox{0pt}[0pt][0pt]{\fbox{\faMagic}}\,. \end{tdocupdate} \begin{tdocfix} - \item The Spanish translations were not included in the previous version! Don't laugh too hard... + \item The Spanish translations were not included in the previous version! Don't laugh too hard... \end{tdocfix} \tdocsep @@ -1974,11 +2074,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.5.0}[2024-10-19] - -\small - -\begin{tdoctech} +\begin{tdoctech}[version = 1.5.0, date = 2024-10-19] \item Version 3 of \tdocpack{minted} is taken into account. \end{tdoctech} @@ -2009,11 +2105,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.4.0}[2024-09-28] - -\small - -\begin{tdocbreak} +\begin{tdocbreak}[version = 1.4.0, date = 2024-09-28] \item The \tdocenv*{tdoccaution} environment has been renamed \tdocenv*{tdoccaut} for simplified input. \item Content highlighting: examples and remarks, indicated via the \tdocenv*{tdocexa} and \tdocenv*{tdocrem} environments, are always numbered using a common counter. @@ -2048,11 +2140,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.3.1}[2024-09-26] - -\small - -\begin{tdocnew} +\begin{tdocnew}[version = 1.3.1, date = 2024-09-26] \item Star version of \tdocmacro{tdocenv} to display only the environment name. \end{tdocnew} @@ -2062,11 +2150,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.3.0}[2024-09-25] - -\small - -\begin{tdoctech} +\begin{tdoctech}[version = 1.3.0, date = 2024-09-25] \item Version 3 of \tdocpack{minted} cannot be used for the moment as it contains bugs: see \url{https://github.com/gpoore/minted/issues/401}. We therefore force temporarily the use of version 2 of \tdocpack{minted}. \end{tdoctech} @@ -2101,11 +2185,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.2.0-a}[2024-08-23] - -\small - -\begin{tdocupdate} +\begin{tdocupdate}[version = 1.2.0-a, date = 2024-08-23] \item \tdocmacro{tdocversion} \begin{enumerate} \item The version number is above the date. @@ -2125,11 +2205,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.1.0}[2024-01-06] - -\small - -\begin{tdocnew} +\begin{tdocnew}[version = 1.1.0, date = 2024-01-06] \item Change log: two new environments. \begin{enumerate} \item \tdocenv{tdocbreak} for breaking changes which are not backward compatible. @@ -2146,11 +2222,7 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver % ------------------ % -\tdocversion{1.0.1}[2023-12-08] - -\small - -\begin{tdocfix} +\begin{tdocfix}[version = 1.0.1, date = 2023-12-08] \item \tdocmacro{tdocenv}: spacing is now correct, even if the \tdocpack{babel} package is not loaded with the French language. \item \tdocenv[{[nostripe]}]{tdocshowcase} : page breaks around \tdocquote{framing} lines should be rare from now on. @@ -2163,9 +2235,6 @@ Do not use the \verb#main# branch, which is used to freeze the latest stable ver \tdocversion{1.0.0}[2023-11-29] - -\small - \tdocstartproj{First public version of the project.} \end{document} diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf Binary files differindex 8628bf3a93..30838b5bba 100644 --- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf +++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.pdf diff --git a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex index ba401d7cff..d566fe93ea 100644 --- a/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex +++ b/macros/latex/contrib/tutodoc/doc/tutodoc-fr.tex @@ -37,7 +37,7 @@ \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -49,8 +49,8 @@ \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -62,7 +62,7 @@ \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -132,7 +132,7 @@ $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -144,8 +144,8 @@ $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -157,7 +157,7 @@ $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -227,7 +227,7 @@ $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -239,8 +239,8 @@ $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -252,7 +252,7 @@ $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -322,7 +322,7 @@ $\pi \neq \frac{3}{14}$. \ExplSyntaxOn -\seq_map_inline:Nn \__g_tutodoc_focus_std_seq { +\seq_map_inline:Nn \g__tutodoc_focus_std_seq { \subsection*{tdoc#1} \myexrmktext @@ -334,8 +334,8 @@ $\pi \neq \frac{3}{14}$. \myexrmktext } -\ifcsundef{__g_tutodoc_focus_color_seq}{ - \prop_map_inline:Nn \__g_tutodoc_focus_color_prop { +\ifcsundef{g__tutodoc_focus_color_seq}{ + \prop_map_inline:Nn \g__tutodoc_focus_color_prop { \subsection*{tdoc#1} \myadmotext @@ -347,7 +347,7 @@ $\pi \neq \frac{3}{14}$. \myadmotext } } { - \seq_map_inline:Nn \__g_tutodoc_focus_color_seq { + \seq_map_inline:Nn \g__tutodoc_focus_color_seq { \subsection*{tdoc#1} \myadmotext @@ -406,7 +406,7 @@ Blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu, blu... \begin{filecontents*}[overwrite]{examples-version-n-change-user-choice-icon.tex} -\begin{tdoctopic}{À cacher}[\faEyeSlash] +\begin{tdoctopic}{À cacher}<\faEyeSlash> % Une icône venant de fontawesome5. \item Info 1... \item Info 2... @@ -446,6 +446,32 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... \end{filecontents*} +\begin{filecontents*}[overwrite]{examples-version-n-change-side-effect.tex} +\tdocversion[red]{1.2.3}[2024-10-29]% +\paragraph{Avant c'est problématique.} +Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla... + + +\paragraph{Après c'est mal placé.}% +\tdocversion[red]{1.2.3}[2024-10-29] + +Ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... + + +\paragraph{Pas de solution miracle.\tdocversion[red]{1.2.3}[2024-10-29]} + +Bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, +bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli, bli... + + +\paragraph{Gestion manuelle du problème.\tdocversion{1.2.3}[2024-10-29]<-.745cm>} + +Blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo, blo... +\end{filecontents*} + + \begin{filecontents*}[overwrite]{examples-version-n-change-first.tex} \tdocstartproj{Première version du projet.} \end{filecontents*} @@ -459,6 +485,27 @@ ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble, ble... \end{filecontents*} +\begin{filecontents*}[overwrite]{examples-version-n-change-what-n-when.tex} +\begin{tdoctech}[col = red, + date = 2024-10-29] + \item Info 1... + \item Info 2... +\end{tdoctech} + +\begin{tdocupdate}[col = ForestGreen, + version = 1.2.3] + \item Info 1... + \item Info 2... +\end{tdocupdate} + +\begin{tdoctopic}{À cacher}<\faEyeSlash>% + [version = 4.5.6, date = 2025-11-30] + \item Info 1... + \item Info 2... +\end{tdoctopic} +\end{filecontents*} + + \begin{filecontents*}[overwrite]{examples-version-n-change-break.tex} \begin{tdocbreak} \item Info 1... @@ -829,7 +876,7 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli... \title{La classe \texttt{tutodoc} - Documentation de type tutoriel} \author{Christophe, BAL} -\date{28 oct. 2024 - Version 1.6.1} +\date{30 oct. 2024 - Version 1.6.2} \maketitle @@ -855,7 +902,7 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli... {\small\itshape \vspace{-5pt} \begin{center} - \textbf{Abstract.} + \textbf{Abstract.} \end{center} The \thisproj{} class\,% @@ -881,9 +928,23 @@ Blablobli, blablobli, blablobli, blablobli, blablobli, blablobli... \small \begin{minipage}{.9\textwidth} \begin{tdocnote}[Derniers changements] -\begin{tdoctech} - \item Les règles de nommage de \ctan\ nécessitent l'usage de noms du type \verb+tutodoc-*.css.cls.sty+ pour les fichiers à-la \trademark{CSS}. -\end{tdoctech} +\begin{tdocnew} + \item Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} ont un nouvel argument final facultatif \tdocinlatex{<voffset>} pour choisir un décalage vertical spécifique. + + \item De meilleurs environnements pour indiquer les modifications apportées. + \begin{enumerate} + \item Les nouvelles clés facultatives \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent d'indiquer la date et la version d'une modification apportée à un sujet spécifique. + + \item Utilisation de \tdocmacro{paragraph} pour le titre. + \end{enumerate} +\end{tdocnew} + + +\begin{tdocupdate} + \item Changements : la police des notes de marge aura toujours une forme normale. + + \item Ornement : utilisation d'un \tdocinlatex{\cleaders} pour éviter les lignes orphelines en bas de page. +\end{tdocupdate} \end{tdocnote} \end{minipage} \end{center} @@ -1098,23 +1159,23 @@ Pour modifier la mise en forme générale, la classe \thisproj\ propose l'option % The gallery starts here... \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-bw} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-color} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-dark} \includepdf[ - pages=1-2, - fitpaper=true + pages=1-2, + fitpaper=true ]{gallery-showcase-draft} } @@ -1176,7 +1237,7 @@ Tout se passe via \tdocenv{tdocrem} avec un fonctionnement identique à l'enviro \label{tutodoc-admonitions} \begin{tdocnote} - La mise en forme proposée ici est celle par défaut, mais d'autres sont possible en changeant de thème : voir la galerie de cas d'utilisation dans l'annexe page \pageref{tutodoc-theme-gallery}. + La mise en forme proposée ici est celle par défaut, mais d'autres sont possible en changeant de thème : voir la galerie de cas d'utilisation dans l'annexe page \pageref{tutodoc-theme-gallery}. Quant aux icônes, elles sont obtenues via le package \tdocpack{fontawesome5}, et la macro \tdocmacro{tdocicon} gère l'espacement vis-à-vis du texte. \footnote{ Par exemple, @@ -1202,7 +1263,7 @@ L'environnement \tdocenv*{tdoctip} sert à donner des astuces. Voici comment l'e \begin{tdoctip} Quelque fois, un contenu mis en avant peut se réduire à une liste. Dans ce cas, la mise en forme peut être améliorée comme suit où nous utilisons l'option \tdocinlatex{wide} du package \tdocpack{enumitem}. - \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex} + \tdoclatexinput[sbs]{examples-admonitions-leavevmode-items.tex} \end{tdoctip} @@ -1634,6 +1695,7 @@ Afin de faciliter le suivi d'un projet, il est indispensable de fournir un histo \subsection{À quel moment ?} +\label{tutodoc-changes-when} On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas le numéro de version pourra éventuellement être daté. @@ -1663,7 +1725,7 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas \end{tdocimp} -\begin{tdocwarn} +\begin{tdoccaut} Seul l'emploi du format numérique \tdocinlatex+YYYY-MM-DD+ est vérifié, \footnote{ Techniquement, vérifier la validité d'une date, via \LaTeX3, ne présente pas de difficulté. @@ -1672,6 +1734,16 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas % \footnote{ % L'auteur de \thispack{} est entrain de mettre en place un ensemble d'outils permettant une telle semi-automatisation. % }. +\end{tdoccaut} + + +\begin{tdocwarn} + En coulisse, le gros du travail est fait par la macro \tdocmacro{\marginnote} du package éponyme. + Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} souffrent donc des même effets de bord comme dans l'exemple suivant. + On peut tout de même régler ces problèmes via un argument optionnel \tdocinlatex{<déplacement-vertical>} comme à la fin de l'exemple ci-après. C'est moche, mais fonctionnel. + + \tdoclatexshow[nostripe, colstripe=red]{examples-version-n-change-side-effect.tex} + \end{tdocwarn} @@ -1690,24 +1762,24 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas \foreach \exatitle/\filename in { {Juste pour la toute première version}/%<-- Translate me! - first, + first, {Pour les nouveautés}/% <-- Translate me! - new, + new, {Pour les mises à jour}/% <-- Translate me! - update, + update, {Pour les bifurcations}/% <-- Translate me! - break, + break, {Pour les problèmes}/% <-- Translate me! - pb, + pb, {Pour les réparations}/% <-- Translate me! - fix, + fix, {Informations techniques}/% <-- Translate me! - tech, + tech, % {Thématiques aux choix avec une icône}/%<-- Translate me! - user-choice-icon, + user-choice-icon, {Thématiques aux choix sans icône}/% <-- Translate me! - user-choice% + user-choice% } { \begin{tdocexa}[\exatitle] \leavevmode @@ -1718,7 +1790,19 @@ On peut au choix dater quelque chose, ou bien le versionner, dans ce second cas } -\section{Décorations} +\subsection{Le quoi et le quand} + +Les clés optionnelles \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent de dater et versionner un changement d'un type particulier.% +\footnote{ + L'avertissement à la fin de la section \ref{tutodoc-changes-when} donne la technique utilisée en coulisse, tout en montrant la nécessité de proposer des clés spécialisées. +} +Voici des exemples d'utilisation. + +\tdoclatexshow{examples-version-n-change-what-n-when.tex} + + + +\section{Décoration} Finissons cette documentation avec un petit outil de mise en forme qui rend de grands services. @@ -1764,7 +1848,7 @@ Ble, ble, ble... \end{tdoccaut} \begin{figure}[ht] - \centering + \centering \contribtranslatedirtree\ \caption{Vue simplifiée du dossier des traductions} \label{tutodoc-contrib-translate-dir} @@ -1887,9 +1971,31 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio \small -\tdocversion{1.6.1}[2024-10-28] +\begin{tdocnew}[version = 1.6.2, date = 2024-10-30] + \item Les macros \tdocmacro{tdocdate} et \tdocmacro{tdocversion} ont un nouvel argument final facultatif \tdocinlatex{<voffset>} pour choisir un décalage vertical spécifique. -\begin{tdoctech} + \item De meilleurs environnements pour indiquer les modifications apportées. + \begin{enumerate} + \item Les nouvelles clés facultatives \tdocinlatex{col}\,, \tdocinlatex{date} et \tdocinlatex{version} permettent d'indiquer la date et la version d'une modification apportée à un sujet spécifique. + + \item Utilisation de \tdocmacro{paragraph} pour le titre. + \end{enumerate} +\end{tdocnew} + + +\begin{tdocupdate} + \item Changements : la police des notes de marge aura toujours une forme normale. + + \item Ornement : utilisation d'un \tdocinlatex{\cleaders} pour éviter les lignes orphelines en bas de page. +\end{tdocupdate} + +\tdocsep + + +% ------------------ % + + +\begin{tdoctech}[version = 1.6.1, date = 2024-10-28] \item Les règles de nommage de \ctan\ nécessitent l'usage de noms du type \verb+tutodoc-*.css.cls.sty+ pour les fichiers à-la \trademark{CSS}. \end{tdoctech} @@ -1899,9 +2005,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.6.0}[2024-10-27] - -\begin{tdocbreak} +\begin{tdocbreak}[version = 1.6.0, date = 2024-10-27] \item L'environnement \tdocenv*{showcase} et ses descendants : la clé \tdocinlatex{color} a été renommée \tdocinlatex{colstripe}. \item La macro \tdocmacro{tdoclinkcolor} devient la couleur \tdocinlatex{tutodoc@link@color} destinée à un usage interne. @@ -1911,7 +2015,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio \begin{tdocnew} \item L'option de classe \tdocinlatex{theme} permet de choisir différents thèmes de mise en forme. - \item Journal des modifications : ajout de l'environnement \tdocenv*{tdoctech} pour les informations techniques. + \item Journal des modifications : ajout de l'environnement \tdocenv*{tdoctech} pour les informations techniques. \item L'environnement \tdocenv*{showcase} et ses descendants : la clé \tdocinlatex{coltext} permet de changer aussi la couleur du texte. @@ -1937,9 +2041,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.5.0}[2024-10-19] - -\begin{tdoctech} +\begin{tdoctech}[version = 1.5.0, date = 2024-10-19] \item La version 3 de \tdocpack{minted} est prise en compte. \end{tdoctech} @@ -1969,9 +2071,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.4.0}[2024-09-28] - -\begin{tdocbreak} +\begin{tdocbreak}[version = 1.4.0, date = 2024-09-28] \item L'environnement \tdocenv*{tdoccaution} a été renommé \tdocenv*{tdoccaut} pour une saisie simplifiée. \item Mise en avant de contenus : les exemples et remarques, indiqués via les environnements \tdocenv*{tdocexa} et \tdocenv*{tdocrem}, sont toujours numérotés via un compteur commun. @@ -2006,9 +2106,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.3.1}[2024-09-26] - -\begin{tdocnew} +\begin{tdocnew}[version = 1.3.1, date = 2024-09-26] \item Version étoilée de \tdocmacro{tdocenv} pour n'avoir que le nom de l'environnement. \end{tdocnew} @@ -2018,9 +2116,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.3.0}[2024-09-25] - -\begin{tdoctech} +\begin{tdoctech}[version = 1.3.0, date = 2024-09-25] \item La version 3 de \tdocpack{minted} ne peut pas être prise en compte pour le moment car elle comporte des bugs : voir \url{https://github.com/gpoore/minted/issues/401}. On force donc temporairement l'usage de la version 2 de \tdocpack{minted}. \end{tdoctech} @@ -2055,9 +2151,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.2.0-a}[2024-08-23] - -\begin{tdocupdate} +\begin{tdocupdate}[version = 1.2.0-a, date = 2024-08-23] \item \tdocmacro{tdocversion} \begin{enumerate} \item Le numéro de version est au-dessus de la date. @@ -2077,9 +2171,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.1.0}[2024-01-06] - -\begin{tdocnew} +\begin{tdocnew}[version = 1.1.0, date = 2024-01-06] \item Journal des changements : deux nouveaux environnements. \begin{enumerate} \item \tdocenv{tdocbreak} pour les \tdocquote{bifurcations}\,, soit les modifications non rétrocompatibles. @@ -2096,9 +2188,7 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio % ------------------ % -\tdocversion{1.0.1}[2023-12-08] - -\begin{tdocfix} +\begin{tdocfix}[version = 1.0.1, date = 2023-12-08] \item \tdocmacro{tdocenv}: l'espacement est maintenant correct, même si le paquet \tdocpack{babel} n'est pas chargé avec la langue française. \item \tdocenv[{[nostripe]}]{tdocshowcase}: les sauts de page autour des lignes \tdocquote{cadrantes} devraient être rares dorénavant. @@ -2111,7 +2201,6 @@ Ne pas passer via la branche \verb#main# qui sert à figer les dernières versio \tdocversion{1.0.0}[2023-11-29] - \tdocstartproj{Première version publique du projet.} \end{document} diff --git a/macros/latex/required/graphics/README.md b/macros/latex/required/graphics/README.md index bcab2e8f31..27ae99fe5a 100644 --- a/macros/latex/required/graphics/README.md +++ b/macros/latex/required/graphics/README.md @@ -1,7 +1,7 @@ The LaTeX `graphics` bundle =========================== -Release 2024-06-01 patch level 0 +Release 2024-11-01 Overview -------- diff --git a/macros/latex/required/graphics/changes.txt b/macros/latex/required/graphics/changes.txt index face90b342..d437358079 100644 --- a/macros/latex/required/graphics/changes.txt +++ b/macros/latex/required/graphics/changes.txt @@ -9,7 +9,16 @@ All changes above are only part of the development branch for the next release. ================================================================================ ######################### -# 2023-11-01 Release +# 2024-11-01 Release +######################### + +2024-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * color.dtx (section{Extra Groups}): + Support new @endpe mechanism + +######################### +# 2024-06-01 Release ######################### 2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org> diff --git a/macros/latex/required/graphics/color.dtx b/macros/latex/required/graphics/color.dtx index 130a960d09..b14c148f2f 100644 --- a/macros/latex/required/graphics/color.dtx +++ b/macros/latex/required/graphics/color.dtx @@ -21,7 +21,7 @@ %<driver> \ProvidesFile{color.drv} % \fi % \ProvidesFile{color.dtx} - [2024/01/14 v1.3d Standard LaTeX Color (DPC)] + [2024/06/23 v1.3e Standard LaTeX Color (DPC)] % % \iffalse %<*driver> @@ -877,10 +877,15 @@ % commands. The |\endgraf| in its definition is required in the case % of groups of text in vertical `par' mode, but doesn't do any harm in % horizontal `LR' contexts. +% The |\@endpefalse| is required for the newer \texttt{@endpe} +% handling, again it is harmless if an older kernel is used +% (because there it was a local assignment). % \changes{v0.2d}{1994/05/13} % {New definition, was previously just \cs{endgroup}} +% \changes{v1.3e}{2024/06/23} +% {Support new \texttt{@endpe} mechanism} % \begin{macrocode} -\def\color@endgroup{\endgraf\endgroup} +\def\color@endgroup{\endgraf\@endpefalse\endgroup} % \end{macrocode} % \end{macro} % diff --git a/macros/latex/required/graphics/color.pdf b/macros/latex/required/graphics/color.pdf Binary files differindex 8f4c2e2128..d67d0cff53 100644 --- a/macros/latex/required/graphics/color.pdf +++ b/macros/latex/required/graphics/color.pdf diff --git a/macros/latex/required/graphics/drivers.pdf b/macros/latex/required/graphics/drivers.pdf Binary files differindex d4f9e82581..44ad5cb376 100644 --- a/macros/latex/required/graphics/drivers.pdf +++ b/macros/latex/required/graphics/drivers.pdf diff --git a/macros/latex/required/graphics/epsfig.pdf b/macros/latex/required/graphics/epsfig.pdf Binary files differindex d37c0d912d..352c104fd0 100644 --- a/macros/latex/required/graphics/epsfig.pdf +++ b/macros/latex/required/graphics/epsfig.pdf diff --git a/macros/latex/required/graphics/graphics.dtx b/macros/latex/required/graphics/graphics.dtx index 2392ac09d1..86556ea40a 100644 --- a/macros/latex/required/graphics/graphics.dtx +++ b/macros/latex/required/graphics/graphics.dtx @@ -27,7 +27,7 @@ %<driver> \ProvidesFile{graphics.drv} % \fi % \ProvidesFile{graphics.dtx} - [2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)] + [2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)] % % \iffalse %<*driver> @@ -1050,7 +1050,8 @@ % % \begin{macrocode} \edef\Gin@gzext{\detokenize{gz}} -% \edef{macrocode} +% \end{macrocode} +% \end{macro} % \end{macro} % % \begin{macro}{\Gin@set@curr@file} diff --git a/macros/latex/required/graphics/graphics.pdf b/macros/latex/required/graphics/graphics.pdf Binary files differindex f7191c9f48..98722554e9 100644 --- a/macros/latex/required/graphics/graphics.pdf +++ b/macros/latex/required/graphics/graphics.pdf diff --git a/macros/latex/required/graphics/graphicx.pdf b/macros/latex/required/graphics/graphicx.pdf Binary files differindex f33d34a4bd..82c183bca7 100644 --- a/macros/latex/required/graphics/graphicx.pdf +++ b/macros/latex/required/graphics/graphicx.pdf diff --git a/macros/latex/required/graphics/grfguide.pdf b/macros/latex/required/graphics/grfguide.pdf Binary files differindex 8e0bc91ce7..d01c625f72 100644 --- a/macros/latex/required/graphics/grfguide.pdf +++ b/macros/latex/required/graphics/grfguide.pdf diff --git a/macros/latex/required/graphics/keyval.pdf b/macros/latex/required/graphics/keyval.pdf Binary files differindex a53bbf67a3..c2e2eeef47 100644 --- a/macros/latex/required/graphics/keyval.pdf +++ b/macros/latex/required/graphics/keyval.pdf diff --git a/macros/latex/required/graphics/lscape.pdf b/macros/latex/required/graphics/lscape.pdf Binary files differindex 465c1e5ea6..6f3e937971 100644 --- a/macros/latex/required/graphics/lscape.pdf +++ b/macros/latex/required/graphics/lscape.pdf diff --git a/macros/latex/required/graphics/mathcolor.pdf b/macros/latex/required/graphics/mathcolor.pdf Binary files differindex f88db97f8f..92ee1382e7 100644 --- a/macros/latex/required/graphics/mathcolor.pdf +++ b/macros/latex/required/graphics/mathcolor.pdf diff --git a/macros/latex/required/graphics/rotating.pdf b/macros/latex/required/graphics/rotating.pdf Binary files differindex 3acb6b72fc..3305acbe6e 100644 --- a/macros/latex/required/graphics/rotating.pdf +++ b/macros/latex/required/graphics/rotating.pdf diff --git a/macros/latex/required/graphics/rotex.pdf b/macros/latex/required/graphics/rotex.pdf Binary files differindex 8df385137b..bc01792df0 100644 --- a/macros/latex/required/graphics/rotex.pdf +++ b/macros/latex/required/graphics/rotex.pdf diff --git a/macros/latex/required/graphics/trig.pdf b/macros/latex/required/graphics/trig.pdf Binary files differindex b901f23572..7ab4d2e20f 100644 --- a/macros/latex/required/graphics/trig.pdf +++ b/macros/latex/required/graphics/trig.pdf diff --git a/macros/latex/required/tools/README.md b/macros/latex/required/tools/README.md index ca735824e0..21a3594585 100644 --- a/macros/latex/required/tools/README.md +++ b/macros/latex/required/tools/README.md @@ -1,7 +1,7 @@ The LaTeX `tools` bundle ======================== -Release 2024-06-01a +Release 2024-11-01 Overview -------- diff --git a/macros/latex/required/tools/afterpage.pdf b/macros/latex/required/tools/afterpage.pdf Binary files differindex 6f5022e586..25768e1c76 100644 --- a/macros/latex/required/tools/afterpage.pdf +++ b/macros/latex/required/tools/afterpage.pdf diff --git a/macros/latex/required/tools/array.dtx b/macros/latex/required/tools/array.dtx index b1dd336225..f4c8ab28d8 100644 --- a/macros/latex/required/tools/array.dtx +++ b/macros/latex/required/tools/array.dtx @@ -39,7 +39,7 @@ % \begin{macrocode} %<+package>\NeedsTeXFormat{LaTeX2e}[2024/06/01] %<+package>\ProvidesPackage{array} -%<+package> [2024/06/14 v2.6d Tabular extension package (FMi)] +%<+package> [2024/10/17 v2.6g Tabular extension package (FMi)] % % \fi % @@ -259,7 +259,7 @@ % \begin{table}[!t] % \begin{center} % \setlength{\extrarowheight}{1pt} -% \begin{tabular}{|>{\tt}c|m{9cm}|} +% \begin{tabular}{|>{\ttfamily}c|m{9cm}|} % \hline % \multicolumn{2}{|c|}{Unchanged options}\\ % \hline @@ -382,6 +382,20 @@ % \end{itemize} % % +% +% \subsection{A note on the allowed content of \texttt{>\{...\}} and +% \texttt{<\{...\}}} +% +% These specifiers are meant to hold declarations, such as +% \verb=>{\itshape}=. They cannot end in commands that take arguments +% without providing these arguments as part of the \verb={...}=. It +% would be a mistaken assumption that they pick up all or parts of the +% alignment entry data if their argument is not provided. E.g., +% \verb=>{\textbf}= would not make the whole column bold nor would it +% make the first character bold (technically it would try to +% bolden \cs{ignorespaces}). Thus, it would not fail with an error, +% but effectively the output would be wrong and not as expected. +% % \subsection{The behavior of the \texttt{\string\\} command} % % In the basic \texttt{tabular} implementation of \LaTeX{} the \cs{\bslash} @@ -464,16 +478,16 @@ % "\newcolumntype{L}{>{$}l<{$}}" \\ % "\newcolumntype{R}{>{$}r<{$}}" % \end{quote} -% Then we can use \texttt{C} to get centred LR-mode in an -% \texttt{array}, or centred math-mode in a \texttt{tabular}. +% Then we can use \texttt{C} to get centered LR-mode in an +% \texttt{array}, or centered math-mode in a \texttt{tabular}. % -% The example given above for `centred decimal points' could be +% The example given above for `center decimal points' could be % assigned to a \texttt{d} specifier with the following command. % \begin{quote} % "\newcolumntype{d}{>{\centerdots}c<{\endcenterdots}}" % \end{quote} % -% The above solution always centres the dot in the +% The above solution always centers the dot in the % column. This does not look too good if the column consists of large % numbers, but to only a few decimal places. An alternative definition % of a \texttt{d} column is @@ -715,7 +729,7 @@ % % A similar problem happened when "\extrarowheight" was used. For that % reason m-cells now manually position the cell content which -% allows to ignore this extra space request during the vertical aligment. +% allows to ignore this extra space request during the vertical alignment. % % % \subsection{Bugs and Features} @@ -734,7 +748,7 @@ % user the opportunity of overriding the settings of a % "\newcolumntype" defined using these declarations. For example, % suppose in an \texttt{array} environment we use a \texttt{C} -% column defined as above. The \texttt{C} specifies a centred text +% column defined as above. The \texttt{C} specifies a centered text % column, however ">{\bfseries}C", which re-writes to % ">{\bfseries}>{$}c<{$}" would not specify a bold column as might % be expected, as the preamble would essentially expand to @@ -896,14 +910,14 @@ Bug reports can be opened (category \texttt{#1}) at\\% % % \section{A note on the updates done December 2023} % -% We introduced support for tagged PDf and at the same time we added +% We introduced support for tagged PDF and at the same time we added % code to determine row and column numbers for each cell in % preparation for supporting formatting or type specifications for individual % cells (or group of cells) from the outside, e.g., \enquote{rows 1, % 2, and 10 are header rows} (syntax to be decided). % % This new code is already written with L3 programming layer conventions -% while most of the legay code is still as it was before. This make the code +% while most of the legacy code is still as it was before. This make the code % currently somewhat clattered, unfortunately. Eventually this will all move to L3 % programming layer but this will take time. % @@ -1345,7 +1359,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % of \textsf{token} register $15$ instead of $1$ later on. % % The example above referred to an older version of =\save@decl= which -% inserted a =\relex= inside the token register. This is now moved to +% inserted a =\relax= inside the token register. This is now moved to % the places where the actual token registers are inserted (look for % =\the@toks=) because the old version would still make =@= % expressions to moving arguments since after expanding the second @@ -1373,6 +1387,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \begin{macro}{\insert@column} % \begin{macro}{\@sharp} % \begin{macro}{\textonly@unskip} +% \begin{macro}{\@protected@firstofone} % We now define the macro =\insert@column= which will do % this work for us. % \begin{macrocode} @@ -1385,10 +1400,116 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \begin{macrocode} \UseTaggingSocket{tbl/cell/begin}% % \end{macrocode} -% Here, we assume that the \textsf{count} register +% Next we have to insert the toks register holding the content of +% \verb=>{...}=. Here, we assume that the \textsf{count} register % =\@tempcnta= has saved the value $=\count@= - 1$. +% +% To keep \TeX{} happy if there is a look ahead in the tabular +% preamble, i.e., starting in \verb=>{...}=, which uses the +% Appendix~D trick (for example, anything with a trailing optional +% argument defined by \pkg{ltcmd}), we wrap everything here in a +% protected version of \cs{@firstofone}. \TeX{} otherwise can get +% confused about the value of the master counter, and we get some +% strange errors. We suspected that there was an underlying issue +% is the \TeX{} engine, but it turned out to be rather hard to get +% to the bottom of it, because the master counter is not accessible +% through \TeX{}'s tracing tools. Thus, all we could do was +% producing various example documents, observing results, as well +% as staring at a printout of the \TeX{} program. As an example, +% without this approach, something like +% \begin{verbatim} +% \NewDocumentCommand\foo{o}{x} +% \begin{tabular}{>{\foo}l} +% Foo +% \end{tabular} +% \end{verbatim} +% failed. That can be fixed by adding a \cs{relax} after the +% \cs{@tempcnta}, but that then leads to issues if you are +% collecting whole cells (tagging code or \pkg{collcell}), where +% you can no longer alter the meaning of \cs{cr} as the master +% counter goes wrong due to an obscure bug (or perhaps, say, an +% undocumented feature of \TeX{}). Eventually, we were able to pin +% down the root cause and really understand why +% \cs{@protected@firstofone} solves the problem, even though it +% looks like a nonsense addition to the code that does nothing +% useful.\footnote{So it is a \TeX{} engine bug that was in there +% from day one, or if you like, it is a hidden feature that is not +% explained; neither in the \TeX{}book nor in the program code. We +% don't really expect this to change in \TeX{} after such a long +% time, other than perhaps documenting it as a feature, so this is +% a proper solution to the problem and not just a workaround.} +% +% The problem is that \TeX{} tries to conserve stack space, and +% when the last token of an existing token list is a macro, then +% this token list is \emph{first} removed from memory (reducing the +% stack) \emph{before} the macro replacement text (as a new +% token list) is given to the parser adding a new stack level. This +% is done using the routine \texttt{end\_token\_list} in the \TeX{} +% program and ending the u-part of an \cs{halign} column with this +% routine immediately sets the \emph{master counter} used by alignments to +% zero (see chapter~22 and Appendix~D of the \TeX{}book). This +% means that technically the expansion of the last token in the u-part (if it +% is a macro) is not executed in the context of the u-part, but in +% the context of the alignment entry in the document. That normally +% doesn't make any difference whatsoever --- unless you play +% around (as we sometimes have to) with tricks like those from +% Appendix~D. +% +% To illustrate the issue we show a bit of strange low-level plain +% \TeX{} code.\footnote{If all of this looks mighty strange to you, +% don't worry. You will be unlikely to need to know about it. It is +% just there so that programmers at some point in the future do not +% have to wonder too much why there is this odd +% \cs{@protected@firstofone} that apparently does nothing +% useful. It took us several nights of head scratching to come up +% with these minimal examples and then some more time to understand +% what the heck is going on inside \TeX{}---thanks to Bruno for the +% right ideas on the latter.} Below are two very special grouping +% commands that are like \cs{bgroup} and \cs{egroup} but also +% affect the alignment master counter when expanded (see +% \TeX{}book p.385). If one of them is used as the +% last macro in the u-part of a column, then you get strange errors +% that you shouldn't get. +% \begin{verbatim} +% \def\bbgroup{{\ifnum0=`}\fi} +% \def\eegroup{\ifnum0=`{\fi}} +% +% % Fails with an error message, but there should be none: +% \halign{% +% \message{u-part^^J}% +% \bbgroup % <-- in the u-part +% \eegroup % <-- in the u-part +% #% +% \message{v-part^^J}% +% \hfill\cr +% \message{body^^J}x +% \cr +% } +% +% % Fails but should work, the v-part is never reached: +% \halign{% +% \message{u-part^^J}% +% \bbgroup % <-- in the u-part +% #% +% \message{v-part^^JJ}% +% \eegroup % <-- in the v-part +% \hfill\cr +% \message{body^^J}x +% \cr +% } +% \end{verbatim} +% +% So the trick we use now is making \cs{@protected@firstofone} the +% last macro in the u-part, i.e., before the \cs{@sharp}. That way +% its argument is always fully expanded as part of the alignment +% entry and not as part of the u-part and this way we know exactly +% what the master counter value is at this point, regardless of the content of +% \verb=>{...}=. +% +% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)} +% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)} % \begin{macrocode} - \the@toks \the \@tempcnta + \@protected@firstofone { \the@toks \the \@tempcnta \ignorespaces } % \end{macrocode} % Next follows the =#= sign which specifies the place % where the text of the column shall be inserted. To avoid @@ -1396,14 +1517,16 @@ Bug reports can be opened (category \texttt{#1}) at\\% % =\@addtopreamble= we hide this sign in the command % =\@sharp= which is temporarily occupied with % =\relax= during the build-up of the preamble. -% To remove unwanted spaces before and after the column text, we set -% an =\ignorespaces= in front and a =\unskip= afterwards. +% To remove unwanted spaces before and after the column in text mode, +% we set an =\ignorespaces= in front (see above) and a =\unskip= +% afterwards; in math mode, the latter is suppressed while the +% \cs{ignorespaces} makes no difference. % \changes{v2.0e}{1991/02/07}{Added \{\} around \cs{@sharp} for new ftsel} -% \changes{v2.0h}{1992/06/22}{Removed \{\} again in favour of +% \changes{v2.0h}{1992/06/22}{Removed \{\} again in favor of % \cs{d@llarbegin}} % \changes{v2.6b}{2024/04/08}{Do not \cs{unskip} if in math mode (gh/1323)} % \begin{macrocode} - \ignorespaces \@sharp \textonly@unskip + \@sharp \textonly@unskip % \end{macrocode} % Then the second \textsf{token} register follows whose number should % be saved in =\count@=. @@ -1428,10 +1551,15 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \begin{macrocode} \protected\def\textonly@unskip{\ifhmode\unskip\fi} % \end{macrocode} +% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)} +% We need an engine-protected function that is just \cs{@firstofone}: +% \begin{macrocode} +\protected\long\def\@protected@firstofone#1{#1} +% \end{macrocode} +% \end{macro} % \end{macro} % \end{macro} % \end{macro} -% % % \begin{macro}{\insert@pcolumn} % Handling pcolumn-cells needs slightly different handling when @@ -1442,7 +1570,10 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \begin{macrocode} \def\insert@pcolumn{% \UseTaggingSocket{tbl/pcell/begin}% - \the@toks \the \@tempcnta +% \end{macrocode} +% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)} +% \begin{macrocode} + \the@toks \the \@tempcnta \relax \ignorespaces \@sharp \unskip \the@toks \the \count@ \relax \UseTaggingSocket{tbl/pcell/end}% @@ -1882,7 +2013,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % For that reason the new implementation does the centering % manually: First we check the height of the cell and if that is % less or equal to =\ht\strutbox= we assume that this is a -% single line cell. In that case we don't do any vertical maneuvre +% single line cell. In that case we don't do any vertical maneuver % and simply output the box, i.e., make it behave like a single % line p-cell. % @@ -1900,7 +2031,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % is how much do we need to move down? If there is any % =\arraystretch= in place then the first line will have some % unusual height and we don't want to consider that when finding -% the middle point. So we substract from the cell height the height +% the middle point. So we subtract from the cell height the height % of that strut. But of course we want to include the normal height % of the first line (which would be something like =\ht\strutbox=) % so we need to add that. On the other hand, when centering around @@ -2325,7 +2456,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% \lineskip \z@ \baselineskip \z@ % \end{macrocode} -% Don't use \cs{m@th} here as that signals to the math taggingg +% Don't use \cs{m@th} here as that signals to the math tagging % code that this is fake math that should not be tagged. % \changes{v2.6a}{2023/12/11}{Support for tagged PDF} % \begin{macrocode} @@ -2451,7 +2582,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % % We then start a special brace which I have directly % copied from the original definition. It is -% necessary, because the =\futurlet= in =\@ifnextchar= +% necessary, because the =\futurelet= in =\@ifnextchar= % might % expand a following =&= \textsf{token} in a construction like % =\\ &=. This would otherwise end the alignment template at a @@ -2464,7 +2595,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % that a =&= will not be considered belonging to the current % =\halign= while we are looking for a =*= or =[=. % For further information see -% \cite[Appendix D]{bk:knuth}. +% \cite[Appendix~D]{bk:knuth}. % \begin{macrocode} \iffalse{\fi\ifnum 0=`}\fi % \end{macrocode} @@ -2649,14 +2780,14 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \section{The Environment Definitions} % % After these preparations we are able to define the environments. They -% only differ in the initialisations of =\d@llar...=, =\col@sep= +% only differ in the initializations of =\d@llar...=, =\col@sep= % and =\@halignto=. % % \begin{macro}{\@halignto} % \begin{macro}{\d@llarbegin} % \begin{macro}{\d@llarend} % =\d@llar= has to be -% locally asigned since otherwise nested \textsf{tabular} and \textsf{array} +% locally assigned since otherwise nested \textsf{tabular} and \textsf{array} % environments (via =\multicolumn=) are impossible. % For 25 years or so =\@halignto= was set globally (to save space on the % save stack, but that was a mistake: if there is a tabular in the @@ -2664,7 +2795,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % able overwrite the =\@halignto= % setting of a tabular in the main text resulting in a very weird error. % \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)} -% \changes{v2.0g}{1992/06/18}{`d@llarbegin defined on toplevel.} +% \changes{v2.0g}{1992/06/18}{`d@llarbegin defined on top-level.} % When the new font selection scheme is in force we have to % we surround all =\halign= entries % with braces. See remarks in TUGboat 10\#2. Actually we are going @@ -2714,7 +2845,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \begin{macro}{\tabular} % \begin{macro}{\tabular*} % The environments \textsf{tabular} and \textsf{tabular$*$} differ -% only in the initialisation of the command =\@halignto=. Therefore +% only in the initialization of the command =\@halignto=. Therefore % we define % \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)} % \begin{macrocode} @@ -2996,7 +3127,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % rewrites (in the token register "\NC@list") will look like % "\NC@do *" "\NC@do C" "\NC@do L". % So we need to define "\NC@do" as a one argument macro which -% initialises the rewriting of the specified column. Let us assume that +% initializes the rewriting of the specified column. Let us assume that % `C' is the argument. % \begin{macrocode} \def\NC@do#1{% @@ -3064,7 +3195,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \end{macro} % % \subsection{The $*$--form} -% We view the $*$-form as a slight generalisation of the system +% We view the $*$-form as a slight generalization of the system % described in the previous subsection. The idea is to define a $*$ % column by a command of the form: % \begin{verbatim} @@ -3440,7 +3571,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \subsection{Implementing column types \texttt{w} and \texttt{W}} % % In TugBoat 38/2 an extension was presented that implemented two -% aditional column types \texttt{w} and \texttt{W}. These have now +% additional column types \texttt{w} and \texttt{W}. These have now % been added to the package itself. % % @@ -3502,7 +3633,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % the cell content is too wide. % \changes{v2.4f}{2017/11/07}{Column type added} % \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so -% that cell is typeset in mathmode inside \texttt{array} (gh/297)} +% that cell is typeset in math mode inside \texttt{array} (gh/297)} % \begin{macrocode} \newcolumntype{W}[2] {>{\begin{lrbox}\ar@cellbox\d@llarbegin}% @@ -3517,7 +3648,46 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \end{macro} % % +% \subsection{Handling \cs{cline}} % +% In the past \pkg{array} did not have to concern itself with +% \cs{cline} but simply used the definition already provided in the +% kernel. However, for tagged PDF output this definition is +% insufficient, because it causes incorrect row counting and the rules +% it generates would need to be marked as artifacts. +% We therefore update it here. +% +% +% \begin{macro}{\@cline} +% Tagging support for \cs{cline} +% \changes{v2.6e}{2024/07/13}{Support for tagging \cs{cline} (tagging/134)} +% \begin{macrocode} +\ExplSyntaxOn +\def\@cline#1-#2\@nil{ + \omit + \@multicnt#1 + \advance\@multispan\m@ne + \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi + \@multicnt#2 + \advance\@multicnt-#1 + \advance\@multispan\@ne +% \end{macrocode} +% The rule needs artifact tagging in tagged PDF. +% \begin{macrocode} + \UseTaggingSocket{tbl/leaders/begin} + \leaders\hrule\@height\arrayrulewidth\hfill + \UseTaggingSocket{tbl/leaders/end} +% \end{macrocode} +% To the row counting the above appears like an extra row, so we +% have to correct the count. +% \begin{macrocode} + \tbl_gdecr_row_count: + \cr + \noalign{\vskip-\arrayrulewidth} +} +\ExplSyntaxOff +% \end{macrocode} +% \end{macro} % % % \begin{macrocode} diff --git a/macros/latex/required/tools/array.pdf b/macros/latex/required/tools/array.pdf Binary files differindex 1dbefd1b52..9085b9a982 100644 --- a/macros/latex/required/tools/array.pdf +++ b/macros/latex/required/tools/array.pdf diff --git a/macros/latex/required/tools/bm.pdf b/macros/latex/required/tools/bm.pdf Binary files differindex 901cc7b7ab..dab3f41a33 100644 --- a/macros/latex/required/tools/bm.pdf +++ b/macros/latex/required/tools/bm.pdf diff --git a/macros/latex/required/tools/calc.pdf b/macros/latex/required/tools/calc.pdf Binary files differindex 31a94ddcf7..b27aed4f0e 100644 --- a/macros/latex/required/tools/calc.pdf +++ b/macros/latex/required/tools/calc.pdf diff --git a/macros/latex/required/tools/changes.txt b/macros/latex/required/tools/changes.txt index b61f939445..9a3c944b20 100644 --- a/macros/latex/required/tools/changes.txt +++ b/macros/latex/required/tools/changes.txt @@ -9,6 +9,67 @@ are not part of the distribution. All changes above are only part of the development branch for the next release. ================================================================================ +######################### +# 2024-11-01 Release +######################### + +2024-10-30 David Carlisle <David.Carlisle@latex-project.org> + + * amsmath.dtx: Guard the \protect tests from primitive if tokens + in the definition (gh/1448) + +2024-10-27 David Carlisle <David.Carlisle@latex-project.org> + + * longtable.dtx Guard against increasing \pagegoal past \maxdimen (gh/1495) + + +2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org> + + * array.dtx (section{The insertion of declarations ...}): + Further work on handling optional arguments in the argument + of >{...} to work around a master counter oddity (gh/1468) + +2024-09-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * array.dtx (section{The insertion of declarations ...}): + Stop parsing too far for an optional argument if >{...} ends in a command + with a trailing optional arg (gh/1468) + +2024-09-17 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * multicol.dtx: add tagging support (tagging/705) + +2024-09-12 David Carlisle <David.Carlisle@latex-project.org> + + * build.lua, tools.ins: + Modify fileerr extraction to write rename-to-empty-base.tex rather than .tex + to comply with expected security change in texlive 2025 + build.lua modified to rename rename-to-empty-base.tex to .tex after unpacking. + +2024-08-13 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + + * longtable.dtx: + store row number of head also if it ends with a \cr + (tagging-project-gh/554). + +2024-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * array.dtx (subsection{Handling \cs{cline}}): + Support for tagging \cline (tagging/134) + +2024-07-04 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + + * longtable.dtx: + Added \LTcaptype (from package ltcaption) to support other types + beside table and to support unnumbered longtables (gh/1377). + + +2024-06-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * multicol.dtx: + Update documentation to reflect that \sloppy isn't using + \tolerance=10000 any longer (it did in the early days of LaTeX) + (gh/1385) + 2024-06-14 David Carlisle <David.Carlisle@latex-project.org> * array.dtx move \ExplSyntaxOff earlier so error message spaces preserved gh/1378 diff --git a/macros/latex/required/tools/dcolumn.pdf b/macros/latex/required/tools/dcolumn.pdf Binary files differindex 341d57b5af..51d55f2083 100644 --- a/macros/latex/required/tools/dcolumn.pdf +++ b/macros/latex/required/tools/dcolumn.pdf diff --git a/macros/latex/required/tools/delarray.pdf b/macros/latex/required/tools/delarray.pdf Binary files differindex 800d3289bb..0f6e6b4a62 100644 --- a/macros/latex/required/tools/delarray.pdf +++ b/macros/latex/required/tools/delarray.pdf diff --git a/macros/latex/required/tools/enumerate.pdf b/macros/latex/required/tools/enumerate.pdf Binary files differindex db34e7b7bb..4da735348b 100644 --- a/macros/latex/required/tools/enumerate.pdf +++ b/macros/latex/required/tools/enumerate.pdf diff --git a/macros/latex/required/tools/fileerr.pdf b/macros/latex/required/tools/fileerr.pdf Binary files differindex 6fc6ce3a27..8bc6d1b386 100644 --- a/macros/latex/required/tools/fileerr.pdf +++ b/macros/latex/required/tools/fileerr.pdf diff --git a/macros/latex/required/tools/fontsmpl.pdf b/macros/latex/required/tools/fontsmpl.pdf Binary files differindex 0e001b9309..fa447ded99 100644 --- a/macros/latex/required/tools/fontsmpl.pdf +++ b/macros/latex/required/tools/fontsmpl.pdf diff --git a/macros/latex/required/tools/ftnright.pdf b/macros/latex/required/tools/ftnright.pdf Binary files differindex 5b92d84459..2f20227e33 100644 --- a/macros/latex/required/tools/ftnright.pdf +++ b/macros/latex/required/tools/ftnright.pdf diff --git a/macros/latex/required/tools/hhline.pdf b/macros/latex/required/tools/hhline.pdf Binary files differindex 805d96d267..7217208cb6 100644 --- a/macros/latex/required/tools/hhline.pdf +++ b/macros/latex/required/tools/hhline.pdf diff --git a/macros/latex/required/tools/indentfirst.pdf b/macros/latex/required/tools/indentfirst.pdf Binary files differindex 7f7383c969..438e2155ba 100644 --- a/macros/latex/required/tools/indentfirst.pdf +++ b/macros/latex/required/tools/indentfirst.pdf diff --git a/macros/latex/required/tools/l3sys-query.pdf b/macros/latex/required/tools/l3sys-query.pdf Binary files differindex c07b8955aa..103a058be7 100644 --- a/macros/latex/required/tools/l3sys-query.pdf +++ b/macros/latex/required/tools/l3sys-query.pdf diff --git a/macros/latex/required/tools/layout.pdf b/macros/latex/required/tools/layout.pdf Binary files differindex e5cf32690c..e2fffa0159 100644 --- a/macros/latex/required/tools/layout.pdf +++ b/macros/latex/required/tools/layout.pdf diff --git a/macros/latex/required/tools/longtable.dtx b/macros/latex/required/tools/longtable.dtx index cc3a939e7a..061d7b5610 100644 --- a/macros/latex/required/tools/longtable.dtx +++ b/macros/latex/required/tools/longtable.dtx @@ -28,7 +28,7 @@ %</dtx> %<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01] %<package> -% Try the 2020 version for any rollback before that date: +% Try the 2020 version for any rollback before that date: %<package>\DeclareRelease{}{1994-06-01}{longtable-2020-01-07.sty} %<package> %<package>\DeclareRelease{v4.13}{2020-01-02}{longtable-2020-01-07.sty} @@ -38,7 +38,7 @@ %<driver> \ProvidesFile{longtable.drv} % \fi % \ProvidesFile{longtable.dtx} - [2024-04-26 v4.20 Multi-page Table package (DPC)] + [2024-10-27 v4.22 Multi-page Table package (DPC)] % % \iffalse %<*driver> @@ -179,7 +179,7 @@ % \env{longtable}, which has most of the features of the \env{tabular} % environment, but produces tables which may be broken by \TeX's % standard page-breaking algorithm. It also shares some features with -% the \env{table} environment. In particular it uses the same counter, +% the \env{table} environment. In particular it uses by default the same counter, % \texttt{table}, and has a similar "\caption" command. Also, the % standard "\listoftables" command lists tables produced by either the % \env{table} or \env{longtable} environments. @@ -335,6 +335,29 @@ % \caption{A floating table} % \end{table} % +% \section{Counter and Caption Types} +% +% As mentioned in the introduction \env{longtable} uses and updates by default +% the \texttt{table} counter, the "\caption" command creates a table caption +% which is added to the list of tables. +% Packages like \pkg{ltcaption} added more flexibility here by adding the +% command "\LTcaptype" which allowed to change the type, e.g. to a listing. +% Starting with version 4.21 \pkg{longtable} supports this command directly. +% \DescribeMacro{\LTcaptype}% +% By redefining this command it is possible to change the counter and caption type. +% After "\renewcommand\LTcaptype{"\meta{counter}"}" \env{longtable} will update +% the counter \meta{counter}, use "\fnum@"\meta{counter} in the caption (which +% typically will make use of "\"\meta{counter}"name" and "\the"\meta{counter}), and +% write content line entries into the file with the extension stored in the +% command "\ext@"\meta{counter}. When \pkg{hyperref} is loaded the name of +% the anchor will use \meta{counter} too. Packages or documents that change +% "\LTcaptype" to some nonstandard value must ensure that the counter +% \meta{counter} and the commands "\fnum@"\meta{counter} +% and "\ext@"\meta{counter} exist and do not error. +% If "\LTcaptype" is empty no counter is advanced and "\"\meta{counter}"name" in +% the caption is suppressed. +% +% % \section{Captions and Headings} % % At the start of the table one may specify lines which are to appear at @@ -907,6 +930,15 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\LTcaptype} +% The name used as counter, in caption, "\addcontentsline" and in targets. +% "\providecommand" is used for compability with \pkg{ltcaption} +% \changes{v4.21}{2024/07/04} +% {Added \cs{LTcaptype} to support other types beside table.} +% \begin{macrocode} +\providecommand\LTcaptype{table} +% \end{macrocode} +% \end{macro} % \subsection{Internal Parameters} % % \begin{macro}{\LT@head} @@ -957,8 +989,11 @@ % are preserved correctly when "\includeonly" is used. In the rest of % the file "\LT@tables" has been replaced by "\c@LT@tables" without % further comment. +% \changes{v4.21}{2024/07/04} +% {Provide a \cs{theH}-representation for targets.} % \begin{macrocode} \newcounter{LT@tables} +\providecommand\theHLT@tables{\theLT@tables} % \end{macrocode} % \end{macro} % @@ -1050,12 +1085,12 @@ \LT@err{longtable not in 1-column mode}\@ehc \fi % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/vmode/begin}% % \end{macrocode} -% +% % \begin{macrocode} \begingroup % \end{macrocode} @@ -1080,6 +1115,9 @@ % Since Version 3.02, \package{longtable} has used the internal counter % "\c@LT@tables". The \LaTeX\ counter "table" is still incremented % so that "\caption" works correctly. +% \changes{v4.21}{2024/07/04} +% {Use \cs{LTcaptype} instead of \texttt{table} in various places +% to support other types beside table.} % \begin{macrocode} \def\LT@array[#1]#2{% % \end{macrocode} @@ -1097,25 +1135,31 @@ % TODO: When a line is killed the structure subtree is there already % too and must be removed. If hard to do, then maybe at first warn if the % construction is used. -% +% % \cs{LT@array} is executed in a group, so we can disable para-tagging here. % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/init} - \@kernel@refstepcounter{table}\stepcounter{LT@tables} + \tl_if_empty:eTF { \LTcaptype } + { + \tl_gset:Ne \@currentHref {LT@tables.\theHLT@tables} + } + { + \@kernel@refstepcounter{\LTcaptype}\stepcounter{LT@tables} % \end{macrocode} -% The target is created rather late and a \cs{label} can come earlier, +% The target is created rather late and a \cs{label} can come earlier, % so we have to define \cs{@currentHref} explicitly. We can't currently % assume that \cs{theHtable} is defined always. % \begin{macrocode} - \tl_gset:Ne \@currentHref {table.\cs_if_exist_use:N\theHtable} + \tl_gset:Ne \@currentHref {\LTcaptype.\cs_if_exist_use:c {theH\LTcaptype}} + } % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Managing cell indexes} % \begin{macrocode} \tbl_gzero_row_count: % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/longtable/init} @@ -1225,7 +1269,7 @@ \begingroup \@mkpream{#2}% % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Managing cell indexes} % \begin{macrocode} \tbl_count_table_cols: @@ -1271,12 +1315,12 @@ \tabskip\z@ \@arstrut % \end{macrocode} % Insert the tagging socket to start the row and initialize the cell -% data for the row. +% data for the row. % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/row/begin}% % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Managing cell indexes} % \begin{macrocode} \tbl_init_cell_data_for_row: @@ -1314,7 +1358,7 @@ column:~ \the\g_@@_col_int } % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \tbl_if_row_was_started:T @@ -1399,7 +1443,7 @@ % We also have to make sure that this breakpoint doesn't affect how the next % page is broken, so we make the penalty 9999 (10000 is infinite and thus not % a legal breakpoint) and cancel out the "\kern" with a new "\kern". -% +% % I don't think this is the \emph{right} solution to the problem (that would be % that the standard output routine has a feature for syncronizing with % typesetting, as part of the preparations for switching output routine), but @@ -1476,9 +1520,17 @@ \maxdepth\z@ \fi % \end{macrocode} -% +% \changes{v4.21}{2024/07/04} +% {Use \cs{LTcaptype} to support other types beside table and handle +% the case if it is empty.} % \begin{macrocode} - \MakeLinkTarget{table} + \tl_if_empty:eTF{\LTcaptype} + { + \MakeLinkTarget{LT@tables} + } + { + \MakeLinkTarget{\LTcaptype} + } % \end{macrocode} % Put the table head on the page, and then switch to the new output % routine. @@ -1487,12 +1539,12 @@ % \begin{macrocode} \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/longtable/head} % \end{macrocode} -% +% % \begin{macrocode} \output{\LT@output}} \ExplSyntaxOff @@ -1524,18 +1576,18 @@ % \begin{macrocode} \tbl_crcr:n {endlongtable} % \end{macrocode} -% +% % \changes{v4.01}{1996/04/11} % {(DPC) use \cs{noalign} to sneak in \cs{LT@entry@chop}} % \begin{macrocode} \noalign{% % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/longtable/finalize} % \end{macrocode} -% +% % \begin{macrocode} \let\LT@entry\LT@entry@chop \xdef\LT@save@row{\LT@save@row}}% @@ -1579,19 +1631,28 @@ \ifx\LT@save@row\LT@@@@save@row \else \LT@warn{Column~ widths~ have~ changed\MessageBreak - in~ table~ \thetable}% + in~ + \tl_if_empty:eTF{\LTcaptype} + {longtable~ \theLT@tables} + {\LTcaptype\c_space_tl\use:c{the\LTcaptype}} + } \LT@final@warn \fi % \end{macrocode} -% Force one more go with the \env{longtable} output routine. +% Force one more go with the \env{longtable} output routine. +% Guard the special start of page value of "\pagegoal". % \changes{v4.14}{2020/02/07} % {Rearrange vertical space tests for tools/3512 (floats on same page)} +% \changes{v4.22}{2024/10/27} +% {Keep \cs{pagegoal} below \cs{maxdimen} gh1495} % \begin{macrocode} \endgraf\penalty -\LT@end@pen \ifvoid\LT@foot\else \global\advance\vsize\ht\LT@foot \global\advance\@colroom\ht\LT@foot - \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@ + \ifdim\pagegoal<\maxdimen + \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@ + \fi \fi % \end{macrocode} % Now close the group to return to the standard routine. @@ -1613,7 +1674,7 @@ % \begin{macrocode} \ifvoid\footins\else\insert\footins{}\fi % \end{macrocode} -% +% % \changes{v4.19}{2023/12/16}{Support for tagged PDF} % \begin{macrocode} \UseTaggingSocket{tbl/vmode/end}% @@ -2161,7 +2222,6 @@ \tbl_gdecr_row_count: \penalty\@M} \@gtempa} -\ExplSyntaxOff %<@@=> % \end{macrocode} % \end{macro} @@ -2187,14 +2247,22 @@ % {Add new control argument} % \changes{v4.16}{2021/05/07} % {use \cs{ext@table} gh/561} -% \begin{macrocode} -\def\LT@c@ption#1[#2]#3{% - \LT@makecaption#1\fnum@table{#3}% - \def\@tempa{#2}% - \ifx\@tempa\@empty\else - {\let\\\space - \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{#2}}}% - \fi} +% \changes{v4.21}{2024/07/04} +% {Use \cs{LTcaptype} to support other types beside table.} +% \begin{macrocode} +\def\LT@c@ption#1[#2]#3{ + \tl_if_empty:eTF{\LTcaptype} + {\LT@makecaption\@gobble{}{#3}} + {\LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3} + \def\@tempa{#2} + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline + {\@nameuse{ext@\LTcaptype}} + {\LTcaptype} + {\protect\numberline{\@nameuse{the\LTcaptype}}{#2}}} + \fi}} +\ExplSyntaxOff % \end{macrocode} % \end{macro} % @@ -2375,7 +2443,7 @@ \ExplSyntaxOn \def\LT@end@hd@ft#1{% % \end{macrocode} -% +% % This command is used to store the head and foot boxes. % We need to retrieve and store the row so that we can clean % up the structure in the finalize code. @@ -2388,7 +2456,7 @@ % \end{macrocode} % TODO: This is exposing internal counters, so it should be encapsulated % in some interface command (but I'm not sure what that should be -% called, so not done yet. +% called, so not done yet. % \changes{v4.19}{2023/12/16}{Managing cell indexes} % \begin{macrocode} \tbl_count_missing_cells:n {head/foot} @@ -2413,19 +2481,28 @@ % To get out of this trap we run \cs{crcr} (which would normally % come inside \cs{LT@echunk}. That will then trigger \cs{everycr} % and update row counter unnecessarily, but now we have a defined state, so -% we can use \cs{noalign} to undo that. +% we can use \cs{noalign} to undo that. % We also change \cs{LT@rows} so that further \cs{cr}s do not do % any harm (as explained above. % % The \cs{crcr} inside \cs{LT@echunk} will be bypassed in that case % as we have just executed a \cs{crcr} and are still in scanning modus for -% \cs{omit} or \cs{noalign}. +% \cs{omit} or \cs{noalign}. % \begin{macrocode} { \crcr \noalign{ % \end{macrocode} -% +% \changes{v4.22}{2024/08/13}{Store header row numbers} +% \begin{macrocode} + \int_step_inline:nn + { \LT@rows } + { + \seq_gput_left:ce + {g_@@_\cs_to_str:N #1 _rows_seq } + { \int_eval:n {\g_@@_row_int - ##1 } } + } +% \end{macrocode} % \changes{v4.19}{2023/12/16}{Managing cell indexes} % \begin{macrocode} \tbl_gdecr_row_count: % undo the increment @@ -2442,7 +2519,7 @@ {Increase~ LTchunksize}% \fi \setbox#1\box\z@ - \@@_trace:n {-->>~ Saving~\noexpand#1} + \@@_trace:n {-->>~ Saving~\noexpand#1} \LT@get@widths \LT@bchunk} % \end{macrocode} @@ -2501,7 +2578,7 @@ \bgroup % \end{macrocode} % \changes{v4.12}{2019/02/06}{Color group to match array package} -% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}% +% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128} % \begin{macrocode} \color@begingroup \let\@footnotetext\LT@p@ftntext @@ -2509,7 +2586,7 @@ \@arrayparboxrestore \everypar{% \vrule \@height \ht\@arstrutbox \@width \z@ - \everypar{}}% + \everypar{}}% } % \end{macrocode} % \end{macro} diff --git a/macros/latex/required/tools/longtable.pdf b/macros/latex/required/tools/longtable.pdf Binary files differindex 2bd06f4562..bd4cf6b680 100644 --- a/macros/latex/required/tools/longtable.pdf +++ b/macros/latex/required/tools/longtable.pdf diff --git a/macros/latex/required/tools/manifest.txt b/macros/latex/required/tools/manifest.txt index 004245d1d5..c07b6cd831 100644 --- a/macros/latex/required/tools/manifest.txt +++ b/macros/latex/required/tools/manifest.txt @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2021 +% Copyright (C) 1993-2024 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -49,7 +49,7 @@ bm.dtx Access bold math symbols. calc.dtx - Infix arithmetic expresions. Contributed to the distribution by + Infix arithmetic expressions. Contributed to the distribution by Kresten Krab Thorup and Frank Jensen. enumerate.dtx @@ -60,7 +60,7 @@ fileerr.dtx missing file error loop. fontsmpl.dtx - Package and test file for producing `font samples' + Package and test file for producing `font samples'. ftnright.dtx Place footnotes in the right hand column in two-column mode. @@ -77,7 +77,7 @@ multicol.dtx rawfonts.dtx Preload fonts under the old internal font names of LaTeX2.09. - Not recomended for new packages, but may help when updating old + Not recommended for new packages, but may help when updating old files. shellesc.dtx @@ -103,7 +103,7 @@ verbatim.dtx Flexible version of verbatim environment. xr.dtx - eXternall References. Extend \ref to access \label commands in + eXternal References. Extend \ref to access \label commands in other documents. xspace.dtx diff --git a/macros/latex/required/tools/multicol.dtx b/macros/latex/required/tools/multicol.dtx index 4d86448002..90decb3bb1 100644 --- a/macros/latex/required/tools/multicol.dtx +++ b/macros/latex/required/tools/multicol.dtx @@ -20,7 +20,7 @@ % \iffalse This is a METACOMMENT % %% Package `multicol' to use with LaTeX2e -%% Copyright 1989-2023 Frank Mittelbach +%% Copyright 1989-2024 Frank Mittelbach %% %% In addition to the terms of LPPL any distributed version %% (unchanged or modified) of multicol has to keep the statement @@ -77,7 +77,7 @@ %% not for the payment of a license fee per se (which might or might %% not follow from this evaluation). %% -%% The license fee, if any, can be payed either to the LaTeX fund +%% The license fee, if any, can be paid either to the LaTeX fund %% (see ltx3info.txt in the base LaTeX distribution) or to the author of %% the program who can be contacted at %% @@ -98,7 +98,7 @@ %<driver> \ProvidesFile{multicol.drv} % \fi % \ProvidesFile{multicol.dtx} - [2024/05/23 v1.9h multicolumn formatting (FMi)] + [2024/09/14 v1.9i multicolumn formatting (FMi)] % % % @@ -403,12 +403,17 @@ % the most important is called |\tolerance|: this controls the % allowed `looseness' (i.e.\ the amount of blank space between words). % Its default value is 200 (the \LaTeX{} |\fussy|) which is too -% small for narrow columns. On the other hand the |\sloppy| -% declaration (which sets |\tolerance| to $10000=\infty$) is too -% large, allowing really bad spacing.\footnote{Look at the next -% paragraph, it was set with the \cs{sloppy} declaration.} -% -% \begin{sloppypar} +% small for narrow columns. + +% Setting it to \texttt{10000} (a.k.a.\ $\infty$) means arbitrary bad +% lines are possible. With that setting \LaTeX{} will make most lines +% perfect but intermix them with really bad lines. This was the +% setting originally used by \cs{sloppy} (nowadays it is a bit more +% cautious and used \texttt{9999} which makes a huge +% difference).\footnote{Look at the next paragraph, it was set with +% the \cs{tolerance}\texttt{=10000}.} +% +% \begin{sloppypar}\tolerance=10000 % \DescribeMacro\multicoltolerance \DescribeMacro\multicolpretolerance % We therefore use a |\multicoltolerance| parameter for the % |\tolerance| value inside the \mc{} environment. Its default value @@ -417,10 +422,10 @@ % be done outside the \mc{} environment. Since |\tolerance| is set % to |\multicoltolerance| at the beginning of every \textsf{multicols} % environment one can locally overwrite this default by assigning -% \verb*+\tolerance = +\meta{desired value}. There also exists a +% \cs{tolerance}\texttt{=}\meta{desired value}. There also exists a % |\multicolpretolerance| parameter holding the value for % |\pretolerance| within a \mc{} environment. Both parameters are -% usually used only by package designers. +% usually used only by package or class designers. % \end{sloppypar} % % Generation of multicolumn output can be divided into two parts. In @@ -679,7 +684,7 @@ % this value will additionally trace the mark handling % algorithm. It will show what marks are found, what marks are % considered, etc. To fully understand this information you will -% probably have to read carefully trough the implementation. +% probably have to read carefully through the implementation. % \item[$\meta{number}\geq 4$.] Setting \meta{number}\pagebreak[2] to % such a high value will additionally place an |\hrule| into your % output, separating the part of text which had already been @@ -1945,7 +1950,7 @@ % the balancing happened in the output routine then \TeX{} reverts % to the |\prevdepth| that was current before the OR once the OR has % finished. In short |\prevdepth| is something you can't set -% globally it is alway local to the current list being built. Thus +% globally it is always local to the current list being built. Thus % we need to set it back to zero here to avoid incorrect spacing. % \changes{v1.8h}{2014/09/12}{Set \cs{prevdepdth} for current vlist % when returning from multicols environment} @@ -2216,7 +2221,7 @@ % \begin{macro}{\multicolmindepthstring} % The default minimum depth of each column corresponds to the depth % of a `p' in the current font. This makes sense for Latin-based -% languages and was hard-wired intitially, but for Asian languages +% languages and was hard-wired initially, but for Asian languages % it is better to use a zero depth (and alternatively one might % want to use the depth of a strut or a parentheses). So we now % offer a way to adjust this while maintaining backward @@ -2462,7 +2467,7 @@ % If |\kept@firstmark| is non-empty then |\kept@botmark| must be % non-empty too so we can use their values. Otherwise we use the % value of |\kept@topmark| which was first initialized when we -% gathered the |\partical@page| and later on was updated to the +% gathered the |\partial@page| and later on was updated to the % |\botmark| for the preceding page. % % \changes{v1.4a}{1992/02/14}{\cs{botmark} set to \cs{splitbotmark}} @@ -2938,7 +2943,7 @@ % marks from this box. This has to be done \emph{before} we add a % penalty of $-10000$ to the top of the box, otherwise only an % empty box will be considered. But even that is not enough: the box -% may contain \cs{columnbreak}s in which case doing some artifical +% may contain \cs{columnbreak}s in which case doing some artificial % splitting to get the marks out still fails to see all marks % unless we take some special precaution in \cs{get@keptmarks} % (which is now done). @@ -3625,12 +3630,22 @@ % \changes{v1.6g}{2006/02/23}{Added \cs{@minipagefalse}} % \changes{v1.6h}{2008/12/05}{Use \cs{@endfloatbox} to better support % the modifications done by the float package} +% \changes{v1.9i}{2024/09/14}{Added tagging support} % Even if this should be used as a hook we use a |@| in the % name since it is more for experts. -% \begin{macrocode} +% For now we test if the socket is already defined +% \begin{macrocode} +\ExplSyntaxOn +\str_if_exist:cF { l__socket_tagsupport/float/end_plug_str } + { + \NewSocket{tagsupport/float/end}{0} + \NewSocket{tagsupport/float/hmode/end}{0} + } +\ExplSyntaxOff \def\set@floatcmds{% \let\@dblfloat\@dbflt \def\end@dblfloat{\@endfloatbox + \UseTaggingSocket{float/end}% \@largefloatcheck \outer@nobreak % \end{macrocode} @@ -3652,6 +3667,7 @@ \fi \ifnum\@floatpenalty=-\@Mii \@Esphack + \UseTaggingSocket{float/hmode/end}% \fi}} % \end{macrocode} % \end{macro} diff --git a/macros/latex/required/tools/multicol.pdf b/macros/latex/required/tools/multicol.pdf Binary files differindex 28ba5b1c4d..63da9583fc 100644 --- a/macros/latex/required/tools/multicol.pdf +++ b/macros/latex/required/tools/multicol.pdf diff --git a/macros/latex/required/tools/rawfonts.pdf b/macros/latex/required/tools/rawfonts.pdf Binary files differindex 55ecb5ea8a..997c204982 100644 --- a/macros/latex/required/tools/rawfonts.pdf +++ b/macros/latex/required/tools/rawfonts.pdf diff --git a/macros/latex/required/tools/shellesc.pdf b/macros/latex/required/tools/shellesc.pdf Binary files differindex 6fd4aab93d..a47f54a229 100644 --- a/macros/latex/required/tools/shellesc.pdf +++ b/macros/latex/required/tools/shellesc.pdf diff --git a/macros/latex/required/tools/showkeys.pdf b/macros/latex/required/tools/showkeys.pdf Binary files differindex 130a561fc9..09bb262272 100644 --- a/macros/latex/required/tools/showkeys.pdf +++ b/macros/latex/required/tools/showkeys.pdf diff --git a/macros/latex/required/tools/somedefs.pdf b/macros/latex/required/tools/somedefs.pdf Binary files differindex 1326a47b6e..742cf885e0 100644 --- a/macros/latex/required/tools/somedefs.pdf +++ b/macros/latex/required/tools/somedefs.pdf diff --git a/macros/latex/required/tools/tabularx.pdf b/macros/latex/required/tools/tabularx.pdf Binary files differindex 6a8e0d0c21..02e95d8c00 100644 --- a/macros/latex/required/tools/tabularx.pdf +++ b/macros/latex/required/tools/tabularx.pdf diff --git a/macros/latex/required/tools/theorem.dtx b/macros/latex/required/tools/theorem.dtx index a9c3ccae3e..3fbba473ba 100644 --- a/macros/latex/required/tools/theorem.dtx +++ b/macros/latex/required/tools/theorem.dtx @@ -24,7 +24,7 @@ %% % % -\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)} +\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)} % % \ProvidesFile{theorem.dtx}[\FMithmInfo] %\iffalse % this is a METACOMMENT ! @@ -952,7 +952,6 @@ % % \subsubsection{The \texttt{changebreak} style} % -% \begin{macrocode} % This style option is stored in the file |thcb.sty|. % \begin{macrocode} %<*thcb> diff --git a/macros/latex/required/tools/theorem.pdf b/macros/latex/required/tools/theorem.pdf Binary files differindex ec0d2a0e69..4bf5e62691 100644 --- a/macros/latex/required/tools/theorem.pdf +++ b/macros/latex/required/tools/theorem.pdf diff --git a/macros/latex/required/tools/tools-overview.pdf b/macros/latex/required/tools/tools-overview.pdf Binary files differindex 86a57d927e..d03234e1f8 100644 --- a/macros/latex/required/tools/tools-overview.pdf +++ b/macros/latex/required/tools/tools-overview.pdf diff --git a/macros/latex/required/tools/tools-overview.tex b/macros/latex/required/tools/tools-overview.tex index 54f4b5ed63..3d45a5e2fc 100644 --- a/macros/latex/required/tools/tools-overview.tex +++ b/macros/latex/required/tools/tools-overview.tex @@ -132,7 +132,7 @@ Access bold math symbols. }% \entry{calc}{% - Infix arithmetic expresions. Contributed to the distribution by + Infix arithmetic expressions. Contributed to the distribution by Kresten Krab Thorup and Frank Jensen. }% \entry{dcolumn}{% @@ -149,7 +149,7 @@ missing file error loop. }% \entry{fontsmpl}{% - Package and test file for producing \emph{font samples} + Package and test file for producing \emph{font samples}. }% \entry{ftnright}{% Place footnotes in the right hand column in two-column mode. @@ -173,7 +173,7 @@ }% \entry{rawfonts}{% Preload fonts under the old internal font names of \LaTeX{}2.09. - Not recomended for new packages, but may help when updating old + Not recommended for new packages, but may help when updating old files. }% \entry{shellesc}{% @@ -206,7 +206,7 @@ Flexible version of verbatim environment. }% \entry{xr}{% - eXternall References. Extend \cs{ref} to access \cs{label} commands in + eXternal References. Extend \cs{ref} to access \cs{label} commands in other documents. }% \entry{xspace}{% diff --git a/macros/latex/required/tools/tools.ins b/macros/latex/required/tools/tools.ins index 8687d49d7f..776215ff2e 100644 --- a/macros/latex/required/tools/tools.ins +++ b/macros/latex/required/tools/tools.ins @@ -195,6 +195,8 @@ given in the file `manifest.txt'. \file{r.tex}{\from{fileerr.dtx}{run}} \file{x.tex}{\from{fileerr.dtx}{exit}}} +\generate{\file{rename-to-empty-base.tex}{\from{fileerr.dtx}{return}}} + \Msg{***********************************************************} \Msg{*} @@ -202,8 +204,9 @@ given in the file `manifest.txt'. \Msg{* files into a directory searched by TeX:} \Msg{*} \Msg{* All the files with extension `.sty' and `.tex'} -\Msg{* Note there also may be a file .tex which is `invisible'} -\Msg{* on some operating systems.} +\Msg{* TeX may be blocked from writing a file called `.tex',} +\Msg{* so generated a file with name `rename-to-empty-base.tex'.} +\Msg{* Rename that file to `.tex' after the docstrip generation.} \Msg{*} \Msg{* To produce the documentation run the .dtx files through LaTeX.} \Msg{*} @@ -211,14 +214,4 @@ given in the file `manifest.txt'. \Msg{***********************************************************} -\Msg{} -\Msg{* Finally trying to make a file `.tex'.} -\Msg{* (Placed at the end of this run, as this} -\Msg{* may fail on some operating systems.)} - -\let\oldopenout\openout -\def\openout{\batchmode\immediate\oldopenout} - -\generate{\file{.tex}{\from{fileerr.dtx}{return}}} - \endbatchfile diff --git a/macros/latex/required/tools/trace.pdf b/macros/latex/required/tools/trace.pdf Binary files differindex 5f047d4005..e2dd5382a7 100644 --- a/macros/latex/required/tools/trace.pdf +++ b/macros/latex/required/tools/trace.pdf diff --git a/macros/latex/required/tools/varioref.pdf b/macros/latex/required/tools/varioref.pdf Binary files differindex 41013052cf..677d2d7d41 100644 --- a/macros/latex/required/tools/varioref.pdf +++ b/macros/latex/required/tools/varioref.pdf diff --git a/macros/latex/required/tools/verbatim.pdf b/macros/latex/required/tools/verbatim.pdf Binary files differindex ad5bced403..7551cea7d2 100644 --- a/macros/latex/required/tools/verbatim.pdf +++ b/macros/latex/required/tools/verbatim.pdf diff --git a/macros/latex/required/tools/xr.pdf b/macros/latex/required/tools/xr.pdf Binary files differindex 5da2dabe0b..92e74213f5 100644 --- a/macros/latex/required/tools/xr.pdf +++ b/macros/latex/required/tools/xr.pdf diff --git a/macros/latex/required/tools/xspace.pdf b/macros/latex/required/tools/xspace.pdf Binary files differindex 02c44368bb..f6d193af07 100644 --- a/macros/latex/required/tools/xspace.pdf +++ b/macros/latex/required/tools/xspace.pdf |