emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting LaTeX source blocks with HTML backend
@ 2014-03-03 17:43 Xavier Garrido
  2014-03-03 19:24 ` Richard Lawrence
  0 siblings, 1 reply; 9+ messages in thread
From: Xavier Garrido @ 2014-03-03 17:43 UTC (permalink / raw)
  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 <pre> code)
   #+BEGIN_SRC sh
     uname -a
   #+END_SRC
#+END_SRC

Thanks for your help,
Xavier

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-08 11:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03 17:43 Exporting LaTeX source blocks with HTML backend Xavier Garrido
2014-03-03 19:24 ` Richard Lawrence
2014-03-03 19:39   ` Xavier Garrido
2014-03-03 19:55     ` Ista Zahn
2014-03-03 23:31       ` Xavier Garrido
2014-03-07 21:37       ` Eric S Fraga
2014-03-03 20:54     ` Richard Lawrence
2014-03-03 23:33       ` Xavier Garrido
2014-03-08 11:39         ` Eric S Fraga

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).