From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xavier Garrido Subject: Exporting LaTeX source blocks with HTML backend Date: Mon, 03 Mar 2014 18:43:10 +0100 Message-ID: <5314BF2E.9020102@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKWtc-000495-LO for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 12:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKWtS-00047g-1t for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 12:43:20 -0500 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:58206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKWtR-00046G-QS for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 12:43:09 -0500 Received: by mail-wg0-f52.google.com with SMTP id k14so1803669wgh.11 for ; Mon, 03 Mar 2014 09:43:08 -0800 (PST) Received: from [134.158.88.60] (nb-88060.lal.in2p3.fr. [134.158.88.60]) by mx.google.com with ESMTPSA id ga10sm26764358wjb.23.2014.03.03.09.43.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 03 Mar 2014 09:43:05 -0800 (PST) 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" Dear Orgers, I am facing one issue when I am exporting from orgmode to html. I like to write LaTeX code within #+BEGIN_SRC latex ... #+END_SRC block mainly to take benefit/advantage of the syntax highlighting (debugging long LaTeX equations is "simpler"). The problem is that these code blocks are not exported at all by the html export backend whereas the LaTeX backend does. Of course, an easy solution will be to remove the #+BEGIN_SRC/#+END_SRC lines and both latex and html exporters will just do it right. But, as I said, syntax highlighting is really useful and I can't imagine living without it. I have tried different things from adding a "before parsing hook" which delete lines containing #+BEGIN_SRC/#+END_SRC (then I get problem with other source block such as 'sh' that I want to be exported to 'pre' code in html) to trying to play with filters (so far, I do not get any getting LaTeX source block when exporting to html). As a summary I would like to do the following #+BEGIN_SRC org * Test LaTeX block Syntax highlighting is always nice but the following block is not exported in html. An option will be to remove the #+BEGIN_SRC latex/#+END_SRC lines #+BEGIN_SRC latex \begin{align*} x&=x\\ y&=y \end{align*} #+END_SRC * Test shell block Here, I would like to keep the following source block as it is to get it exported properly by html backend (namely as
 code)
   #+BEGIN_SRC sh
     uname -a
   #+END_SRC
#+END_SRC

Thanks for your help,
Xavier