Skip to content

LaTeX math syntax interpreted as Markdown in IPython notebooks

In a Jupyter/IPython notebook, Markdown syntax seems to be applied even in dollar-enclosed LaTeX math expressions, which then fail to be recognized as such. For example,

It has intersection numbers $p^1_{11} = 0, p^2_{22} = 3$.

is rendered as

gitlab-20170906

when it should look like

jupyter-20170906

A notebook illustrating the issue (the same as for #31910 (closed)) is available at

Also, I've noted some more problems:

  • LaTeX math is not rendered in titles (i.e., lines starting with one or more #)
  • The presence of the \operatorname command in LaTex math makes the entire block disappear
  • Backslashes are doubled in both inline code and Markdown code blocks (but not in IPython code cells)

Note that the behavior seems to have changed since #30900 (closed) has been fixed (before, the math was rendered, making the <em> tags visible).

Edited by Toon Claes