Skip to content

Commit

Permalink
Tagging support for array, tabularx, and longtable (#1209)
Browse files Browse the repository at this point in the history
* take latex-lab-table.dtx from uf-review-05

* latex-lab-table: move   \@@_show_curr_cell_data: into socket ;
array: put sockets into array ;
array: updated \insert@column to use sockets

* first stab at tabularx (WIP)

* getting there (tabularx)

* fix docu

* fix so that the code runs when tagging is not used

* leftover \end{macrocode}

* add verst version of lttag.dtx

* simplify tabularx

* provide \ProvideDocElement

* change lttag -> lttagging;
us separate \insert@pcolumn with its own sockets

* WIP (broken)

* WIP

* WIP (working again)

* WIP

* medium rewrite/restructure (WIP)

* would have been too easy

* and a doc issue

* and one more

* move multicolumn changed into array;
change begindocument hook chunk to "kernel"

* better also add the socket declaration in the right file

* starting with L3 layer in array (WIP)

* added missing \MaintainedBy defs

* l3doc needs amsmath :-(

* updated \@array in array

* move \ar@ialign into array

* tracing/debugging now optional

* move \@addamp

* move \@Arraycr

* move \endarry ; add \ar@crcr

* move cell data handling to lttaging;
start with longtable (WIP)

* stray macrocode

* use   \tbl_update_multicolumn_cell_data:n

* more work on longtable (WIP)

* update \endlongtable and \LT@t@bularcr (WIP)

* hopefully fixed logic for \endhead and friends;
also fixed \hline issue (guess \cline needs also attention but not tonight)

* trying to get around l3bitset issue

* using newer kernel with l3bitset included

* l3bibset vanished

* sigh

* and a docu fix

* cleanup docu (WIP)

* docu changes (fail table-14-pbox)

* doc updates for "array"

* renamed a couple of sockets; but more docu

* more updates and documentation

* getting ready for first draft

* implemented most of Ulrike's suggestions

* more suggestions

* cleanup after merge

* drop definitions now in tagpdf

* ltnews entry

* fix tests

* updated with David's comments
  • Loading branch information
FrankMittelbach committed Feb 9, 2024
1 parent 0cfa665 commit c1eedbc
Show file tree
Hide file tree
Showing 110 changed files with 5,984 additions and 4,757 deletions.
6 changes: 4 additions & 2 deletions base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================



2024-01-30 David Carlisle <David.Carlisle@latex-project.org>
* ltclass.dtx: check that \RequirePackage, \documentclass, \usepackage
and related commands are at top level (gh/1185)
Expand Down Expand Up @@ -54,6 +52,10 @@ not part of the distribution.
* ltfilehook.dtx
Change flag markup in macro env

2023-12-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* lttagging.dtx:
First version of lttagging module added

2023-12-07 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
* ltproperties.dtx: use \protected@write, (gh1200)

Expand Down
46 changes: 46 additions & 0 deletions base/doc/ltnews39.tex
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,33 @@ \section{Introduction}
\emph{to write}


\section{News from the \enquote{\LaTeX{} Tagged PDF} project}

In the previous \LaTeX{} News~\cite{39:ltnews38} we announced a first prototype
support for tagged tabulars. Some of the necessary support code has
now been moved from \texttt{latex-lab} to the corresponding packages
(using sockets and plugs) and to the \LaTeX{} kernel (for those parts
that are also necessary for other aspects of tagging).

The kernel code specific to tagging is implemented in the file
\texttt{lttagging.dtx}. For now it contains \cs{UseTaggingSocket}, a
special invocation command for sockets that are specific to
tagging. This enables us to also provide \cs{SuspendTagging} and
\cs{ResumeTagging}, i.e., a very efficient way to temporarily disable
the whole tagging process. This is, for example, necessary, if some
code is doing trial typesetting. In that case the trials should not
generate tagging structures\Dash only the finally chosen version
should. Thus, \pkg{tabularx}, for example, stops the tagging while
doing its trials to figure out the correct column widths to use, and
then renables tagging when the table is finally typeset.

Over time, \texttt{lttagging.dtx} will hold more general tagging code
as appropriate. For now it is only documented as part of
\texttt{source2e.pdf} but long term we will provide a separate guide
for tagging, which will then also include the information currently
found in various other places, e.g., \texttt{tagpdf.pdf}.


\section{Enhancements to the new mark mechanism}

In June 2022 we introduced a new mark mechanism in
Expand Down Expand Up @@ -423,6 +450,20 @@ \subsection{Declaring appropriate sub-encodings for \texttt{TS1} symbol fonts}

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


\subsection{\pkg{array}, \pkg{longtable}, \pkg{tabularx}: support tagging}

The three packages are now extended to enable producing tagged tabulars upon
request. This is done by adding a number of sockets (see
\cite{39:ltnews38}) that, by default, do nothing, but are equipped
with appropriate plugs if tagged PDF is requested.

In the previous \LaTeX{} release this was handled in
\texttt{latex-lab} patching the packages when tagging was requested.




\subsection{\pkg{verbatim}: \cs{verb} showed visible spaces}

A recent change in the kernel was not reflected in the \pkg{verbatim}
Expand Down Expand Up @@ -465,6 +506,7 @@ \subsection{\pkg{showkeys}: Allow \cs{newline} in \pkg{amsthm} to work}
\githubissue{1123}



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

\subsection{Correct definition of \cs{k}}
Expand Down Expand Up @@ -510,6 +552,10 @@ \subsection{Correct definition of \cs{k}}
\emph{\LaTeXe{} news 37}. June 2023.\\
\url{https://latex-project.org/news/latex2e-news/ltnews37.pdf}

\bibitem{39:ltnews38} \LaTeX{} Project Team.
\emph{\LaTeXe{} news 38}. November 2023.\\
\url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}

%\bibitem{39:blueprint} Frank Mittelbach and Chris Rowley.
% \emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\
% \url{https://latex-project.org/publications/indexbyyear/2020/}
Expand Down
2 changes: 2 additions & 0 deletions base/doc/source2e.tex
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@

\DocInclude{ltoutput} % Output routine

\DocInclude{lttagging}% Tagging support

\DocInclude{lthyphen} % Hyphenation (hyphen.ltx).

\DocInclude{ltfinal} % Last minute initialisations and dump
Expand Down
3 changes: 2 additions & 1 deletion base/format.ins
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ the system are in the document `cfgguide.tex'.
\from{ltbibl.dtx}{2ekernel}
\from{ltmarks.dtx}{trace,2ekernel} % L3 layer module
\from{ltpage.dtx}{2ekernel}
\from{ltclass.dtx}{2ekernel,tracerollback}
\from{ltclass.dtx}{2ekernel,tracerollback}
\from{ltkeys.dtx}{2ekernel} % L3 layer module
\from{ltfilehook.dtx}{2ekernel} % L3 layer module
\from{ltshipout.dtx}{2ekernel} % L3 layer module
\from{ltoutput.dtx}{2ekernel}
\from{lttagging.dtx}{2ekernel}
\from{ltfinal.dtx}{2ekernel}}
\file{tracefnt.sty}{%
\from{ltfsstrc.dtx}{package,trace}}
Expand Down

0 comments on commit c1eedbc

Please sign in to comment.