Skip to content

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Oct 4, 2024

This fixes #10956

Pandoc's table are creating longtable environment containing a \endlastfoot which also have a \bottomrule

With our current process caption is made last element of the table, and footer comes after.

This PR changes it by catching any \endlastfoot and moving the caption as last element there if present.

Otherwise (\endlastfoot not present), it does as before.

Tests has been fixed (it was not really testing much before) and made as a smoke-all test.

It also includes a cross referenced table, which seems to work ok. I believe even if we do some processing in LUA for the tbl location, the post processing will apply anyway and move in the place decided by it.

cderv added 5 commits October 4, 2024 10:28
…n present in longtable environment

Pandoc's table are longtable environment with a `\endlastfoot` containing a line rule. Caption needs to be below this and so the last thing inside the table footer.

If not present, we keep placing table as last element of the longtable.
Copy link
Collaborator

@cscheid cscheid left a comment

Choose a reason for hiding this comment

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

table-captions-bottom.qmd is a great test, thanks.

@cscheid cscheid merged commit f42d191 into main Oct 4, 2024
47 checks passed
@cscheid cscheid deleted the fix/latex-table-caption-bottom branch October 4, 2024 18:24
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.

[LaTeX] Table caption appears within the longtable when tbl-cap-location is bottom

2 participants