I hope the following complete minimal example is self-explanatory. It contains my question. It should run without error messages in org-babel. I looked at the six related suggested questions on the site and did not see a satisfactory answer.
#+CAPTION: The caption for this org-babel code block exports to /LaTeX/
#+name: elisp-prelude
#+BEGIN_SRC emacs-lisp :results output :exports both
(princ (concat (format "Emacs version: %s\n" (emacs-version))
(format "org version: %s\n" (org-version))))
#+END_SRC
#+CAPTION: But this caption for the results won't export to /LaTeX/
#+LABEL: res:elisp-prelude
#+RESULTS: elisp-prelude
: Emacs version: GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
: of 2016-09-17
: org version: 9.0.6
The results are computed correctly each time I export to /LaTeX/, but the
caption for the results does not export.
What can I do to make the caption for the results display in the exported /LaTeX/?
EDIT: I tried adding a #+NAME
header to the #+RESULTS
block, both before and after the #+LABEL
, but the results are the same: no export.