emacs-orgmode
[Top][All Lists]

Re: [O] How to highlight the LaTeX fragments inside orgmode

 From: Xin Shi Subject: Re: [O] How to highlight the LaTeX fragments inside orgmode Date: Tue, 21 Jun 2011 16:25:43 -0400

Hi Eric,

I added these two lines into .emacs and it worked!

(require 'ob-latex)
(setq org-src-fontify-natively t)

However, I noticed something else is broken with the ob-latex:

The C-c C-e d (export to PDF and open the PDF file) is no longer working. Maybe a bug in 7.5?

Best,
Xin

On Tue, Jun 21, 2011 at 3:35 PM, Eric Schulte wrote:

> Hello,
>
> I'm looking for a way to highlight the syntax of the LaTeX fragments inside
> orgmode.
>
> I have tried to put the LaTeX parts into:
>
> #+BEGIN_SRC LaTeX
> #+END_SRC
>
> But the output tex file will have the
> \begin{verbatim}
> \end{verbatim}
>
> surrounding the parts. I'm wondering if it's possible to #+BEGIN_LaTeX: also
> highlight the syntax inside the block?
>
> Thanks!
>
> Xin

Hi Xin,

Try the following syntax

#+begin_src latex :exports results :results code
...
#+end_src

Making sure that you have the ob-latex.el loaded.

Note that you can set the two header arguments on the subtree or the
file level so that you don't have to continually re-type them.  See the
header arguments portion of the manual for information on how to do
this.

Best -- Eric

--
Eric Schulte
http://cs.unm.edu/~eschulte/