Closed atchley-sha closed 9 months ago
thanks for the report and the insight, we will try to fix
I'm not sure how to deal with this problem. It only happens with Quarto and not with 'R Markdown'.
Quarto doesn't seem to detect the structure as 'R Markdown' does.
The impact of changing from the 'longtable' environment to 'tabular' (if it works) only for quarto is quite substantial in terms of time. When I tried to test the dev version, I also noticed that PDF captions no longer worked and that an error appeared even without specifying a floating type.
So we will wait for a new stable release of quarto and adapt as we can when the new version will be ready.
This issue can be closed, it is now working as expected with Quarto 1.4.549
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.
When setting
float = "float"
in eitherset_flextable_defaults()
orset_table_properties(opts_pdf = list())
in a Quarto document, flextable sets the table in alongtable
environment within atable
environment. My understanding is thatlongtable
is not intended to float (see e.g. https://tex.stackexchange.com/a/266698), and so this should likely betabular
or something similar.The tables do seem to float correctly despite this, but the auto-numbering captions skip numbers, I assume because LaTeX sees two "tables" per flextable, one with
table
(captioned) and another withlongtable
(uncaptioned).E.g.:
produces:
and
I believe this numbering issue would be fixed using
tabular
or something similar with floating tables, as this is how e.g.kableExtra
does it and the numbering works fine there.sessionInfo():
This also occurs with the current CRAN version of
flextable
(0.9.3)