* AUCTex within org-babel
@ 2012-02-08 10:07 Riccardo Romoli
2012-02-08 14:25 ` Eric Schulte
0 siblings, 1 reply; 10+ messages in thread
From: Riccardo Romoli @ 2012-02-08 10:07 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
Hi, is there a way to include the AUCTeX function (i.e. to create a figure
or a table or insert a font...) and markup color, within an org-babel
document?
Best
Riccardo
[-- Attachment #2: Type: text/html, Size: 185 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-08 10:07 AUCTex within org-babel Riccardo Romoli
@ 2012-02-08 14:25 ` Eric Schulte
2012-02-08 14:51 ` Riccardo Romoli
0 siblings, 1 reply; 10+ messages in thread
From: Eric Schulte @ 2012-02-08 14:25 UTC (permalink / raw)
To: Riccardo Romoli; +Cc: emacs-orgmode
Riccardo Romoli <ric.romoli@gmail.com> writes:
> Hi, is there a way to include the AUCTeX function (i.e. to create a figure
> or a table or insert a font...) and markup color, within an org-babel
> document?
>
If I understand your question correctly you want AUCTeX mode to be
active in an Org-mode document. Generally this is not possible as
Org-mode is the active mode and AUCTeX and Org would conflict in many
ways.
If you want syntax highlighting for a particular chunk of latex code,
you can may it in a src block
#+begin_src latex
your latex here...
#+end_src
and then customize the `org-src-fontify-natively' variable. Pressing
C-c ' from withing the code block will then launch a small buffer in
AUCTeX mode.
Best,
>
> Best
> Riccardo
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-08 14:25 ` Eric Schulte
@ 2012-02-08 14:51 ` Riccardo Romoli
2012-02-08 20:45 ` Jonas Hörsch
0 siblings, 1 reply; 10+ messages in thread
From: Riccardo Romoli @ 2012-02-08 14:51 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]
Hi Eric,
thanks a lot for your answer!! I completely ignore that C-c' lunch the
small buffer for all the code within the src blocks. I belive it was used
only for ESS....
Best
Riccardo
2012/2/8 Eric Schulte <eric.schulte@gmx.com>
> Riccardo Romoli <ric.romoli@gmail.com> writes:
>
> > Hi, is there a way to include the AUCTeX function (i.e. to create a
> figure
> > or a table or insert a font...) and markup color, within an org-babel
> > document?
> >
>
> If I understand your question correctly you want AUCTeX mode to be
> active in an Org-mode document. Generally this is not possible as
> Org-mode is the active mode and AUCTeX and Org would conflict in many
> ways.
>
> If you want syntax highlighting for a particular chunk of latex code,
> you can may it in a src block
>
> #+begin_src latex
> your latex here...
> #+end_src
>
> and then customize the `org-src-fontify-natively' variable. Pressing
> C-c ' from withing the code block will then launch a small buffer in
> AUCTeX mode.
>
> Best,
>
> >
> > Best
> > Riccardo
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
[-- Attachment #2: Type: text/html, Size: 1689 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-08 14:51 ` Riccardo Romoli
@ 2012-02-08 20:45 ` Jonas Hörsch
2012-02-09 14:07 ` Riccardo Romoli
0 siblings, 1 reply; 10+ messages in thread
From: Jonas Hörsch @ 2012-02-08 20:45 UTC (permalink / raw)
To: emacs-orgmode
Hi list,
On Wed, Feb 08 2012, Riccardo Romoli wrote:
> thanks a lot for your answer!! I completely ignore that C-c' lunch the
> small buffer for all the code within the src blocks. I belive it was used
> only for ESS....
the only remaining problem is that the AUCTeX mode tries to be smart
about what environments it allows to insert. f.ex. inserting
#+begin_src latex
#+end_src
then C-', brings one to a source buffer with AUCTeX-mode enabled.
But a C-c C-e to insert an environment doesn't want to complete on
itemize or figure, but instead only allows to choose document (Which
would be perfectly sane under the assumption that the buffer contains
the whole tex-document).
Does anybody know how to deactivate this "feature" of AUCTeX? Perhaps
setting TeX-master-file to something special?
Thanks,
Jonas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-08 20:45 ` Jonas Hörsch
@ 2012-02-09 14:07 ` Riccardo Romoli
2012-02-09 14:23 ` Jonas Hörsch
0 siblings, 1 reply; 10+ messages in thread
From: Riccardo Romoli @ 2012-02-09 14:07 UTC (permalink / raw)
To: Jonas Hörsch; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]
Hi, Jonas
if you enter in the AUCTeX buffer (C-c') and than you use the AUCTeX C-c
C-e, you can choose the environment you need in the emacs minibuffer such
as in LaTeX.
Best
Riccardo
2012/2/8 Jonas Hörsch <coroa@online.de>
> Hi list,
>
> On Wed, Feb 08 2012, Riccardo Romoli wrote:
>
> > thanks a lot for your answer!! I completely ignore that C-c' lunch the
> > small buffer for all the code within the src blocks. I belive it was used
> > only for ESS....
>
> the only remaining problem is that the AUCTeX mode tries to be smart
> about what environments it allows to insert. f.ex. inserting
>
> #+begin_src latex
>
> #+end_src
>
> then C-', brings one to a source buffer with AUCTeX-mode enabled.
>
> But a C-c C-e to insert an environment doesn't want to complete on
> itemize or figure, but instead only allows to choose document (Which
> would be perfectly sane under the assumption that the buffer contains
> the whole tex-document).
>
> Does anybody know how to deactivate this "feature" of AUCTeX? Perhaps
> setting TeX-master-file to something special?
>
> Thanks,
> Jonas
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1495 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-09 14:07 ` Riccardo Romoli
@ 2012-02-09 14:23 ` Jonas Hörsch
2012-02-09 15:48 ` Riccardo Romoli
0 siblings, 1 reply; 10+ messages in thread
From: Jonas Hörsch @ 2012-02-09 14:23 UTC (permalink / raw)
To: emacs-orgmode
hi riccardo,
On Thu, Feb 09 2012, Riccardo Romoli wrote:
> if you enter in the AUCTeX buffer (C-c') and than you use the AUCTeX C-c
> C-e, you can choose the environment you need in the emacs minibuffer such
> as in LaTeX.
yes, indeed. and my claim was, that the completion facility of AUCTeX
then only shows the environment
\begin{document}..\end{document} and not f.ex. figure.
but when i tried to verify that claim right now, it curiously seems not
to be true any longer.
so sorry for the noise, my problem (if it ever was one) is solved.
cheers,
jonas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-09 14:23 ` Jonas Hörsch
@ 2012-02-09 15:48 ` Riccardo Romoli
2012-02-09 17:11 ` Jonas Hörsch
0 siblings, 1 reply; 10+ messages in thread
From: Riccardo Romoli @ 2012-02-09 15:48 UTC (permalink / raw)
To: Jonas Hörsch; +Cc: emacs-orgmode, Eric Schulte
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
I have a further question: how can I export a code like this:
#+begin_src latex
\begin{figure}
\centering
\includegraphics[width=1\textwidth]{foo.jpg}
\caption{Figure example}
\label{fig:foo}
\end{figure}
#+end_src
to LaTeX to obtain a "working" figure code??
Best
Riccardo
2012/2/9 Jonas Hörsch <coroa@online.de>
> hi riccardo,
>
> On Thu, Feb 09 2012, Riccardo Romoli wrote:
>
> > if you enter in the AUCTeX buffer (C-c') and than you use the AUCTeX C-c
> > C-e, you can choose the environment you need in the emacs minibuffer such
> > as in LaTeX.
>
> yes, indeed. and my claim was, that the completion facility of AUCTeX
> then only shows the environment
> \begin{document}..\end{document} and not f.ex. figure.
>
> but when i tried to verify that claim right now, it curiously seems not
> to be true any longer.
>
> so sorry for the noise, my problem (if it ever was one) is solved.
>
> cheers,
> jonas
>
>
>
[-- Attachment #2: Type: text/html, Size: 1326 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-09 15:48 ` Riccardo Romoli
@ 2012-02-09 17:11 ` Jonas Hörsch
2012-02-09 21:31 ` Riccardo Romoli
0 siblings, 1 reply; 10+ messages in thread
From: Jonas Hörsch @ 2012-02-09 17:11 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Feb 09 2012, Riccardo Romoli wrote:
> I have a further question: how can I export a code like this:
>
> #+begin_src latex
> \begin{figure}
> \centering
> \includegraphics[width=1\textwidth]{foo.jpg}
> \caption{Figure example}
> \label{fig:foo}
> \end{figure}
> #+end_src
>
> to LaTeX to obtain a "working" figure code??
>
it seems to do what you want, when you instead use
#+begin_latex
...
#+end_latex
C-' also still does the same. only the native fontification in the org
buffer doesn't work irrespective of the org-src-fontify-natively
setting. perhaps there is another variable for that.
mind that you could also use org constructs, for instance
#+CAPTION: Figure example
#+LABEL: fig:foo
[[foo.jpg]]
exports to something rather similar.
cheers,
jonas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-09 17:11 ` Jonas Hörsch
@ 2012-02-09 21:31 ` Riccardo Romoli
2012-02-10 12:11 ` Jonas Hörsch
0 siblings, 1 reply; 10+ messages in thread
From: Riccardo Romoli @ 2012-02-09 21:31 UTC (permalink / raw)
To: Jonas Hörsch; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
Thanks Jonas!!
I do not understand why the code works only if I use:
#+begin_latex
....
#+end-latex
instead of :
#+begin_src latex :exports results :results latex
....
#+end_src
mind that you could also use org constructs, for instance
>
> #+CAPTION: Figure example
> #+LABEL: fig:foo
> [[foo.jpg]]
>
I prefer to use the "original" LaTeX code!!
Best
Riccardo
2012/2/9 Jonas Hörsch <coroa@online.de>
> On Thu, Feb 09 2012, Riccardo Romoli wrote:
>
> > I have a further question: how can I export a code like this:
> >
> > #+begin_src latex
> > \begin{figure}
> > \centering
> > \includegraphics[width=1\textwidth]{foo.jpg}
> > \caption{Figure example}
> > \label{fig:foo}
> > \end{figure}
> > #+end_src
> >
> > to LaTeX to obtain a "working" figure code??
> >
>
> it seems to do what you want, when you instead use
>
> #+begin_latex
> ...
> #+end_latex
>
> C-' also still does the same. only the native fontification in the org
> buffer doesn't work irrespective of the org-src-fontify-natively
> setting. perhaps there is another variable for that.
>
> mind that you could also use org constructs, for instance
>
> #+CAPTION: Figure example
> #+LABEL: fig:foo
> [[foo.jpg]]
>
> exports to something rather similar.
>
> cheers,
> jonas
>
>
>
[-- Attachment #2: Type: text/html, Size: 1944 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: AUCTex within org-babel
2012-02-09 21:31 ` Riccardo Romoli
@ 2012-02-10 12:11 ` Jonas Hörsch
0 siblings, 0 replies; 10+ messages in thread
From: Jonas Hörsch @ 2012-02-10 12:11 UTC (permalink / raw)
To: emacs-orgmode
hi riccardo,
On Thu, Feb 09 2012, Riccardo Romoli wrote:
> I do not understand why the code works only if I use:
>
> #+begin_src latex :exports results :results latex
> ....
> #+end_src
for this to work you have to add (latex . t) to
org-babel-load-languages.
but it's actually thought to be used to automatically include some
generated latex code as f.ex. an org table as in [1]. org-babel then
creates a #+begin_latex...#+end_latex - block with the whole latex
inside, which is then exported the same way as if you had directly used
the latex-block.
cheers,
jonas
[1] http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-13-2
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-02-10 12:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 10:07 AUCTex within org-babel Riccardo Romoli
2012-02-08 14:25 ` Eric Schulte
2012-02-08 14:51 ` Riccardo Romoli
2012-02-08 20:45 ` Jonas Hörsch
2012-02-09 14:07 ` Riccardo Romoli
2012-02-09 14:23 ` Jonas Hörsch
2012-02-09 15:48 ` Riccardo Romoli
2012-02-09 17:11 ` Jonas Hörsch
2012-02-09 21:31 ` Riccardo Romoli
2012-02-10 12:11 ` Jonas Hörsch
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).