- Notifications
You must be signed in to change notification settings - Fork218
Open
Labels
Description
Prework
- [x ] Read and agree to thecode of conduct andcontributing guidelines.
- [x ] If there isalready a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
Description
When trying to export a quarto document with agt which includes a markdown-formatted list to pdf,
Reproducible example
In Rstudio, create the following quarto document, and export to pdf:
---format: pdf---```{r}library(gt)data.frame("A" = "- ABCD\n\n- EFG") |> gt() |> fmt_markdown()```Save file and hit "Render". I get the following error during render:
Rendering PDFrunning lualatex - 1 This is LuaHBTeX, Version 1.17.0 (TeX Live 2023) restricted system commands enabled. updating tlmgrupdating existing packagesERROR: compilation failed- errorLaTeX Error: Something's wrong--perhaps a missing \item.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help. ... l.231 \item A BCDExpected result
I would expect something like this to be generated in the pdf output:

Session info
> sessionInfo()R version 4.5.1 (2025-06-13)Platform: x86_64-pc-linux-gnuRunning under: Linux Mint 21.3Matrix products: defaultBLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0 LAPACK version 3.10.0locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 LC_MONETARY=en_CA.UTF-8 [6] LC_MESSAGES=en_CA.UTF-8 LC_PAPER=en_CA.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C time zone: America/Torontotzcode source: system (glibc)attached base packages:[1] stats graphics grDevices utils datasets methods base other attached packages:[1] gt_1.1.0loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.4 knitr_1.50 rlang_1.1.6 xfun_0.52 generics_0.1.3 litedown_0.7 glue_1.8.0 [9] markdown_2.0 htmltools_0.5.8.1 sass_0.4.10 rmarkdown_2.29 evaluate_1.0.3 tibble_3.2.1 fastmap_1.2.0 yaml_2.3.10 [17] lifecycle_1.0.4 compiler_4.5.1 dplyr_1.1.4 fs_1.6.6 pkgconfig_2.0.3 rstudioapi_0.17.1 digest_0.6.37 R6_2.6.1 [25] tidyselect_1.2.1 pillar_1.10.2 commonmark_2.0.0 magrittr_2.0.3 tools_4.5.1 withr_3.0.2 xml2_1.4.0EDIT: changing header to:
format: pdf: # Change to appropriate LaTeX template include-in-header: - text: \usepackage{booktabs, caption, longtable, colortbl, array}as recommended in the documentation (https://gt.rstudio.com/reference/as_latex.html?q=pdf) does not affect the error.