emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Fabrice Niessen" <fni-news-TA4HMoP+1wHrZ44/DZwexQ@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: How do I specify the language for a :results code block
Date: Wed, 04 Dec 2013 21:06:27 +0100	[thread overview]
Message-ID: <86li00l6t8.fsf@somewhere.org> (raw)
In-Reply-To: m2iov4bvph.fsf@polytechnique.org

Hello Alan,

Alan Schmitt wrote:
> I tried to apply the drawer trick to the :wrap src but it does not work,
> unfortunately. I like your approach better anyway as it allows me to specify
> not only the language used by the output source block, but other properties
> (such as whether it should be evaluated) which wrap does not let me do.

Not sure this is true. Look at the following tricky example from my slides for
the "stage LaTeX de Dunkerque 2013" [1]:

#+begin_src org :results latex replace :wrap "SRC latex :exports code" :exports results
<<exemple-liste-itemize>>
#+end_src

It does eval as:

#+results:
#+BEGIN_SRC latex :exports code
\begin{itemize}
\item Premier élément
\begin{itemize}
\item Niveau plus profond
\end{itemize}
\item Autre élément
\item Dernier élément
\end{itemize}
#+END_SRC

which in turn evals (for the export) into the results:

#+results:
#+BEGIN_LaTeX
\begin{itemize}
\item Premier élément
\begin{itemize}
\item Niveau plus profond
\end{itemize}
\item Autre élément
\item Dernier élément
\end{itemize}
#+END_LaTeX

So, you definitely can pass extra options to the wrap header argument...

Best regards,
Fabrice

[1] See http://www.slideshare.net/fniessen/org-modelatexexport or
    https://github.com/fniessen/stage-latex-dunkerque-2013/.

-- 
Fabrice Niessen
Leuven, Belgium

  reply	other threads:[~2013-12-04 20:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 21:49 How do I specify the language for a :results code block Alan Schmitt
2013-11-29 22:10 ` Thomas S. Dye
2013-11-29 23:48   ` Charles Berry
2013-11-30 10:52     ` Alan Schmitt
2013-11-30 16:57       ` Thomas S. Dye
2013-12-02 10:41         ` Alan Schmitt
2013-12-02 11:27           ` Sebastien Vauban
2013-12-02 13:04             ` Alan Schmitt
2013-12-02 18:09               ` Sean O'Halpin
2013-12-04 13:18                 ` Alan Schmitt
2013-12-04 20:06                   ` Fabrice Niessen [this message]
2013-12-05 12:33                     ` Alan Schmitt
2013-12-02 16:53           ` Thomas S. Dye
2013-12-04 12:35             ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86li00l6t8.fsf@somewhere.org \
    --to=fni-news-ta4hmop+1whrz44/dzwexq@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).