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

chunkedhtml: --mathjax is not working properly #8967

Closed
wolfganghammer opened this issue Jul 25, 2023 · 1 comment
Closed

chunkedhtml: --mathjax is not working properly #8967

wolfganghammer opened this issue Jul 25, 2023 · 1 comment
Labels

Comments

@wolfganghammer
Copy link

wolfganghammer commented Jul 25, 2023

Explain the problem.
pandoc -t chunkedhtml --mathjax does not enable MathJax reliably in all chunks.

Exact command:

pandoc -t chunkedhtml -s --mathjax -o MathTest MathTest.md

Contents of MathTest.md:

# Chapter

Math: $y = \int_0^t u(t) dt$

## Section

Math: $y = \int_0^t u(t) dt$

Pandoc version 3.1.4 through 3.1.6 (x86_64-macOS):
The resulting HTML file MathTest/1-chapter.html is lacking the <scipt> element to include the MathJax code. Hence, the math formulae are rendered as plain text.

Pandoc version 3.1.3 (x86_64-macOS):
MathTest/1-chapter.html is created correctly.

Further observation:
When you change a heading to include math (e.g. # Chapter $x$), Pandoc 3.1.4 through 3.1.6 also include the MathJax script. This was likely broken in 40dacad to fix #8620. Notice that the test document in this issue does contain math in all headings.

@jgm
Copy link
Owner

jgm commented Jul 25, 2023

Yes, that fix was buggy! I can see the problem at a glance.

@jgm jgm closed this as completed in c06b9ab Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants