* How to highlight the LaTeX fragments inside orgmode
@ 2011-06-21 18:47 Xin Shi
2011-06-21 19:35 ` Eric Schulte
0 siblings, 1 reply; 8+ messages in thread
From: Xin Shi @ 2011-06-21 18:47 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 889 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 18:47 How to highlight the LaTeX fragments inside orgmode Xin Shi
@ 2011-06-21 19:35 ` Eric Schulte
2011-06-21 20:25 ` Xin Shi
0 siblings, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2011-06-21 19:35 UTC (permalink / raw)
To: Xin Shi; +Cc: emacs-orgmode
Xin Shi <shixin111@gmail.com> 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/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 19:35 ` Eric Schulte
@ 2011-06-21 20:25 ` Xin Shi
2011-06-21 20:49 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: Xin Shi @ 2011-06-21 20:25 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]
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 <schulte.eric@gmail.com>wrote:
> Xin Shi <shixin111@gmail.com> 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/
>
[-- Attachment #2: Type: text/html, Size: 2160 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 20:25 ` Xin Shi
@ 2011-06-21 20:49 ` Nick Dokos
2011-06-21 20:56 ` Xin Shi
0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2011-06-21 20:49 UTC (permalink / raw)
To: Xin Shi; +Cc: nicholas.dokos, emacs-orgmode
Xin Shi <shixin111@gmail.com> wrote:
>
> 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?
>
Works fine here: Org-mode version 7.5 (baseline.324.ga0bc.dirty)
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 20:49 ` Nick Dokos
@ 2011-06-21 20:56 ` Xin Shi
2011-06-21 21:02 ` chris.m.malone
2011-06-21 21:05 ` Eric Schulte
0 siblings, 2 replies; 8+ messages in thread
From: Xin Shi @ 2011-06-21 20:56 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
Thanks. Maybe it's just not working here.
Also, I got this question every time:
Evaluate this latex code block on your system? (y or n)
Are there anyway to turn accept all?
Xin
On Tue, Jun 21, 2011 at 4:49 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Xin Shi <shixin111@gmail.com> wrote:
>
> >
> > 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?
> >
>
> Works fine here: Org-mode version 7.5 (baseline.324.ga0bc.dirty)
>
> Nick
>
[-- Attachment #2: Type: text/html, Size: 1082 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 20:56 ` Xin Shi
@ 2011-06-21 21:02 ` chris.m.malone
2011-06-21 21:05 ` Eric Schulte
1 sibling, 0 replies; 8+ messages in thread
From: chris.m.malone @ 2011-06-21 21:02 UTC (permalink / raw)
To: Xin Shi; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
Hi Xin,
I have the following line in my .emacs file:
(setq org-confirm-babel-evaluate nil)
This, I think, turns off asking for evaluation for all languages. Not sure
if it can be done on a language specific basis or not.
Chris
On Jun 21, 2011 4:56pm, Xin Shi <shixin111@gmail.com> wrote:
> Thanks. Maybe it's just not working here.
> Also, I got this question every time:
> Evaluate this latex code block on your system? (y or n)
> Are there anyway to turn accept all?
> Xin
> On Tue, Jun 21, 2011 at 4:49 PM, Nick Dokos nicholas.dokos@hp.com> wrote:
> Xin Shi shixin111@gmail.com> wrote:
> >
> > However, I noticed something else is broken with the ob-latex:
> >
> > The Cc Ce d (export to PDF and open the PDF file) is no longer working.
> Maybe a bug in 7.5?
> >
> Works fine here: Org-mode version 7.5 (baseline.324.ga0bc.dirty)
> Nick
[-- Attachment #2: Type: text/html, Size: 1400 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 20:56 ` Xin Shi
2011-06-21 21:02 ` chris.m.malone
@ 2011-06-21 21:05 ` Eric Schulte
2011-06-21 21:24 ` Xin Shi
1 sibling, 1 reply; 8+ messages in thread
From: Eric Schulte @ 2011-06-21 21:05 UTC (permalink / raw)
To: Xin Shi; +Cc: nicholas.dokos, emacs-orgmode
Xin Shi <shixin111@gmail.com> writes:
> Thanks. Maybe it's just not working here.
>
> Also, I got this question every time:
>
> Evaluate this latex code block on your system? (y or n)
>
> Are there anyway to turn accept all?
>
the following will disable this prompt
(setq org-confirm-babel-evaluate nil)
Best -- Eric
>
> Xin
>
>
>
> On Tue, Jun 21, 2011 at 4:49 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
>
>> Xin Shi <shixin111@gmail.com> wrote:
>>
>> >
>> > 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?
>> >
>>
>> Works fine here: Org-mode version 7.5 (baseline.324.ga0bc.dirty)
>>
>> Nick
>>
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to highlight the LaTeX fragments inside orgmode
2011-06-21 21:05 ` Eric Schulte
@ 2011-06-21 21:24 ` Xin Shi
0 siblings, 0 replies; 8+ messages in thread
From: Xin Shi @ 2011-06-21 21:24 UTC (permalink / raw)
To: Eric Schulte; +Cc: nicholas.dokos, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]
Thank you!
P.S. Although this works, I still think for my purpose of just want to see
the syntax of the LaTeX highlight, this "begin_src latex" might be a bit
overkill. It would be nice the begin_latex have the option to do this job.
Xin
On Tue, Jun 21, 2011 at 5:05 PM, Eric Schulte <schulte.eric@gmail.com>wrote:
> Xin Shi <shixin111@gmail.com> writes:
>
> > Thanks. Maybe it's just not working here.
> >
> > Also, I got this question every time:
> >
> > Evaluate this latex code block on your system? (y or n)
> >
> > Are there anyway to turn accept all?
> >
>
> the following will disable this prompt
>
> (setq org-confirm-babel-evaluate nil)
>
> Best -- Eric
>
> >
> > Xin
> >
> >
> >
> > On Tue, Jun 21, 2011 at 4:49 PM, Nick Dokos <nicholas.dokos@hp.com>
> wrote:
> >
> >> Xin Shi <shixin111@gmail.com> wrote:
> >>
> >> >
> >> > 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?
> >> >
> >>
> >> Works fine here: Org-mode version 7.5 (baseline.324.ga0bc.dirty)
> >>
> >> Nick
> >>
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
[-- Attachment #2: Type: text/html, Size: 2062 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-21 21:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-21 18:47 How to highlight the LaTeX fragments inside orgmode Xin Shi
2011-06-21 19:35 ` Eric Schulte
2011-06-21 20:25 ` Xin Shi
2011-06-21 20:49 ` Nick Dokos
2011-06-21 20:56 ` Xin Shi
2011-06-21 21:02 ` chris.m.malone
2011-06-21 21:05 ` Eric Schulte
2011-06-21 21:24 ` Xin Shi
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.