sphinxcontrib-jupyter icon indicating copy to clipboard operation
sphinxcontrib-jupyter copied to clipboard

[Bug] Fragile math during `notebook` to `html` conversion

Open mmcky opened this issue 4 years ago • 1 comments

If math blocks contain + or - then the $$ environment is not being respected during the conversion from ipynb to html and gets interpreted incorrectly.

Example:

.. math::
    :label: firm_dynam_ee

    s_{t+1} = e_{t+1} \mathbb{1}\{s_t < \bar s\} 
       +  (a_{t+1} s_t + b_{t+1}) \mathbb{1}\{s_t \geq \bar s\}

This is a known issue of nbconvert

https://github.com/jupyter/nbconvert/issues/404

mmcky avatar Dec 17 '19 03:12 mmcky

one option would be to remove all newlines from the source text of the math node when writing to a notebook (when targeting html)

mmcky avatar Dec 17 '19 03:12 mmcky