From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shiyuan Subject: LaTex best practice in org-mode Date: Sat, 21 Jun 2014 23:12:49 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01294138b5f66c04fc669d95 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyb1L-0003fO-CZ for emacs-orgmode@gnu.org; Sun, 22 Jun 2014 02:13:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wyb1G-0007kc-JQ for emacs-orgmode@gnu.org; Sun, 22 Jun 2014 02:12:55 -0400 Received: from mail-vc0-x231.google.com ([2607:f8b0:400c:c03::231]:43587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wyb1G-0007kS-FM for emacs-orgmode@gnu.org; Sun, 22 Jun 2014 02:12:50 -0400 Received: by mail-vc0-f177.google.com with SMTP id ij19so4751343vcb.36 for ; Sat, 21 Jun 2014 23:12:49 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --089e01294138b5f66c04fc669d95 Content-Type: text/plain; charset=UTF-8 Hi all, Hi all, We can write LaTex directly in org-mode without put it in a SRC block. When the code is exported, the latex syntax will be handled correctly to html or pdf. That's very nice part of org mode. However, if we don't put the latex code into a SRC block, the latex syntax is not correctly highlighted (in the code attached below, the first equation is not highlighted). Another benefit of putting the latex code into SRC block is that we can easily switch to the latex mode to edit the code snippet using C-c ' and in the latex mode, we can use some full-fleged latex package like auctex. However, the latex code in the SRC block is ignored when exported to html. For example, when I exported the following to html, the first equation shows up in the html but the second seconed does not. Any way to make the html exporter to generated the second equation too without taking away the BEGIN_SRC/END_SRC? What's the best practice to write latex in org-mode. Thanks. \begin{equation} \label{eq:test} Bx=b \end{equation} #+BEGIN_SRC latex \begin{equation} \label{eq:test} Ax=b \end{equation} #+END_SRC --089e01294138b5f66c04fc669d95 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,
Hi all,
=C2=A0 =C2=A0We can wri= te LaTex directly in org-mode without put it in a SRC block. When the code = is exported, the latex syntax will be handled correctly to html or pdf. Tha= t's very nice part of org mode. However, if we don't put the latex = code into a SRC block, the latex syntax is not correctly highlighted (in th= e code attached below, the first equation is not highlighted). Another bene= fit of putting the latex code into SRC block is that we can easily switch t= o the latex mode to edit the code snippet using C-c ' and in the latex = mode, we can use some full-fleged latex package like auctex. However, the l= atex code in the SRC block is ignored when exported to html. For example, w= hen I exported the following to html, the first equation shows up in the ht= ml but the second seconed does not. =C2=A0Any way to make the html exporter= to generated the second equation too without taking away the BEGIN_SRC/END= _SRC? What's the best practice to write latex in org-mode. Thanks.=C2= =A0

\begin{equation}
=C2=A0 =C2=A0 \label{eq:test= }
=C2=A0 =C2=A0 Bx=3Db
\end{equation}

#+BEGIN_SRC latex=C2=A0

=C2=A0 \begin{equa= tion}
=C2=A0 =C2=A0 \label{eq:test}
=C2=A0 =C2=A0 Ax=3Db
=C2=A0 \end{equation}
#+END_S= RC

--089e01294138b5f66c04fc669d95--