From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dominik Schrempf Subject: Re: Latex export with \begin{equation} Date: Mon, 17 Sep 2018 18:52:22 +0200 Message-ID: <87musgf4mx.fsf@gmail.com> References: <87muslpm5t.fsf@gmail.com> <87zhwlfrqs.fsf@gmail.com> <87o9d1grp2.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1wlA-0007VZ-T4 for emacs-orgmode@gnu.org; Mon, 17 Sep 2018 12:52:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1wl7-0007nP-LL for emacs-orgmode@gnu.org; Mon, 17 Sep 2018 12:52:28 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:54488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1wl7-0007mi-B0 for emacs-orgmode@gnu.org; Mon, 17 Sep 2018 12:52:25 -0400 Received: by mail-wm1-x332.google.com with SMTP id c14-v6so10463973wmb.4 for ; Mon, 17 Sep 2018 09:52:25 -0700 (PDT) In-reply-to: <87o9d1grp2.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nick Dokos Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; format=flowed 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-manual.patch --- 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 --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Nick Dokos writes: > Dominik Schrempf 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=20 >> contained >> angles: >> >> \begin{equation} >> =3D \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 La= TeX. >> If the angles are removed, the Org Mode HTML export works: >> >> \begin{equation} >> k_{eff} =3D \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=E2=80=99t look l= ike > 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 > will cause a problem, because the browser will think 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": --=-=-=--