emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Latex export with \begin{equation}


From: Dominik Schrempf
Subject: Re: [O] Latex export with \begin{equation}
Date: Mon, 17 Sep 2018 18:52:22 +0200
User-agent: mu4e 1.0; emacs 26.1

Oh thanks,

I thought it would be good to add a comment to the Org mode manual although it
is of course not really Org mode related.

I decided that a good location would be
https://orgmode.org/manual/Math-formatting-in-HTML-export.html#Math-formatting-in-HTML-export

A proposed patch is attached, please let me know what you think.

Best,
Dominik

--- org-manual.org      2018-09-17 18:48:17.868785307 +0200
+++ org-manual.org.new  2018-09-17 18:48:09.708751068 +0200
@@ -12655,7 +12655,9 @@
 #+vindex: org-html-mathjax-template
 See the docstring of ~org-html-mathjax-options~ for all supported
 variables.  The MathJax template can be configure via
-~org-html-mathjax-template~.
+~org-html-mathjax-template~.  Please note that formulas will be part
+of an HTML document, and that signs such as =<=, =>=, or =&= have
+special meanings (see 
[[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax
 TeX and LaTeX support]]).
 
 If you prefer, you can also request that LaTeX fragments are processed
 into small images that will be inserted into the browser page.  Before

Nick Dokos <address@hidden> writes:

Dominik Schrempf <address@hidden> writes:


so I found the reason. Both Org versions behave the same, sorry for the
confusion. The original equation that does not get exported correctly contained
angles:

\begin{equation}
 <k_{eff}> = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

This equation is correctly rendered when using a .tex file and native LaTeX.
If the angles are removed, the Org Mode HTML export works:

\begin{equation}
 k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

Does anybody know why? Is this expected behavior? Can this be changed?


Maybe this explains it:

"...Also, since the mathematics is initially given as text on the
page, you need to be careful that your mathematics doesn’t look like
HTML tags to the browser (which parses the page before MathJax gets to
see it). In particular, that means that you have to be careful about
things like less-than and greater-than signs (< and >), and ampersands
(&), which have special meaning to the browsers. For example,

... when $x<y$ we have ...

will cause a problem, because the browser will think <y is the
beginning of a tag named y (even though there is no such tag in
HTML)."

See

       http://docs.mathjax.org/en/latest/tex.html

the section entitled "TeX and LaTeX in HTML documents":

reply via email to

[Prev in Thread] Current Thread [Next in Thread]