Skip to content

Maths environments converted as markdown --> rendering issues #160

@jfbercher

Description

@jfbercher

I have noticed the following with nbconvert 4.1.0:

  • Problem with double subscripts: try something like this in a markdown cell:
\begin{align}
[x*\delta_{n_0}] (n) & =  \sum_m x(m) \delta_{n_0}(n-m)  \\
 & =  \sum_m x(m) \delta(n-m-n_0) \\
  & =    x(n-n_0) \\
 \end{align}

The conversion via jupyter nbconvert FILE.ipynb leads to an html file with this excerpt

\begin{align}
[x<em>\delta<em>{n_0}] (n) &amp; =  \sum_m x(m) \delta</em>{n_0}(n-m)  \
 &amp; =  \sum_m x(m) \delta(n-m-n_0) \
  &amp; =    x(n-n_0) \
 \end{align}

The pair of subscripts have been converted to em tags, and of course MathJax then refuses to render the equation. A similar issue occurs with an equation like

\begin{equation}
[x*h](n) = \sum_l h(l)x(n-l)
\end{equation}

where the notation at the beginning is interpreted as a link (and of course not rendered)

\begin{equation}
<a href="n">x*h</a> = \sum_l h(l)x(n-l)
\end{equation}</p>

In the past, equations/align/etc (perhaps all environments) were not converted. It might certainly be a good idea to do so, but this causes this kind of problems. Also this happens only in the nbconvert path. The same equations are rendered correctly in the notebook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions