Mkdocs Development Notes

Math Block

Two things to notice here,

  1. The identifier $$ for math blocks has to be on a separate new line, which mean in the plain text, you have to skip a line after the current paragraph, and also skip a line before you start the new paragraph. Or else, the math block will be regarded as paragraph texts.
  2. The \boldsymbol operator is not supported by the default MathJax configuration. Use the following file mathjax.js in javascripts folder. Two additional lines are added.
window.MathJax = {
  tex: {
    inlineMath: [["\\(", "\\)"]],
    displayMath: [["\\[", "\\]"]],
    processEscapes: true,
    processEnvironments: true,
    packages: {'[+]': ['boldsymbol']}
  },
  options: {
    ignoreHtmlClass: ".*|",
    processHtmlClass: "arithmatex"
  },
  loader: {load: ['[tex]/boldsymbol']}
};

document$.subscribe(() => { 
  MathJax.typesetPromise()
})
Yiming Zhang
Yiming Zhang
Quantitative Researcher Associate, JP Morgan