emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: autofrettage <autofrettage@protonmail.ch>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: LaTeX-producing code : how to export results to HTML/ODT
Date: Tue, 6 Jul 2021 10:24:05 -0400	[thread overview]
Message-ID: <CAJ51EToD5o_3Qfs9ECy2oWL-+pipAxBxd4yb28UydZ2ZAJomcQ@mail.gmail.com> (raw)
In-Reply-To: <dqtQ_Wsf7VYe4YRaw8DB3Q0duEGuKOKEhLJoKfOxo-fT-SZOBEUJQlAJXMEp2MTMgAIhBwOW-RAaPawTB-4Is6LIQCZJ9zBU7CKbeJsve_8=@protonmail.ch>

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

Here is a way way to combine the output with a name/caption. I adapted this
from the post-processing section in

#+NAME: caption
#+BEGIN_SRC sh :var data="" :var caption="" name=""  :results output
echo "#+name: $name"
echo "#+caption: $caption"
echo "$data"

Here we have a block that outputs a latex string, for example.

#+BEGIN_SRC emacs-lisp :results value drawer :post
caption(name="eq-integral", caption="This is an equation.", data=*this*)
"$\int_0^2 e^x dx$"

#+name: eq-integral
#+caption: This is an equation.
$int_0^2 e^x dx$

Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

On Mon, Jul 5, 2021 at 1:04 PM autofrettage <autofrettage@protonmail.ch>

> Hi,
> I simply cannot ignore this opportunity to expose my utter Org Mode
> ignorance!
> Emmanuel > ... and how to use it with captions, labels and
> cross-references.
> I have tried using the code-splicing functionality with some success; The
> result from one source code block "foo", can be inserted into another one
> with <<foo()>>.
> If you take away the parentheses, then the source code block "foo" instead
> of its results will be inserted.
> Emm.> But I still don't "get" drawers, I thonk.
> You're not alone.
> Rasmus

[-- Attachment #2: Type: text/html, Size: 2415 bytes --]

  reply	other threads:[~2021-07-06 14:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 17:01 LaTeX-producing code : how to export results to HTML/ODT autofrettage
2021-07-06 14:24 ` John Kitchin [this message]
2021-07-07 13:57 CHARPENTIER Emmanuel via General discussions about Org-mode.
2021-07-07 20:04 ` John Kitchin

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=CAJ51EToD5o_3Qfs9ECy2oWL-+pipAxBxd4yb28UydZ2ZAJomcQ@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=autofrettage@protonmail.ch \
    --cc=emacs-orgmode@gnu.org \


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