% \iffalse meta-comment
%
% Copyright 2026
% 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: ltnews43.tex
%
% This is issue 43 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}

\usepackage{amsmath}

\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}

% simple solution right now (just link to the first issue if there are more)
\def\getfirstgithubissue#1 #2\relax{#1}

% issues from the tagging-project:

\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}%
          	    {tagging-project issue#1 #2}%
           )}%
     \par\smallskip}

\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{June}
\publicationyear{2026  --- DRAFT version for upcoming release}

\publicationissue{43}

\begin{document}

\maketitle
{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
\tableofcontents}



\setlength\rightskip{0pt plus 3em}

\section{Introduction}

% To write

\section{News from the Tagged PDF project}

\subsection{Improving tagging of floats}

The tagging support code for floats has been overhauled.  It now
allows tagging support to be added to new float types like listings or
tcolorboxes.  By default float structures are deferred to the end of
the document but it is now possible to switch this on and off and to
output the floats in other places in the structure.  More details can
be found in \texttt{latex-lab-float.pdf}.

\subsection{Setting the language in \cs{DocumentMetadata}}

Until now \cs{DocumentMetadata} knew only the \texttt{lang} key to set the main language.
The key was only used to set the language in the PDF catalog and the XMP-metadata and didn't affect the language of the document as specified with \pkg{babel} or \pkg{polyglossia}. 

With this release we are now adding two more keys: \texttt{language} and \texttt{other-languages}. The \texttt{language} key takes as argument a language in BCP~47 format, so, e.g., \texttt{de-AT} or \texttt{fr} or \texttt{gsw-u-sd-chzh} (Swiss German as used in the Canton of Zurich). The value is stored in the document properties and can be retrieved (expandably) with \verb+\GetDocumentProperty{document/language}+. 

The value of the \texttt{language} key is also used to set the language in the PDF metadata, so it is also a replacement for the \texttt{lang} key. 
If a different (shorter or more generic) value is wanted in the PDF metadata, an optional argument can be used: \verb+language=[de]{gsw-u-sd-chzh}+ or the \texttt{lang} key can be used after the \texttt{language} key to overwrite the value: \verb+language=gsw-u-sd-chzh,lang=de+.

Just like \texttt{lang}, the \texttt{language} key does \emph{not} automatically change the language setup of a document: it doesn't change the hyphenation patterns or the fix names and doesn't set class options. It also doesn't forces the loading of a language package. 
The expectation is that in the future packages that need to know the document language, like \pkg{babel} or 
\pkg{polyglossia}, will read the value and react accordingly. 

The \texttt{other-languages} key can be used to declare further languages 
that are used in addition to the  \enquote{main} language
in the document. The argument is a comma list of languages in BCP~47 format:
\verb+other-languages={fr,en-US,ar}+. The list is stored in the document properties too and can be retrieved with \verb+\GetDocumentProperty{document/other-languages}+. 


\subsection{(Not) setting the language in \cs{DocumentMetadata}}

It is good practise to always set the main document language in
\cs{DocumentMetadata} explicitly using the \texttt{lang} or the new \texttt{language} key: It is 
used to set the \texttt{/Lang} key in the PDF and their value can also
be used by packages and classes to adapt locale settings.
 
However, if there is no such setting then the code will use the main
language as set by \pkg{babel} or \pkg{polyglossia}. If they are not
used \texttt{lang=en} is applied as this has always been \LaTeX's
default.  When we introduced the \texttt{lang} key we added a warning
to the log in such cases but feedback we received indicated that it
caused concerns so now the fallback is applied silently.
%
\taggingissue{1115}


\subsection{Revision of the block environments}

\emph{to document: see \texttt{blocks-code.pdf} for extensive documentation}

In \LaTeXe{} the layout of the \env{description} environment was
always identical on all nesting levels. In the new implementation,
based on block templates, this has been made configurable for each
nesting level by providing individual instances for all levels
(\texttt{description-\meta{level}}). By default, they are all
identical.

\subsection{Emulation of the \pkg{enumitem} package}

We are in the process of providing an emulation of \pkg{enumitem}
package using the new block templates. Most keys of \pkg{enumitem} are
already supported. We have also added support for \cs{newlist} and
\cs{setlist}. Other aspects of the package interfaces will follow over
time. This is work in progress and the current state is documented in
\file{latex-lab-enumitem.pdf}.

\subsection{Detect if keys are not applicable to block environments}

All block environments accept an optional argument in which the user
can specify key settings to overwrite the values normally used for the
current instance. Trying to apply an unknown key was caught in case of
list environments, but with other environments, e.g., \env{quote},
such keys got silently ignored. This has now been corrected.
%
\taggingissue{1317}

\subsection{Reimplementation of heading commands with templates}

\emph{to document: see \texttt{latex-lab-sec-template.pdf} for extensive documentation}

\subsection{Using \cs{Documentmetadata} more than once}
Until now it was possible to use \cs{Documentmetadata} more than once, the second use
executed only some keys. This was changed, similar to \cs{documentclass} the
\cs{Documentmetadata} declaration will now error if used more than once.

\section{New or improved commands}

\subsection{Recovering instance values}

In some cases, editing template instances requires knowing the
existing instance values. To support this, we have added the
expandable command
\cs{InstanceValue}\texttt{\meta{type}\meta{instance}\meta{key}}, which
returns the value if available; otherwise it returns empty if the key or
instance does not exist.

\subsection{Declaring alias counters}
Theorem-like environments like lemmas and definitions often use 
the same counter for the numbering. This makes it difficult to create 
suitable prefixes when referencing. We have therefore added a new 
command \cs{newcounteralias} that allows to create an alias of a counter 
and so to use a counter under another name. The code is based on a 
similar command from the package \pkg{aliascnt}. The command \cs{newtheorem} 
in \LaTeX{} and also in \pkg{amsthm} has been changed to use 
\cs{newcounteralias}. This allows packages like \pkg{hyperref}, 
\pkg{zref-clever} and \pkg{cleveref} to correctly identify the environment. 
The following will now reference as wanted the lemma as \enquote{lemma 1} 
and not as \enquote{theorem 1}:
\begin{verbatim}
\documentclass{article}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\usepackage{zref-clever}
\begin{document}
\begin{lemma} \label{lem} ... \end{lemma}
In \zcref{lem} we claim \ldots
\end{document}
\end{verbatim}

\subsection{Debugging support for templates}

We have added debugging support for template use: this can be activated using
\cs{DebugTemplatesOn}. Unlike template \emph{creation}, the use of templates
and instances is intended to be a fast process: as a result, debugging messages
use a low-level approach to ensure they can be skipped quickly in day to day
use.

\subsection{Optional argument for \env{picture}}

The tagging code extends the \env{picture} environment to
take a optional argument which can be used to add, e.g., an alternative description. This optional argument has now been added to the kernel version of the environment
to make it easier for authors to write code compatible with tagged and untagged documents. If \cs{DocumentMetadata} is not used the optional argument is silently ignored.
%
\taggingissue{1172}

\subsection{Commands to store and restore the last skip}

The package \pkg{hyperref} surrounds anchors for links with two commands that
save and restore the last skip to prevent that these anchors disturb spacing commands like \cs{addvspace}. We now provide these commands under the name 
\cs{SaveLastSkip} and \cs{RestoreLastSkip} directly and use them also in the 
kernel definition of \cs{MakeLinkTarget}.
%
\githubissue{2070} 

\section{Code improvements}

\subsection{Revision of handling of \enquote{no value} concept}

The commands \cs{NewDocumentCommand}, etc., introduce the idea of
differentiating an absent optional argument from one which is simply
empty.  When an argument is entirely empty, it is given the special
\enquote{no value} marker. In previous releases, this was a
deliberately-awkward set of character tokens, which are therefore hard
to input accidentally.

Whilst this allowed us to easily detect \enquote{no value}, it turns
out there are places we want to be able to add such a value. This
comes up particularly in creating templates for some parts of the
document structure as part of the wider tagging project.

We have therefore changed the approach to use a marker token,
\cs{NoValue}, and updated the \cs{IfNoValue(TF)} test and
relatives. This means you now \emph{can} type in an optional argument
that is interpreted as \enquote{not present}, but this is not likely
to happen by accident.

\subsection{Revision of keyval conversion for empty arguments}

