hackmdio / vscode-hackmd

The official HackMD VScode extension!
https://marketplace.visualstudio.com/items?itemName=HackMD.vscode-hackmd
MIT License
132 stars 14 forks source link

Consider support for MathJax Configuration #33

Open manifest opened 3 years ago

manifest commented 3 years ago

The support for MathJax Configuration will allow to use additional Latex packages and define custom macroses.

window.MathJax = {
  loader: {
    load: ['[tex]/tagformat']
  },
  startup: {
    pageReady: () => {
      alert('Running MathJax')l;
      return MathJax.startup.defaultPageReady();
    }
  },
  tex: {
    packages: {'[+]': ['tagformat']},
    tagSide: 'left',
    macros: {
      RR: '{\\bf R}',
      bold: ['{\\bf #1}',1]
    },
    tagformat: {
       tag: (n) => '[' + n + ']'
    }
  }
};