问题
I have a strange problem. I am trying to render the following valid latex,
$$\int_{x=0}^{x=h} u_t dx = \int_{x=0}^{x=h} (-au + du_x)_x dx +
\int_{x=0}^{x=h} s(x,t,u) dx$$
in a markdown cell in an ipython notebook (version 0.13.2 built from source). If I instead render each term separately it works!
$$\int_{x=0}^{x=h} u_t dx $$
$$\int_{x=0}^{x=h} (-au + du_x)_x dx$$
$$+ \int_{x=0}^{x=h} s(x,t,u) dx$$
Is it possible to get an error message to find out where the problem is? iPython is rendering this via MathJax.
回答1:
If you can modify the configuration used by MathJax, you could add
TeX: { noErrors: { disabled: true } }
to the configuration and that should allows the errors to be shown (rather than the original TeX code). If you don't have access to the configuration directly, you could open the browser console window and type
MathJax.Hub.Config({TeX: {noErrors: {disabled: true}})
(and press RETURN) and then execute the cell with the troublesome LaTeX to get the same effect.
I'm wondering of some strange character hasn't gotten into the longer expression (like a forced line break or something).
来源:https://stackoverflow.com/questions/17159081/ipython-notebook-cannot-render-valid-latex-is-it-possible-to-get-an-error-messa