#+NAME: caption
#+BEGIN_SRC sh :var data="" :var caption="" name="" :results output
echo "#+name: $name"
echo "#+caption: $caption"
echo "$data"
#+END_SRC
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$"
#+END_SRC
#+RESULTS:
:results:
#+name: eq-integral
#+caption: This is an equation.
$int_0^2 e^x dx$
:end:
John
-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803