emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [question] lisp code in :results header arg.?
Date: Tue, 16 Feb 2021 17:58:03 +0000	[thread overview]
Message-ID: <225A3D45-0F47-4FFE-8BBA-F023CB8C9A6C@health.ucsd.edu> (raw)
In-Reply-To: <87zh040ybv.fsf@posteo.net>

> On Feb 16, 2021, at 8:30 AM, Juan Manuel Macías <maciaschain@posteo.net> wrote:
> Hi,
> I'm exploring some ways to include a complex LaTeX preamble using source
> blocks. Consider this (code at the end of this message), that works fine.
> My question is: In order to do it all in a single block, would there be
> any way to pass the output of the first block as an argument to a
> function, and put that function as a header arg (results)...?

[rest deleted]

I think you might do better to use noweb chunks, viz.

#+name: pre-amble
#+begin_src latex :exports none
  \setmainfont{Linux Libertine O}

#+begin_src latex :noweb yes :results drawer
,#+LaTeX_HEADER: <<pre-amble>>

Evaluating the latter chunk (assuming `org-babel-load-languages' has (latex . t)) gives what I suspect you want.

Note that using a drawer allows replacement of the result.


  reply	other threads:[~2021-02-16 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 16:30 [question] lisp code in :results header arg.? Juan Manuel Macías
2021-02-16 17:58 ` Berry, Charles via General discussions about Org-mode. [this message]
2021-02-16 18:25   ` Juan Manuel Macías

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:

  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=225A3D45-0F47-4FFE-8BBA-F023CB8C9A6C@health.ucsd.edu \
    --to=emacs-orgmode@gnu.org \
    --cc=ccberry@health.ucsd.edu \
    --cc=maciaschain@posteo.net \


* 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


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).