Open susanxia1006 opened 6 years ago
Some characters do not appear to be escaped correctly when using the Math class from IPython.display.
Math
IPython.display
Example: the output cell of
from IPython.display import Math
Math(r"""\begin{eqnarray} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = & \frac{4\pi}{c}\vec{\mathbf{j}} \\ \nabla \cdot \vec{\mathbf{E}} & = & 4 \pi \rho \\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = & \vec{\mathbf{0}} \\ \nabla \cdot \vec{\mathbf{B}} & = & 0 \end{eqnarray}""")
gives error
400 Client Error: Bad Request for url...
But it works fine after taking out all the & characters.
&
Assuming Math() emits a mimetype bundle, we need to escape special characters just like we do with MathJax embedded in Markdown.
Math()
Some characters do not appear to be escaped correctly when using the
Math
class fromIPython.display
.Example: the output cell of
gives error
But it works fine after taking out all the
&
characters.