[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ob-python.el: questions about output
From: |
Fraga, Eric |
Subject: |
Re: ob-python.el: questions about output |
Date: |
Mon, 24 Feb 2020 16:49:07 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Monday, 24 Feb 2020 at 08:18, Jack Kamm wrote:
> This sounds interesting. Do you know of any documentation or examples
> for :prologue and :epilogue? I checked the Worg page for ob-maxima, but
> it didn't mention these header arguments.
I don't know of any documentation. They basically simply provide
strings that are included before and after the text within the src block
before evaluation but are not exported in a code listing.
I can give you an example of how I use these with maxima:
#+header: :prologue "fpprintprec: 2; linel: 50;"
#+header: :epilogue "print(solution);"
#+begin_src maxima :exports both :results output :cache yes
solution: exp(1.0);
#+end_src
which sets the printing precision for numbers to 2 and the line length
to 50 and prints out the contents of the solution variable at the
end. These are details that are not important for display; I use these
settings all the time for my lecture slides.
The above example gives the following when exported to ascii:
,----
| solution: exp(1.0);
`----
,----
| 2.7
`----
so the slides can concentrate on the material that is important.
Adding such to ob-python etc. should not be difficult.
--
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880