How to add some text between source code and results exports to PDF?
Whenver I want to export a source code block with it's results, I want to add some text in-between, e.g. "Output:", because otherwise is very hard for the reader to understand where the program ends and the output begins - how do I achieve adding "Output:" in-between?
* Test #+BEGIN_SRC python :results output :exports both i = 5 print i i = i + 1 print i s = '''This is a multi-line string. This is the second line.''' print s #+END_SRC #+RESULTS: : 5 : 6 : This is a multi-line string. : This is the second line.
You need to name your source code block. Then, and only then, you can put your results part wherever you want, even before the source code block.
EDITED (add ECM):
#+name: my-block #+begin_src emacs-lisp (message "hello") #+end_src I can put paragraphs here... #+results: my-block : hello