-
Notifications
You must be signed in to change notification settings - Fork 209
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 Position Argument not used in qmd #1853
Comments
Noted to add this doesn't get removed in Rmd. |
Does the following work as expected? ---
title: "gt latex examp"
format:
pdf:
keep-tex: true
header-includes:
- \usepackage{booktabs}
- \usepackage{caption}
- \usepackage{longtable}
- \usepackage{colortbl}
- \usepackage{array}
- \usepackage{anyfontsize}
- \usepackage{multirow}
---
## Example code
```{r}
#| label: make-table
library(gt)
# Modify the `airquality` dataset by adding the year
# of the measurements (1973) and limiting to 10 rows
airquality_m <-
airquality |>
dplyr::mutate(Year = 1973L) |>
dplyr::slice(1:10)
# Create a display table using the `airquality`
# dataset; arrange columns into groups
gt_tbl <-
gt(airquality_m)
```
```{r}
#| label: tbl-print
#| tbl-pos: "h!"
gt_tbl
```
|
Unfortunately, this doesn't work. The position parameter is not in the tex file. |
|
Prework
Description
I am using the most recent development version of gt which includes an argument in tab_options() for latex.tbl.pos. It works interactively but when I use in qmd, the position argument is no longer there.
Reproducible example
Here's a simple qmd document.
The table rendered in the .tex code is:
Running in R rather than qmd yields the following:
Created on 2024-08-21 with reprex v2.1.0
Session info
Expected result
In the tex file, I would expect to see the same exact lines as when running in .R.
Session info
End the reproducible example with a call to
sessionInfo()
in the same session (e.g.reprex(session_info = TRUE)
) and include the output.The text was updated successfully, but these errors were encountered: