Skip to content
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

Rd math rendering is broken in pkgdown 2.1.0 #2775

Closed
bastistician opened this issue Sep 8, 2024 · 1 comment
Closed

Rd math rendering is broken in pkgdown 2.1.0 #2775

bastistician opened this issue Sep 8, 2024 · 1 comment

Comments

@bastistician
Copy link
Contributor

Unfortunately, since pkgdown 2.1.0, Rd math like \eqn{f_r(r)} is only displayed as raw \(f_r(r)\) in the browser.
Compare, for example:

https://recipes.tidymodels.org/reference/step_harmonic.html#details (built with pkgdown 2.0.9)
https://recipes.tidymodels.org/dev/reference/step_harmonic.html#details (built with pkgdown 2.1.0)

This is related to the following major change in pkgdown 2.1.0:

A workaround is to include

template:
  math-rendering: mathjax

in the pkgdown config.

I guess the issue is that, e.g., pkgdown:::as_html.tag_eqn() simply wraps the equation in \( ... \), suitable for MathJax, but the new default engine, MathML, does not handle LaTeX syntax directly but requires special XML markup.

@bastistician
Copy link
Contributor Author

Sorry for the noise: I just realized this is a duplicate of #2704.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant