LaTeX: Repeat caption of a table consistently. - #4623
Open
wilx wants to merge 1 commit into
Open
Conversation
wilx
force-pushed
the
master-tables-repeat-caption
branch
2 times, most recently
from
August 3, 2026 16:14
44b4314 to
e53b6b0
Compare
wilx
force-pushed
the
master-tables-repeat-caption
branch
2 times, most recently
from
August 22, 2026 18:08
130513e to
63d334d
Compare
Add a repeat-caption table class that repeats captions on each page of a longtable without adding duplicate list-of-tables entries. Preserve the existing non-repeating default and ignore the class for floating tables. Fixes jgm#4558.
wilx
force-pushed
the
master-tables-repeat-caption
branch
from
August 30, 2026 17:13
63d334d to
a327a2a
Compare
jgm
reviewed
Aug 31, 2026
Comment on lines
+196
to
+216
| else [ foot' | ||
| else (if hasBottomCaption && not (isEmpty repeatedCapt) | ||
| then [ repeatedFoot, "\\endfoot" ] | ||
| else []) <> | ||
| [ foot' | ||
| , "\\endlastfoot" | ||
| , vcat rows' | ||
| , vcat rows' |
Owner
There was a problem hiding this comment.
The repeated head is already incorporated in head', whereas the repeated foot isn't already incorporated in foot', and hence needs adding here. To me, this makes the logic less clear. It would be better to do it the same way in both places.
Note also that lns 211-13 could be simplified using guards:
[repeatedFoot, "\\endfoot" | hasBottomCaption && not (isEmpty repeatedCapt)]
jgm
reviewed
Aug 31, 2026
Comment on lines
+196
to
+216
| else [ foot' | ||
| else (if hasBottomCaption && not (isEmpty repeatedCapt) | ||
| then [ repeatedFoot, "\\endfoot" ] | ||
| else []) <> | ||
| [ foot' | ||
| , "\\endlastfoot" | ||
| , vcat rows' | ||
| , vcat rows' |
Owner
There was a problem hiding this comment.
The repeated head is already incorporated in head', whereas the repeated foot isn't already incorporated in foot', and hence needs adding here. To me, this makes the logic less clear. It would be better to do it the same way in both places.
Note also that lns 211-13 could be simplified using guards:
[repeatedFoot, "\\endfoot" | hasBottomCaption && not (isEmpty repeatedCapt)]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #4558.