From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xin Shi Subject: Re: How to highlight the LaTeX fragments inside orgmode Date: Tue, 21 Jun 2011 16:25:43 -0400 Message-ID: References: <8739j3j7v4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0015175cda74023aad04a63ea8fe Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ7WA-0002e7-TI for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:25:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ7W5-0002lZ-L0 for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:25:50 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:49460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ7W4-0002l3-Vo for emacs-orgmode@gnu.org; Tue, 21 Jun 2011 16:25:45 -0400 Received: by wyg36 with SMTP id 36so135500wyg.0 for ; Tue, 21 Jun 2011 13:25:44 -0700 (PDT) In-Reply-To: <8739j3j7v4.fsf@gmail.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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode --0015175cda74023aad04a63ea8fe Content-Type: text/plain; charset=ISO-8859-1 Hi Eric, Thanks for your reply! 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: > Xin Shi writes: > > > 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/ > --0015175cda74023aad04a63ea8fe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Eric,

Thanks for your reply!
I added these two lines into .emacs and it worked!
(require 'ob-latex)
(setq org-src-fontify-native= ly 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?=A0

Best,
Xin


On Tue, Jun 21, 2011 at 3:35 PM, Eric Schulte <schulte.eric@gmail.com> w= rote:
Xin Shi &= lt;shixin111@gmail.com> write= s:

> Hello,
>
> I'm looking for a way to highlight the syntax of the LaTeX fragmen= ts 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 #+BEG= IN_LaTeX: also
> highlight the syntax inside the block?
>
> Thanks!
>
> Xin

Hi Xin,

Try the following syntax

#+begin_src latex :exports results :results code
=A0...
#+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. =A0See t= he
header arguments portion of the manual for information on how to do
this.

Best -- Eric

--
Eric Schulte
http://cs.unm.ed= u/~eschulte/

--0015175cda74023aad04a63ea8fe--