MathJax/MathML deprecation warnings

Open Beginner friendly
#3,035 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
r
Domain
documentation

Research direction

Start with the math-rendering option and the linked code in R/markdown.R around line 143, then check how pkgdown builds Pandoc command-line arguments. Update the deprecated MathML and MathJax options to the documented --math-method form while preserving support for the supported Pandoc versions. Done when builds no longer emit these deprecation warnings.

Written by the indexing model from the issue text.

Description

The current math-rendering option is based on the now deprecated pandoc options mathml and mathjax, and as such any builds using deprecation-marked versions of pandoc, especially of multiple files, will result in a potentially large number of unresolvable deprecation warnings, e.g. from a sandpaper build process

── Creating citation page ────────────────────────────────────────────────────────
! No yaml header found in the first 10 lines of CITATION.md
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `instructor/introduction-r-rstudio.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `introduction-r-rstudio.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `instructor/visualizing-ggplot.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `visualizing-ggplot.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `instructor/how-r-thinks-about-data.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
Writing `how-r-thinks-about-data.html`
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.
[WARNING] Deprecated: --mathml. Use --math-method=mathml instead.

https://github.com/r-lib/pkgdown/blob/f69b62a7e74b58b42170284b6f3f56c674e7a3f8/R/markdown.R#L143

The correct options for pandoc 3.11 and above are of the format --math-method=mathml or --math-method=mathjax: https://pandoc.org/demo/example33/3.6-math-rendering.html

Relevant pandoc options

Dominant language
R
Stars
777
Forks
361
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdown

All issues in r-lib/pkgdown

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.