cderv opened this issue 2 years ago · 0 comments
See rstudio/rmarkdown#2420
```{r} #| label: html-specific #| echo: false #| include: false #| eval: true latexString <- if (knitr::is_html_output()) { r"($\mathrm{\LaTeX{}}$)" } else { r"(\LaTeX{})" } ``` Then use `r latexString` in the text.