8000 MathJax config · Issue #2750 · jgm/pandoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
MathJax config #2750
Closed
Closed
@ickc

Description

@ickc

Hi,

I want to have a custom setup of 5D7A MathJax, like this:

<script type="text/x-mathjax-config">
    MathJax.Ajax.config.path["Contrib"] = "https://cdn.mathjax.org/mathjax/contrib";
    MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
        MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
            cancel: ["Extension","cancel"],
            bcancel: ["Extension","cancel"],
            xcancel: ["Extension","cancel"],
            cancelto: ["Extension","cancel"]
        });
    });
    MathJax.Hub.Config({
        TeX: {
            equationNumbers: { autoNumber: "AMS"},
            extensions: ["[Contrib]/physics/physics.js", "[Contrib]/siunitx/siunitx.js"]
        }
    });
</script>

I tried to dig into the documentation and also search through the issues, but there seems to have no reference on it.

Note that according to MathJax, the setup has to come before the MathJax is loaded. So if I put the above code in the beginning of the Markdown file, and using pandoc --mathjax -s -o the mathjax is put in the head and hence the setup will comes after it.

So what's the best way to do this? Template? Are there any way to put something in the head of the html without touching the template? And are there any way to config the mathjax in addition to the link to cdn?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0