A second revision to \cs{NewDocumentCommand}, etc., in this release applies to
conversion of classical arguments to key--value form, for example
\begin{verbatim}
  \DeclareDocumentCommand \caption
    {s ={short-text} +O{#3} +m}
\end{verbatim}
This will convert a classical optional argument of \verb|\caption| to a keyval
one called \texttt{short-title}. In this release, if the optional argument is
given but blank, the result will be an entirely empty argument rather
than \verb*|short-title = |. This reflects the fact that in moving to
a keyval model, the meaning of an empty argument is best thought of as an
empty keyval list. For cases where a classical |[]| means something is
explicitly empty, adding an empty brace group (|[{}]|) will work with
both the new code and with older formats.

\subsection{Revision of \cs{protected} status of functions in templates}

As we use templates more widely, minor adjustments to the workflow are
necessary. As part of this, we have adjusted templates such that keys
declared as functions are stored with \cs{protected} status.

\subsection{Removal of \enquote{fake math} from the kernel}

Internally, some text constructs in \LaTeX{} have used math mode, as
this allowed use of the built-in positioning of material with limited macro
effort. Historically, this was important for obtaining useful performance, but
today is more problematic. Tagging requires that such \enquote{fake math} is
filtered out, and this becomes even more problematic when working with
right-to-left languages. (The interaction between text and math directions in
Lua\TeX{} is complex.)

In this release, we have removed the internal use of \enquote{fake math}
from
\begin{itemize}
  \item \cs{textsuperscript} and \cs{textsubscript}
  \item \cs{parbox} and \env{minipage}
  \item Around \env{tabular} structures
\end{itemize}

To avoid as far as possible changes to existing output, the standard settings
continue to use math font dimension values for placing super and
subscripts.\footnote{The calculation used for placement of math mode sub- and
superscripts is described in Appendix~G of \emph{The TeX{}book}, and relies on
multiple math font dimensions.} For new documents, we suggest setting the
offset to a predictable offset based on text font dimensions (for example a
fixed percentage of the x-height).

\section{Formalization of L3PL (\pkg{expl3}) release requirement}

In this release, we have formalized which release of the L3 Programming Layer
(\pkg{expl3}) is required by the kernel: at least the 2023-11-27 release. This
has allowed us to tidy up some places where the kernel uses L3PL, in particular
where we have made improvements in the L3PL and want these to be used by the
kernel. If the version of the L3PL available is too old, an error will be
issued and format building will be abandoned.

\section{New or improved documentation}

Adding new features to \LaTeX{} means writing new documentation. To date, each
new source has had separate documentation, for example
\texttt{lthooks-doc.pdf}. This is a convenient way for development to take
place, particularly prior to code being stable. However, it makes it
challenging to find information.

We have therefore started to collect all of this information into a single
document, \texttt{cmdguide.pdf}. The aim over time will be to include all of
new features here. We also hope to collect up existing (relevant) documentation
from all of \LaTeXe{} eventually, so that this document can then serve as a
programmer's reference manual for the kernel, similar to \texttt{interface3}
for the \LaTeX{} programming layer.


This is work in progress so we expect the document to grow and its structure
(based on feedback and experience with it use) might change over time. In
particular, the current content is made up of files that were written to be
read independently: as such, there is some duplication, suboptimal ordering and
formatting variation. That will all be addressed over time, as we aim for a
single coherent document.

\section{Glyphs, characters \& encodings}

\subsection{Improved copy\,\&\,paste for \pdfTeX{} and \LuaTeX{} documents}

In 2021, additional information was added to the PDF file,
when compiling with \pdfTeX{}, 
from the file \file{glyphtounicode.tex}
in order to improve copying from, and searching in,
text for, e.g., common ligatures.

We now extend this support and load additionally a file 
\file{glyphtounicode-cmex.tex}
which improves copying of mathematical symbols.

As starting with version 1.24 \LuaTeX{} will support an extended syntax 
of \cs{pdfglyphtounicode} that makes it possible to improve copy\,\&\,paste 
of symbol fonts. Therefore, we load and activate the files also with 
this engine if PDF mode 
is active. Other engines do not support \cs{pdfglyphtounicode} and 
\cs{pdfgentounicode}. Here we define the commands as noop commands to 
allow packages for symbol fonts to use the commands without testing the 
engines first. 
%
\githubissue{2007}

\section{Bug fixes}

\subsection{Improve transparency of \cs{label}, \cs{index}, and friends}

Commands such as \cs{label} or \cs{index} are supposed to be
transparent with respect to surrounding spaces, i.e., spaces on both
sides should not lead to several spaces in typeset text. This always
worked reasonably well if there is only a single command. However, if
there are several of them in a row one could end up with a spurious
extra space. This has finally been corrected.
%
\githubissue{1910}

\subsection{Global mappings for math script font families}

The command \cs{DeclareMathScriptfontMapping} added in the previous
release declares related font families used for scriptsize and
scriptscriptsize mathematics. Previously this mapping was set locally,
therefore it could not be used in \texttt{.fd} files. This has been
corrected to apply globally like other font declarations.
%
\githubissue{1955}



\section{Changes to packages in the \pkg{amsmath} category}

\subsection{Treat \cs{dots} before \cs{xrightarrow} correctly}

If one writes \verb=$ a \to \dots \to b $= the result is $ a \to \dots
\to b $, i.e., \cs{dots} are treated as binary dots. If you replace
\cs{to} with \cs{xrightarrow} then the dots suddenly become comma dots
and you have to use \cs{bdots} to get the binary dots back. This has
now been corrected for both \cs{xrightarrow} and \cs{xleftarrow}.
%
\githubissue{263}


\subsection{Don't lose a qed symbol with \texttt{fleqn}}

The \env{proof} environment of \pkg{amsthm} automatically puts a QED
symbol at the end of a proof.  Sometimes this is not the best place
and in that situation that author can direct \LaTeX{} to place the
symbol earlier by using \cs{qedhere} in an appropriate place. However,
when the \texttt{fleqn} option was in force this didn't always work
and the symbol got dropped in some cases. This has now been corrected.
%
\githubissue{783}

\subsection{Set the right margin of multline to zero with \texttt{fleqn}}

The \env{multline} environment of \pkg{amsmath} uses wider margins when the \texttt{fleqn} option is in force,
although only the left margin is intended to change.
As a result, the \env{multline} environment is typeset in a box wider than intended.
Visually, this is usually unnoticeable, but it can, for example, make the page box wider than
\texttt{textwidth}. If an element spans the full page box (such as \texttt{hline}),
it may then appear wider than the surrounding paragraphs.
%
\githubissue{2025}

\subsection{Correct vertical spacing above \env{multline}}

In multi-line display math environments such as \env{align} and \env{gather},
the distance between lines is slightly increased (by an amount controlled by
\cs{jot}) to ensure that tall mathematical symbols do not clash.

It was then discovered that the \env{multline} environment failed to apply
this compensation, resulting in \env{multline} displays appearing slightly
further away from the preceding paragraph than other multi-line equations.
This has now been corrected.

As a result, more material might fit on a page potentially changing the
pagination. If that happens, an explicit \cs{pagebreak} will restore the
original pagination in old documents.
%
\githubissue{793}


\subsection{Improved column tracking and spacing in alignment environments}

A few subtle inconsistencies regarding alignment environments were recently identified and fixed:
\begin{itemize}
    \item The \env{gathered} environment did not correctly isolate its column count when nested inside other alignment structures, which could throw off the formatting of the parent environment.
    \item If a user omitted the final \verb=\\= line break at the very end of an \env{aligned} or \env{alignedat} environment, the final row would bypass the maximum-column checks and occasionally leave an unwanted trailing space.
    \item The \env{aligned} environment did not always reset its internal counter between rows, which could intermittently cause small spacing glitches at the right edge of the alignment.
\end{itemize}
Now, spacing is consistently applied and excessive columns are accurately detected, even on the final row or when deeply nested.
%
\githubissue{1609}


%\subsection{A fix}

%% Some text
%
%%\githubissue{XXXX}


%\section{Changes to packages in the \pkg{graphics} category}

\section{Changes to packages in the \pkg{tools} category}

\subsection{Adjustment to the glue used by \pkg{longtable}}

Recent \LaTeX{} releases produce ignored warnings about infinite glue shrinkage.
The glue in \pkg{longtable} has been adjusted to only use a finite shrink component.
%
\githubissue{1907}


\subsection{Hooks for \pkg{array} and \pkg{longtable}}

We have added a number of hooks in the \pkg{array} package so that
extension packages can add code at defined places without the need to
overwrite internals of the \pkg{array} implementation. This will
improve the maintenance of such packages because they will then not
have to update when there are changes to \pkg{array} itself. The first
package to make use of this is \pkg{fcolumn}.

The same hooks are also available in \pkg{longtable} but only if
\pkg{array} is also loaded; otherwise they are suppressed.  In the
future, i.e., if \cs{DocumentMetadata} is used at the start of new
documents \pkg{array} is always loaded.


\subsection{\pkg{varioref}: Several new variants for German}

A number of options were added for German language variants, so that
one can now select \texttt{austrian}, \texttt{naustrian},
\texttt{german}, \texttt{ngerman}, \texttt{swissgerman}, or
\texttt{nswissgerman}. By default, they all lead to the same strings.
%
\githubissue{1952}

\subsection{\pkg{varioref}: Updated default strings for Hungarian}

The text strings for Hungarian have been corrected. At the same time a
second option was added to select them, i.e., it is now possible to
use either \texttt{magyar} or \texttt{hungarian} with identical
results.
%
\githubissue{1977}

\subsection{\pkg{varioref}: Chinese locale strings}

A \texttt{chinese} option has been added to \pkg{varioref}, providing
Simplified Chinese locale strings for all reference text macros and
format macros. The parentheses in the format macros use full-width
characters (U+FF08/U+FF09), consistent with the existing Japanese
option.

\section{Changes at the L3 programming layer}

The L3 programming layer provides functions to convert between different
encodings, which is needed for the creation of PDF metadata for example. We
have recently improved support here for the up\TeX{} engine, which uses a mixed
input encoding at the engine level. This should allow more Japanese documents
to work directly with standard \LaTeX{} tools for PDF metadata creation, etc.

%\section{Changes to files in the \pkg{cyrillic} category}

\begin{thebibliography}{9}\frenchspacing

%\fontsize{9.3}{11.3}\selectfont

\bibitem{43: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{43:ltnews} \LaTeX{} Project Team.
  \emph{\LaTeXe{} news 1--42}. November, 2025.
  \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}

\end{thebibliography}

\end{document}

