% \iffalse meta-comment % % Copyright (C) 2021-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: ltnews37.tex % % This is issue 37 of LaTeX News. \NeedsTeXFormat{LaTeX2e}[2020-02-02] \documentclass{ltnews} %% Maybe needed only for Chris' inadequate system: \providecommand\Dash {\unskip \textemdash} %% NOTE: Chris' preferred hyphens! %%\showhyphens{parameters} %% \hyphenation{because parameters parameter} \usepackage[T1]{fontenc} \usepackage{lmodern,url,hologo} \usepackage{csquotes} \usepackage{multicol} \usepackage{color} \providecommand\hook[1]{\texttt{#1}} \providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$} \providecommand\option[1]{\texttt{#1}} \providecommand\env[1]{\texttt{#1}} \providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}} \providecommand\eTeX{\hologo{eTeX}} \providecommand\XeTeX{\hologo{XeTeX}} \providecommand\LuaTeX{\hologo{LuaTeX}} \providecommand\pdfTeX{\hologo{pdfTeX}} \providecommand\MiKTeX{\hologo{MiKTeX}} \providecommand\CTAN{\textsc{ctan}} \providecommand\TL{\TeX\,Live} \providecommand\githubissue[2][]{\ifhmode\unskip\fi \quad\penalty500\strut\nobreak\hfill \mbox{\small\slshape(% \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}% {github issue#1 #2}% )}% \par\smallskip} %% But Chris has to mostly disable \href for his TEXPAD app: %% \def\href #1{} % Only For Chris' deficient TeX engine % simple solution right now (just link to the first issue if there are more) \def\getfirstgithubissue#1 #2\relax{#1} \providecommand\sxissue[1]{\ifhmode\unskip \else % githubissue preceding \vskip-\smallskipamount \vskip-\parskip \fi \quad\penalty500\strut\nobreak\hfill \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par} \providecommand\gnatsissue[2]{\ifhmode\unskip\fi \quad\penalty500\strut\nobreak\hfill \mbox{\small\slshape(% \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}% {gnats issue #1/#2}% )}% \par} \let\cls\pkg \providecommand\env[1]{\texttt{#1}} \providecommand\acro[1]{\textsc{#1}} \vbadness=1400 % accept slightly empty columns \makeatletter % maybe not the greatest design but normally we wouldn't have subsubsections \renewcommand{\subsubsection}{% \@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}% {-1em}{\@subheadingfont\colonize}% } \providecommand\colonize[1]{#1:} \makeatother \let\finalvspace\vspace % for document layout fixes % Undo ltnews's \verbatim@font with active < and > % (we have meta variables in verbatim, so keep it.) %\makeatletter %\def\verbatim@font{% % \normalsize\ttfamily} %\makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \providecommand\tubcommand[1]{} \tubcommand{\input{tubltmac}} % \publicationday{01} % change this if it's not released on 1st of a month \publicationmonth{June} %\publicationyear{2023 --- DRAFT version for upcoming release} \publicationyear{2023} \publicationissue{37} \begin{document} \tubcommand{\addtolength\textheight{4.1pc}} % only for TUB \maketitle {\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000 \tableofcontents} \setlength\rightskip{0pt plus 3em} % for ltnews37, squeeze to five pages. \tubcommand{\fontsize{9.6}{12}\selectfont} \medskip %\section{Introduction} \section{New functionality offered as part of the \enquote{\LaTeX{} Tagged PDF} project} We have now enabled new automatic tagging functionality for additional \LaTeX{} elements, among them most display environments, standard sectioning commands, content, figure and table listings, floats and graphics and bibliographies. This can be activated through \begin{verbatim} \DocumentMetadata{testphase=phase-III} \end{verbatim} At this point in time tagging support is only available for a restricted set of documents, i.e., those that use one of the basic document classes (\texttt{article}, \texttt{report}, and \texttt{book}) and only use commands and environments described in Lamport's \LaTeX{} manual. Using other document classes or adding additional packages in the preamble may work (or may partially work) but at this stage it is not very likely, at least not for packages or classes that excessively alter internals of \LaTeX{}. Also note that there are still several environments and commands described in the \LaTeX{} manual that do not have tagging support yet, notably tabulars, \texttt{tabbing}, the various math environment and a few others. They will get this support as part of \texttt{phase-III}, but some of them will be delayed until after the June release. A prototype for math tagging (including support for the \pkg{amsmath} environments) is already available, but it is mainly intended for experimentation and feedback and the resulting tagging is by no means the way we envision it to be eventually. If you would like to try it out use the following line: \begin{verbatim} \DocumentMetadata{testphase={phase-III,math}} \end{verbatim} Note that the math tagging code at this point in time will clash with packages that redefine the \texttt{\$} character (which then may lead to strange errors) and that packages that use math mode for non-mathematical constructs may result in surprising output as far as tagging is concerned. Feedback on which packages fail with the code in one or another way would be appreciated. The \texttt{latex-lab} bundle contains various (still untagged) documentation files about the new code that can be accessed with \verb|texdoc -l latex-lab|. Feedback is welcome! Please use \url{https://github.com/latex3/latex2e/discussions/1010}. \section{New or improved commands} \subsection{Extending hooks to take arguments} Hooks have always been containers for code whose outcome was entirely dependent on the contents of the hook alone. If any type of contextual information had to be passed to the hook, it had to be done by setting some variable before the hook so that the code in the hook could use that. But this is somewhat hard to keep track of, clumsy to implement, and it required the programmer to have some kind of \enquote{hook before the hook} to do that setup. To make things a bit easier, \pkg{lthooks} was enhanced to support hooks with arguments. Hooks can now be declared and used with arguments, then the code added to these hooks can reference the hook's arguments using \verb|#1|, \verb|#2|, etc., so now hooks can behave more like macros than like \emph{token lists} (using \pkg{expl3} terminology). Regular argument-less hooks continue to work exactly like they did before: this extension is completely compatible with older documents and packages. \AddToHook{cmd/verbatim@font/after}[hack]{\small} To declare a hook with arguments, use \begin{verbatim} \NewHookWithArguments {} {} \end{verbatim} then, similarly, to use the code in the hook, supposing a hook declared with 2 arguments, write \begin{verbatim} \UseHookWithArguments {} {2} {} {} \end{verbatim} Or, if you want to add some code to a hook that takes arguments, write \begin{verbatim} \AddToHookWithArguments {} [