-
Notifications
You must be signed in to change notification settings - Fork 81
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
LaTeX table with lot have duplicate List of Table entry #534
Comments
Are there any updates on this issue? |
@faaa6 No, otherwise the issue would have been updated |
The accepted solution for this problem when using LaTeX files, described in multiple SE posts, e.g., here, is to provide separate sets of code for the header of the first page of a longtable and for the header of the subsequent pages, using, for the subsequent pages, a MWE in LaTeX that demonstrates the problem:
Result: Duplicate captions in the document’s List of Tables. Solution: Uncommenting the four commented-out lines removes the duplicate(s). It would be very welcome if this solution could be applied to the mechanism for generating LaTeX longtables in flextable. |
Many thanks for looking into this. The duplicate entries in the list of ’List of Tables’ of a latex/pdf document have indeed disappeared. However, it seems that you chose not to include I would have preferred to leave everything as it is – with the exception of the erroneously repeated entries in the ’List of Tables’, of course –, i.e., keep repeating the caption on each page of the table. One could certainly think about making captions even more flexible, i.e. providing an option to activate or deactivate them on subsequent pages, or adding a string like "(continued)" to a caption on pages after the first - but that wasn't my main concern at the moment. |
What’s more: When using MWE: .Rmd file using slightly modified example from https://davidgohel.github.io/flextable/reference/separate_header.html
As far as the intermediate latex file is concerned, the problem seems to lie in repeated Excerpt (only from the [unique]
|
thanks @njbart, apologies, I should have test... The bug is fixed now.
OK, I did not realize that captions were repeated on each PDF page - I understand this is a change and should be fixed
probably related to #394. I can't figure out how the user should specify such an option, any suggestion is welcome |
Thanks, no problem. I can confirm that multi-row table headers generated by |
For enabling or disabling captions on subsequent pages I could imagine a new argument for |
@njbart it should be fixed now - again! |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary. |
Just opening an issue to document and track the "issue". This was first reported at quarto-dev/quarto-cli#5093
Example with rmarkdown
As explained in quarto-dev/quarto-cli#5093 (comment) this is a LaTeX thing with
longtable
splitting table, and having\caption
duplicated on each page. They are all picked up by\listoftables
See both
Solution for this seems to be something like using
\caption[]{caption}
in the right place, in addition of the first header caption so that other header caption are not picked up. (\caption*{}
for unnumbered).Not sure if this should be implemented, but could be an option. I believe this is an issue with any R package using
longtable
though.Note the Pandoc specifically deactivated the repetition of caption in the split table - only one at the first table, and so only one table link in the LOT.
https://github.com/jgm/pandoc/blob/ce4e4d2c84f0c5c9b92f67b087fed58b760f0b05/src/Text/Pandoc/Writers/LaTeX/Table.hs#L53-L57
The text was updated successfully, but these errors were encountered: