[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LaTeX-producing code : how to export results to HTML/ODT

From: John Kitchin
Subject: Re: LaTeX-producing code : how to export results to HTML/ODT
Date: Tue, 6 Jul 2021 10:24:05 -0400

Here is a way way to combine the output with a name/caption. I adapted this from the post-processing section in https://orgmode.org/manual/Results-of-Evaluation.html

#+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="">"$\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> wrote:

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]