Conditionally attach MathJax libraries and markup

Created on 27 November 2018, over 5 years ago
Updated 5 June 2024, 21 days ago

Problem/Motivation

If enabled, Mathjax text filter always adds <div class="tex2jax_process">$text</div> wrapper as well as the mathjax libraries.

This is necessary in case text contains latex formulas, but it could be avoided in case the text has no latex formulas.

Proposed resolution

We could implement a simple check whether mathjax delimiters exist in the content and if not - do not apply any mathjax libraries or markup.

✨ Feature request
Status

Needs work

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024