* Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]
@ 2015-12-11 13:45 Dominik Schrempf
2015-12-11 14:58 ` Rasmus
0 siblings, 1 reply; 4+ messages in thread
From: Dominik Schrempf @ 2015-12-11 13:45 UTC (permalink / raw)
To: emacs-orgmode
Hello,
I am trying to export a LaTeX code block into HTML and have a problem
when using lower (<) signs (maybe it also happens with greater signs but
I did not check that).
E.g., the following Org code leads to an error when viewing the HTML
file because the '<' sign is interpreted in a wrong way (I don't know
how but it seems to be interpreted as part of a tag) and MathJax does
not succeed then.
Org code:
#+BEGIN_SRC latex :results html
\begin{equation}
\text{if } 0<i<N
\end{equation}
#+END_SRC
#+RESULTS:
#+BEGIN_HTML
\begin{equation}
\text{if } 0<i<N
\end{equation}
#+END_HTML
I.e., the Firefox HTML syntax checker shows the line '\end{equation}...'
in red in the HTML file.
HTML code:
\begin{equation}
\text{if } 0<i<N
\end{equation}</li>
</ul>
If I add spaces in-between, it works fine.
#+BEGIN_SRC latex :results html
\begin{equation}
\text{if } 0 < i < N
\end{equation}
#+END_SRC
Best wishes,
Dominik
Emacs : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
of 2015-09-10 on foutrelis
Package: Org-mode version 8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]
2015-12-11 13:45 Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)] Dominik Schrempf
@ 2015-12-11 14:58 ` Rasmus
2015-12-11 15:54 ` Dominik Schrempf
0 siblings, 1 reply; 4+ messages in thread
From: Rasmus @ 2015-12-11 14:58 UTC (permalink / raw)
To: emacs-orgmode; +Cc: dominik.schrempf
Hi Dominik,
Thanks for your report.
Dominik Schrempf <dominik.schrempf@gmail.com> writes:
> I am trying to export a LaTeX code block into HTML and have a problem
> when using lower (<) signs (maybe it also happens with greater signs but
> I did not check that).
>
> E.g., the following Org code leads to an error when viewing the HTML
> file because the '<' sign is interpreted in a wrong way (I don't know
> how but it seems to be interpreted as part of a tag) and MathJax does
> not succeed then.
Your example suggests it's an upstream bug or feature. Perhaps try:
https://github.com/mathjax/MathJax/issues
Thanks,
Rasmus
--
Dung makes an excellent fertilizer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]
2015-12-11 14:58 ` Rasmus
@ 2015-12-11 15:54 ` Dominik Schrempf
2015-12-11 17:42 ` Rasmus
0 siblings, 1 reply; 4+ messages in thread
From: Dominik Schrempf @ 2015-12-11 15:54 UTC (permalink / raw)
To: emacs-orgmode
Hi Rasmus,
thanks for your answer. I asked the people from MathJax and the problem
is HTML related. =<i= is interpreted as an HTML tag by the browser.
This behavior is well known and explained in the MathJax
Documentation.
http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents
Maybe Org mode HTML export should take this into account, especially
because =<i= is used quite often? I understand if this is not feasible.
Thanks,
Dominik
On Fri, Dec 11 2015, Rasmus wrote:
> The following message is a courtesy copy of an article
> that has been posted to gmane.emacs.orgmode as well.
>
> Hi Dominik,
>
> Thanks for your report.
>
> Dominik Schrempf <dominik.schrempf@gmail.com> writes:
>
>> I am trying to export a LaTeX code block into HTML and have a problem
>> when using lower (<) signs (maybe it also happens with greater signs but
>> I did not check that).
>>
>> E.g., the following Org code leads to an error when viewing the HTML
>> file because the '<' sign is interpreted in a wrong way (I don't know
>> how but it seems to be interpreted as part of a tag) and MathJax does
>> not succeed then.
>
> Your example suggests it's an upstream bug or feature. Perhaps try:
>
> https://github.com/mathjax/MathJax/issues
>
> Thanks,
> Rasmus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]
2015-12-11 15:54 ` Dominik Schrempf
@ 2015-12-11 17:42 ` Rasmus
0 siblings, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-12-11 17:42 UTC (permalink / raw)
To: emacs-orgmode
Hi Dominik,
Thanks for investigating this further.
Dominik Schrempf <dominik.schrempf@gmail.com> writes:
> thanks for your answer. I asked the people from MathJax and the problem
> is HTML related. =<i= is interpreted as an HTML tag by the browser.
>
> This behavior is well known and explained in the MathJax
> Documentation.
>
> http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents
Thanks for the link.
> Maybe Org mode HTML export should take this into account, especially
> because =<i= is used quite often? I understand if this is not feasible.
So you are advocating that Org tries to work around limitations in
html/MathJax? Is this the *only* known case of mathjax not fully
supporting LaTeX?
It seems easy to fix in org-html-format-latex, but I’m not sure it’s the
right way to go (touching people’s math seems like a bad idea). Does
e.g. KaTeX have this limitation as well? Presumably, ’yes’.
Another option is simply documenting this behavior.
I’m not sure what is the right approach is here.
Rasmus
--
ツ
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-11 17:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-11 13:45 Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)] Dominik Schrempf
2015-12-11 14:58 ` Rasmus
2015-12-11 15:54 ` Dominik Schrempf
2015-12-11 17:42 ` Rasmus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).