publish generates incorrect latex

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

publish generates incorrect latex

wienerschnitzel
I reported the following bug:
https://savannah.gnu.org/bugs/?51782

Actually, I have narrowed it down to the formatter that is called inside publish.m. I know that the problem happens somewhere inside __publish_latex_output__.m, specifically in escape_latex.

this is the starting string:
$$e^x = \lim\limits_{n\rightarrow\infty}\left(1+\dfrac{x}{n}\right)^{n}$$

and this is the result after being processed by 'escape_latex':
$$e\^{}x = \lim\limits\_{n\rightarrow\infty}\left(1+\dfrac{x}{n}\right)\^{}{n}$$

why are "_" and "^" being escaped?
In addition, replacing "^" with "\^{}" seems wrong as this doesn't encapsulate the argument that follows.


Reply | Threaded
Open this post in threaded view
|

Re: publish generates incorrect latex

siko1056
wienerschnitzel wrote
I reported the following bug:
https://savannah.gnu.org/bugs/?51782

Actually, I have narrowed it down to the formatter that is called inside publish.m. I know that the problem happens somewhere inside __publish_latex_output__.m, specifically in escape_latex.

this is the starting string:
$$e^x = \lim\limits_{n\rightarrow\infty}\left(1+\dfrac{x}{n}\right)^{n}$$

and this is the result after being processed by 'escape_latex':
$$e\^{}x = \lim\limits\_{n\rightarrow\infty}\left(1+\dfrac{x}{n}\right)\^{}{n}$$

why are "_" and "^" being escaped?
In addition, replacing "^" with "\^{}" seems wrong as this doesn't encapsulate the argument that follows.
Thank you for your bug report.  We know that you are really concerned about your found issue, but there is no need for double posting this bug on the tracker and on this mailing list.  All of us are volunteers and I respond at the tracker as soon as possible and will only respond there. Otherwise consider a commercial support option [1] to quickly solve your problem.

Best,
Kai

[1]: https://www.gnu.org/software/octave/commercial-support.html