Repository navigation
Closed
Labels
Description
test.Rmd
---
title: test
output:
html_document:
pandoc_args: "--mathml"
---
$ax^2+bx+c$I can't get MathML to work with rmarkdown. No matter what I try, I always end up with:
<p><span class="math inline">\(ax^2+bx+c\)</span></p>Everything works fine if I use pandoc on a regular markdown file:
test.md
$ax^2+bx+c$and I get the correct output (with the command pandoc test.md -o test.html -s --mathml --metadata pagetitle="test")
<p><math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mi>b</mi><mi>x</mi><mo>+</mo><mi>c</mi></mrow><annotation encoding="application/x-tex">ax^2+bx+c</annotation></semantics></math></p>My guess it that MathML support is not (yet?) present in rmarkdown so this is a feature request.
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.org/issue/.
- I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included
xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rmarkdown'). - If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.6 LTS, RStudio 1.2.5001
Locale:
LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=en_US.UTF-8
LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C
LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
Package version:
base64enc_0.1.3 digest_0.6.23 evaluate_0.14 glue_1.3.1 graphics_3.6.1 grDevices_3.6.1 highr_0.8
htmltools_0.4.0 jsonlite_1.6 knitr_1.26 magrittr_1.5 markdown_1.1 methods_3.6.1 mime_0.7
Rcpp_1.0.3 rlang_0.4.2 rmarkdown_1.18 stats_3.6.1 stringi_1.4.3 stringr_1.4.0 tinytex_0.17
tools_3.6.1 utils_3.6.1 xfun_0.11 yaml_2.2.0
Pandoc version: 2.4
Reacted by Yihui Xie
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Bisaloo commentedon Dec 6, 2019
I got it to work with
Feel free to close this issue if you think this is enough as far as MathML support is concerned in your opinion.
It would be great if passing the
--mathmlarg automatically removed mathjax internally though.yihui commentedon Dec 6, 2019
This is a perfectly fine feature request. I definitely agree that we shouldn't only support MathJax. I'll see what I can do. Thank you!
atusy commentedon Oct 31, 2020
I opened PR #1940 to solve this.
cderv commentedon Jan 25, 2022
@Bisaloo we have PR #1940 ready to test. You can install using
You should be able to set
And it should work as expected.
github-actions commentedon Aug 2, 2022
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.