Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagging support for array, tabularx, and longtable #1209

Merged
merged 62 commits into from
Feb 9, 2024
Merged

Conversation

FrankMittelbach
Copy link
Member

@FrankMittelbach FrankMittelbach commented Dec 16, 2023

Internal housekeeping

Status of pull request

  • Ready for merging (further development and cleanup later)

Checklist of required changes before merge will be approved

  • Test file(s) added
  • Version and date string updated in changed source files
  • Relevant \changes entries in source included
  • Relevant changes.txt updated
  • Rollback provided (if necessary)?
  • ltnewsX.tex (and/or latexchanges.tex) updated

base/lttagging.dtx Show resolved Hide resolved
base/lttagging.dtx Show resolved Hide resolved
base/lttagging.dtx Outdated Show resolved Hide resolved
base/lttagging.dtx Show resolved Hide resolved
base/lttagging.dtx Outdated Show resolved Hide resolved
base/lttagging.dtx Show resolved Hide resolved
base/lttagging.dtx Show resolved Hide resolved
base/lttagging.dtx Show resolved Hide resolved
required/tools/array.dtx Show resolved Hide resolved
@@ -2486,11 +2766,41 @@
% =\@array=. To save \textsf{token} space we then redefine
% =\@preamble=
% because its replacement text isn't longer needed.
%
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $ around 20 lines above should be surrounded by something like \FakeMathStart$\FakeMathStop to avoid that it triggers math tagging. The commands can be defined as dummies (in lttagging.dtx?) and the math code can then redefine them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to talk about that suggested fakemath interface, I think it is wrong, but that isn't for this pull.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really good if there were directly an interface (can be internal) to suppress the math grabbing here. Otherwise it is hard to tag math inside tabulars (one has to disable it outside the tabular and reenable it in every cell) and I need that for the larger math example ... (also it would resolve an open issue with tabularx).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I can't put anything in that is only in your private version of tagpdf, because if that then goes out as latex-dev it will blow up. Anway, in my opinion the interface should just say \FakeMathStart hiding the $ inside (and whatever is necessary to ensure that inner math is still grabbed and tagged --- which may be nothing if the command is protected)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry? There is nothing about this in my private tagpdf. We simply need here something that allows us to say "this $ should not do math grabbing" and does not affect following math.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not in your tagpdf but in your branch for math coding which is not released

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why should it blow up? I only asked that there is something around the dollar which does nothing by default but can be redefined by the math code to suppress the math grabbing in this place.

# Conflicts:
#	required/latex-lab/testfiles-table-luatex/table-000.tlg
#	required/latex-lab/testfiles-table-pdftex/table-000.tlg
#	required/latex-lab/testfiles/documentmetadata-support-000.luatex.tlg
#	required/latex-lab/testfiles/documentmetadata-support-000.tlg
#	required/latex-lab/testfiles/documentmetadata-support-001.luatex.tlg
#	required/latex-lab/testfiles/documentmetadata-support-001.tlg
#	required/latex-lab/testfiles/documentmetadata-support-002.luatex.tlg
#	required/latex-lab/testfiles/documentmetadata-support-002.tlg
# Conflicts:
#	required/tools/changes.txt
# Conflicts:
#	required/latex-lab/testfiles-table-luatex/table-004-tabularx.tlg
#	required/latex-lab/testfiles-table-luatex/table-005.tlg
#	required/latex-lab/testfiles-table-luatex/table-006-longtable.tlg
#	required/latex-lab/testfiles-table-luatex/table-007-longtable.tlg
#	required/latex-lab/testfiles-table-luatex/table-008-multi.tlg
#	required/latex-lab/testfiles-table-luatex/table-009.tlg
#	required/latex-lab/testfiles-table-pdftex/table-004-tabularx.tlg
#	required/latex-lab/testfiles-table-pdftex/table-005.tlg
#	required/latex-lab/testfiles-table-pdftex/table-006-longtable.tlg
#	required/latex-lab/testfiles-table-pdftex/table-007-longtable.tlg
#	required/latex-lab/testfiles-table-pdftex/table-008-multi.tlg
#	required/latex-lab/testfiles-table-pdftex/table-009.tlg
# Conflicts:
#	base/changes.txt
#	required/tools/changes.txt
Copy link
Member

@davidcarlisle davidcarlisle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got to end of longtable.dtx (only made doc comments) out of time this morning but will pick up from here, but pushing these comments now

base/doc/ltnews39.tex Outdated Show resolved Hide resolved
base/doc/ltnews39.tex Outdated Show resolved Hide resolved
@@ -342,6 +342,8 @@

\DocInclude{ltoutput} % Output routine

\DocInclude{lttagging}% Tagging support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an issue for this PR but since we went past a-z-A-Z for source2e files, the sorting of files in the code index is off as a-zA-Zaa-zz doesn't work with the current makeindex style.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, good point. Could you open a separate pr that this should be looked at at some point?

required/latex-lab/latex-lab-table.dtx Outdated Show resolved Hide resolved
required/latex-lab/latex-lab-table.dtx Show resolved Hide resolved
required/tools/longtable.dtx Outdated Show resolved Hide resolved
% them up as artifact with the exception of the head at the begin and
% the foot box at the end.
%
% TODO: When a line is killed the structure subtree is there already
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is hard to do in this release should we make \LT@kill warn that tagging may (will?) have duplicated structure?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, maybe , but it is probably not too hard for @u-fischer ... we'll see. I added a further note.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, not easy. Currently \kill (with table-tagging) errors, and if I avoid the error it doesn't kill the row (don't know why). And if that problem can be resolved: getting tagging right is not trivial either, it would probably require some label and an additional counter to keep track on the rows that should be ignored. I'm inclined to make that a simply error with "sorry not supported with tagging".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess part of the problem is that it acts "after the fact" so to speak. That means one would basically either wait with a lot of things to see what comes at the end of a row or maybe record the fact that there was a kill in row X and next time around do the killing properly.
Instead if this we could perhaps have a \killstart command to be added at the beginning of the row which would tell the tagging what's up. That would still mean some manual work with such documents but at least the functionality could be preserved.

Perhaps @davidcarlisle has some thoughts?

In a first version, just stating that this doesn't work with tagging is certainly ok.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest same, whether \xkill ..... \\ would be easier so that knew up front that this was a killed row. Can you handle \kill in the kernel tabbing ? (on which the longtable version was based)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we can't do tabbing yet, but the problem with tabbing is also to figure out first how that should be tagged in general.

required/tools/longtable.dtx Outdated Show resolved Hide resolved
@davidcarlisle davidcarlisle self-requested a review February 8, 2024 22:00
@FrankMittelbach FrankMittelbach merged commit c1eedbc into develop Feb 9, 2024
78 checks passed
@FrankMittelbach FrankMittelbach deleted the array branch March 11, 2024 14:19
jlaurens pushed a commit to jlaurens/latex2e that referenced this pull request Jun 6, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants