Can I query the MathDocument options from the global MathJax object?

20 views
Skip to first unread message

Christian Lawson-Perfect

unread,
Jul 5, 2021, 5:04:56 AM7/5/21
to MathJax Users
In MathJax v2, I can look at `MathJax.Hub.config.tex2jax.skipTags` to get the list of tags that the input jax will skip over.

I can't see from the v3 docs how to get the possibly-default value of a config option. It looks like MathJax.config only contains options I've set myself, plus a few others. Is this something that hasn't been done yet in v3? I feel like I'll eventually find what I want in `MathJax._`, but it's very hard to track back from the place I found the default options in the source to where they might be in that object.

Davide Cervone

unread,
Jul 5, 2021, 7:06:35 AM7/5/21
to mathja...@googlegroups.com
If you are using MathJax components (rather than loading MathJax modules directly), you can use

MathJax.startup.document.options

to get the options currently in effect for the MathDocument.  You can get the input options from

MathJax.startup.document.inputJax[0].options

(or from inputJax[1], etc.), and the output options from

MathJax.starutp.document.outputJax.options

though some of these options may be split out to go to other components.  E.g., the options for TeX tags are split out and applied to the tagging object instead.

Does that get you want you need?

Davide


On Jul 5, 2021, at 5:04 AM, Christian Lawson-Perfect <christia...@gmail.com> wrote:

In MathJax v2, I can look at `MathJax.Hub.config.tex2jax.skipTags` to get the list of tags that the input jax will skip over.

I can't see from the v3 docs how to get the possibly-default value of a config option. It looks like MathJax.config only contains options I've set myself, plus a few others. Is this something that hasn't been done yet in v3? I feel like I'll eventually find what I want in `MathJax._`, but it's very hard to track back from the place I found the default options in the source to where they might be in that object.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/CAEMHSOhoNJj1hr1c79q1nHCkhWb9mtD2Czrh-ABs%3DMGGvACzaQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages