From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: org-babel: Meta-LaTeX-Python-Environment Date: Mon, 26 Oct 2009 22:23:15 -1000 Message-ID: References: <200910261327.09576.torsten.wagner@googlemail.com> <878wexheeq.fsf@stats.ox.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1587465894==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N2hKx-0001JB-9h for emacs-orgmode@gnu.org; Tue, 27 Oct 2009 04:23:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N2hKs-0001IR-Bf for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 04:23:26 -0400 Received: from [199.232.76.173] (port=47192 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N2hKs-0001IO-5B for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 04:23:22 -0400 Received: from outbound-mail-146.bluehost.com ([67.222.38.36]:60234) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N2hKr-0006O8-Nl for Emacs-orgmode@gnu.org; Tue, 27 Oct 2009 04:23:22 -0400 In-Reply-To: <878wexheeq.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: Emacs-orgmode@gnu.org --===============1587465894== Content-Type: multipart/alternative; boundary=Apple-Mail-1--848278441 --Apple-Mail-1--848278441 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Oct 26, 2009, at 2:24 PM, Dan Davison wrote: > Torsten Wagner writes: > > <...> > < ... > > > The inline code blocks will not be processed inside source blocks. I'm > not sure how to achieve what you want with the current machinery, but > have you read the recent posts by Thomas Dye describing how he uses > latex blocks with org-babel? In particular you should look at the > noweb > reference expansions. These are also documented on the Worg page. In > general of course, the more you can write in org rather than latex, > the > more functionality you'll get out of org-babel. Is it possible write > the > abstract in org and defer export to latex? > > <...> Hi Torsten, Perhaps this will do what you want? When I run org-babel-tangle on the following org file, and then LaTeX the output, the resulting pdf file says: A bit of LATEX code, with the result: 6 * Test org #+begin_src python x = 6 f = open('python_results.tex', 'w') f.write(str(x)) f.close() #+end_src #+resname: : None #+begin_src latex :tangle test_arg_passing \documentclass{article} \begin{document} A bit of \LaTeX code, with the result: \input{python_results} \end{document} #+end_src HTH, Tom --Apple-Mail-1--848278441 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable
On Oct 26, 2009, = at 2:24 PM, Dan Davison wrote:

Torsten= Wagner <torsten.wagner@gmail.com> = writes:

<...>

< ... = >

The inline code blocks will not be = processed inside source blocks. I'm
not sure how to achieve what you = want with the current machinery, but
have you read the recent posts = by Thomas Dye describing how he uses
latex blocks with org-babel? =  In particular you should look at the noweb
reference = expansions. These are also documented on the Worg page. In
general of = course, the more you can write in org rather than latex, the
more = functionality you'll get out of org-babel. Is it possible write = the
abstract in org and defer export to = latex?

<...>

Hi = Torsten,

Perhaps this will do what you want?  When I = run org-babel-tangle on the following org file, and then LaTeX the = output, the resulting pdf file says: A bit of LATEX code, with the = result: 6

* Test org
#+begin_src = python 
  x =3D 6
  f =3D = open('python_results.tex', = 'w')
  f.write(str(x))
  f.close()=
#+end_src

#+resname:
: = None

#+begin_src latex :tangle = test_arg_passing
\documentclass{article}
\begin{docume= nt}
  A bit of \LaTeX code, with the result: = \input{python_results}
\end{document}
#+end_src
<= div>
HTH,
Tom

= --Apple-Mail-1--848278441-- --===============1587465894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1587465894==--