Open kelliemac opened 1 month ago
Thanks for the report!
It works correctly for me if I remove html-table-disable-processing: none
from the front matter
https://quarto.org/docs/authoring/tables.html#disabling-quarto-table-processing
---
format: html
---
```{r}
library(gt)
library(tidyverse)
head(mtcars) |>
gt() |>
tab_header(md('**mtcars** dataset'),
md('Testing a math formula: $e^{i \\pi}+1 = 0$'))
Since you may need to disable processing for some tables, but not for others, I suggest you use it as a chunk option.
Or `tab_options(quarto.disable_processing = TRUE)`
![image](https://github.com/user-attachments/assets/ee2ac86a-47c4-4057-9ce6-a337f37abe7c)
i.e.
````qmd
---
format: html
---
```{r}
library(gt)
library(tidyverse)
head(mtcars) |>
gt() |>
tab_header(md('**mtcars** dataset'),
md('Testing a math formula: $e^{i \\pi}+1 = 0$'))
#| html-table-processing: none
gt(mtcars)
Prework
Description
Math equations in gt headings and subheading are not displaying properly when rendering qmd files to html.
Reproducible example
The following is in a .qmd file:
R version 4.4.0 (2024-04-24) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.5
Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Los_Angeles tzcode source: internal
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[5] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[9] ggplot2_3.5.1 tidyverse_2.0.0 gt_0.11.0
loaded via a namespace (and not attached): [1] katex_1.4.1 jsonlite_1.8.8 gtable_0.3.5
[4] compiler_4.4.0 Rcpp_1.0.13 tidyselect_1.2.1 [7] xml2_1.3.6 scales_1.3.0 fastmap_1.2.0
[10] R6_2.5.1 commonmark_1.9.1 generics_0.1.3
[13] curl_5.2.1 knitr_1.48 munsell_0.5.1
[16] pillar_1.9.0 tzdb_0.4.0 rlang_1.1.4
[19] V8_4.4.2 utf8_1.2.4 stringi_1.8.4
[22] xfun_0.46 sass_0.4.9 timechange_0.3.0 [25] cli_3.6.3 withr_3.0.1 magrittr_2.0.3
[28] digest_0.6.36 grid_4.4.0 rstudioapi_0.16.0 [31] markdown_1.13 hms_1.1.3 lifecycle_1.0.4
[34] vctrs_0.6.5 glue_1.7.0 fansi_1.0.6
[37] colorspace_2.1-1 tools_4.4.0 pkgconfig_2.0.3
[40] htmltools_0.5.8.1