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

fix(html-template)!: load header-includes before math for MathJax config #7833

Merged
merged 1 commit into from
Jan 14, 2022
Merged

fix(html-template)!: load header-includes before math for MathJax config #7833

merged 1 commit into from
Jan 14, 2022

Conversation

ickc
Copy link
Contributor

@ickc ickc commented Jan 14, 2022

MathJax expect the config comes before loading the MathJax script.
This change of order allows one to config MathJax via header-includes,
which loads before the MathJax script.

This potentially is a breaking change.
However, the only other kind of math supported by pandoc that is configurable
seems to be katex, and according to
src/Text/Pandoc/Writers/HTML.hs
the way it is configured is hard-coded (katex doesn't seem to offer
MathJax style config that is independent of loading MathJax.)
So it seems it is safe to change this order without breaking
others' documents.

c.f. #2750

Edit: see https://docs.mathjax.org/en/latest/web/configuration.html#configuration-using-an-in-line-script
for the doc to config MathJax.

MathJax expect the config comes before loading the MathJax script.
This change of order allows one to config MathJax via header-includes,
which loads before the MathJax script.

This potentially is a breaking change.
However, the only kind math supported by pandoc that is configurable
seems to be katex, and according to
src/Text/Pandoc/Writers/HTML.hs
the way it is configured is hard-coded (katex doesn't seem to offer
MathJax style config that is independent of loading MathJax.)
So it seems it is safe to change this order without breaking
others' documents.

c.f. #2750
@ickc ickc mentioned this pull request Jan 14, 2022
@ickc ickc marked this pull request as ready for review January 14, 2022 02:25
@jgm jgm merged commit ed2ab2e into jgm:master Jan 14, 2022
@jgm
Copy link
Owner

jgm commented Jan 14, 2022

looks like a good idea!

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

Successfully merging this pull request may close these issues.

2 participants