Inconsistent table numbering - HTML vs. PDF #13063
Replies: 2 comments 3 replies
-
I don't know what your understanding of The LaTeX package As a result, it is hard for Quarto documents to work well with
In general, if you're not sure it's a bug, we ask you to open a discussion first. I'll move this to a discussion and we can take it from there. |
Beta Was this translation helpful? Give feedback.
-
Let's look at the first code cell in isolation. 13063.qmd
keep-md output: 13063.pdf.md
The issue, as I suspected, is that In this case, Quarto does the right thing (not emitting a surrounding But if you use 13063-b.qmd
keep-md output: 13063-b.pdf.md
Note the In simple settings, Quarto actually attempts to detect |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have:
Bug description
I am using Quarto with R to generate a large annual report based on long-term monitoring data. The report was drafted in Quarto beginning in 2022, and has been used ever since with minor script updates and tweaks to account for changes in wording, clarity, function deprecation, etc.
Last week I ran this year's report, and a colleague noted that a series of tables were misnumbered. That section's R script includes a labeled table followed by a series of unlabeled tables before another labeled table. This was done to prevent any one table in the first sequence from being split across pages (i.e., explicitly formatting two tables per page). So, the labeled tables jump from Table 2 to Table 8 (instead of Table 2 and then Table 3).
I reviewed previous reports (e.g., 2024, 2023), and those unlabeled tables were present with no breaks in the labeled-table number sequence.
I tried downgrading to past versions of
officer
andflextable
, as well as testing with previous, current, and pre-release versions ofQuarto
. The behavior remains the same - unnumbered tables are increasing the table counter for labeled table for PDF but not for HTML. I updated Pandoc and Tinytex as well.I read some discussions/issues on various messages boards and repositories that suggested it may be specifically related to
flextable
and something related to 'table' vs. 'longtable' float. However, that's where my knowledge base begins to drop off. Additionally, the behavior appears to persist when usingkable
. Reviewing the intermediate .tex file {longtable} appears for allflextable
andkable
tables.I note old issues/discussions about this and recall a comment about a fix in v1.3 or 1.4. So, I'm not sure if this is a recent regression or I just have something crazy happening on my end that's beyond my scope of understanding. It is entirely possible that I don't understand how 'longtable' operates, and that I could simply call all 10 tables in that series at once and they will be formatted correctly across pages.
Apologies if this is not a but or not related to Quarto, and I appreciate any thoughts, input, or comments.
Steps to reproduce
Actual behavior
Unlabeled tables are increasing the table counter, breaking the number sequence for labeled tables - but only when rendering to PDF.
Expected behavior
Numbering sequence is unbroken for labeled tables, despite inclusion of unlabeled tables. This expected behavior was the case for past PDF documents.
Your environment
RStudio 2025.05.0+496 "Mariposa Orchid" Release (f0b76cc00df96fe7f0ee687d4bed0423bc3de1f8, 2025-05-04) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2025.05.0+496 Chrome/132.0.6834.210 Electron/34.5.1 Safari/537.36, Quarto 1.8.16 (C:/Users/Michael.Schram/AppData/Local/Programs/Quarto/bin/quarto.exe)
Quarto check output
Beta Was this translation helpful? Give feedback.
All reactions