Skip to content

Render math formula for the table of contents #1137

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

A-moment096
Copy link

Just a minor fix about the math render for table of contents.

From the most recent release, #1103 introduced a change to restrict the math render region from the whole document to the element ".main-article". This enables LaTeX rendering provided by comment systems.

However, this prevents rendering of math formulae in the table of contents. So a quick fix can be just add the toc elements into the render list. Maybe in the furture some others can add their math-living elements to be rendered in that list as well.

Here's a comparsion between changing it or not.

Before: After:
image image

Hope this can help someone writes math formulae in (sub)titles as well!

Add element (.widget--toc) to be rendered by KaTeX
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.

1 participant