goessner / microjam

A minimalistic Jamstack approach for creating GitHub-Pages hosted sites.
https://goessner.github.io/microjam/
MIT License
44 stars 5 forks source link

math not working in VSCode markdown preview #6

Closed goessner closed 4 years ago

goessner commented 4 years ago

microjam does not load math plugin markdown-it-texmath, when

This affects only the markdown preview in VSCode. Resulting HTML works as expected.

goessner commented 4 years ago

This effect occurs, when a single markdown file is loaded into VSCode, in contrast to have the corresponding workspace folder opened.

As it is not unusual, to simultaneously edit several markdown files from possibly different workspaces, that faulty scenario is considered a normal one.

So in order to enable math in microJam, a user is recommended to add

`File > Preferences > Settings > Extensions >microjam > edit in settings.json

"microjam.markdownItPlugins": {
    "markdown-it-texmath": {
        "engine": "katex",
            "delimiters": "dollars",
            "macros": {"\\RR": "\\mathbb{R}"}
    }
}

this is from now on the user dependent global math setting.