wjschne / apaquarto

A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats
https://wjschne.github.io/apaquarto/
Creative Commons Zero v1.0 Universal
170 stars 15 forks source link

Wrong numbering when using complex tables captions #85

Closed filippogambarota closed 2 months ago

filippogambarota commented 2 months ago

Related to #84, When trying to insert two tables as:

:::{#tbl-mytable apa-note="This is a note."}

```{r}
# code for table

Complex caption $(n = 20)$ :::


The numbering is Table 1 for the first one and Table 3 for the second one. Below a reproducible example (output in pdf):

Section 1

:::{#tbl-mytable1 apa-note="This is a note."}

library(flextable)
flextable(iris[1:5, ])

Complex caption $(n = 20)$ :::

:::{#tbl-mytable2 apa-note="This is a note."}

library(flextable)
flextable(iris[1:5, ])

Complex caption $(n = 20)$ :::


The same code in a standard Quarto document works correctly.
wjschne commented 2 months ago

This is a more general problem with all tables that use the longtable package. It appears to be a result of a change in longtable such that the table counter is used differently. I will need to figure this out.

wjschne commented 2 months ago

I think it is fixed now. Let me know.

filippogambarota commented 2 months ago

great! thank you!

On Sun, 1 Sept 2024 at 15:22, W. Joel Schneider @.***> wrote:

I think it is fixed now. Let me know.

— Reply to this email directly, view it on GitHub https://github.com/wjschne/apaquarto/issues/85#issuecomment-2323338830, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6HXUMVRR7V4V5XQYPKGFDZUMIKHAVCNFSM6AAAAABNL2555SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRTGMZTQOBTGA . You are receiving this because you authored the thread.Message ID: @.***>

-- Filippo Gambarota, PhD Postdoctoral Researcher - University of Padova Department of Developmental and Social Psychology Website: filippogambarota.github.io Research Groups: Psicostat https://psicostat.dpss.psy.unipd.it/