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: top-level chunk ignores --mathjax #8915

Closed
jeffgerickson opened this issue Jun 20, 2023 · 1 comment
Closed

chunkedhtml: top-level chunk ignores --mathjax #8915

jeffgerickson opened this issue Jun 20, 2023 · 1 comment
Labels

Comments

@jeffgerickson
Copy link

jeffgerickson commented Jun 20, 2023

Explain the problem.
pandoc -t chunkedhtml --mathjax does not enable MathJax on the top-level chunk. MathJax is correctly enabled in later chunks, but any latex math in section titles appears as plain text in the top-level table of contents. See the screen shots below.

Pandoc version:
pandoc 3.1.3, MacOS, freshly installed from .dmg

Exact command:
pandoc -t chunkedhtml --split-level=1 --toc --toc-depth=2 --mathjax -o Test test.md

Contents of test.md:

---
title: This is a Test
author: Testy McTestface
---
# This is $\alpha$ test.

## This is only a test: $e^{\pi i} + 1 = 0$.

Lorem ipsum dolor sit amet, consectetur adipiscing elit $e^{\pi i} + 1 = 0$. Maecenas at risus eu ligula tincidunt consectetur. Vestibulum nulla leo, vulputate ut arcu laoreet, maximus tempor ipsum. Duis tempor convallis diam, a hendrerit ante finibus et.

## Only this is a $\textsf{test}$.

Vivamus tempus est vitae erat ullamcorper rutrum. Integer porttitor dolor et augue pretium tempus. Donec nec lacinia enim. Integer at nisi porta, feugiat turpis id, venenatis enim. Suspendisse sit amet tristique risus, ac pharetra quam.

# This only is $\mathbb{A}$ test.

Etiam id fringilla $\textsf{lectus}$, nec hendrerit nulla. $\textbf{Pellentesque}$ fermentum eget massa vel consectetur. Morbi a enim $\textit{scelerisque}$, fringilla nunc a, volutpat ex. Praesent ac tincidunt purus. Nullam commodo dapibus nunc, vulputate convallis mi semper vitae. 

## Thi$\int$ i$\int$ a te$\int$t only.

Quisque non lobortis mi. Pellentesque eleifend libero ullamcorper eleifend rutrum. Donec rutrum, tortor vehicula bibendum facilisis, massa sapien posuere sapien, et congue quam purus at lorem.

# This is also a $\tau$esτ.

Sed maximus mattis nisi vel rutrum. Ut tempor, neque et tincidunt volutpat, justo eros egestas quam, mattis malesuada sapien nunc eget eros. Aliquam at malesuada libero, sit amet maximus sem. Nullam lobortis eros non ex sollicitudin, ac porttitor tortor gravida.

Screenshot of top-level chunk:
image

Screenshot of typical later chunk:
image

@jeffgerickson
Copy link
Author

jeffgerickson commented Jun 20, 2023

This is potentially (at least tangentially) related to #8620. (I also experienced this bug with pandoc 3.0, but upgrading to pandoc 3.1.3 fixed it.)

@jgm jgm closed this as completed in 40dacad Jun 20, 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

1 participant