emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Fraga, Eric" <e.fraga@ucl.ac.uk>
To: Jack Kamm <jackkamm@gmail.com>
Cc: R C <recifx@gmail.com>, "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: ob-python.el: questions about output
Date: Mon, 24 Feb 2020 16:49:07 +0000	[thread overview]
Message-ID: <878sks53sv.fsf@ucl.ac.uk> (raw)
In-Reply-To: <875zfwx8km.fsf@gmail.com> (Jack Kamm's message of "Mon, 24 Feb 2020 08:18:33 -0800")

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

  reply	other threads:[~2020-02-24 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 16:43 ob-python.el: questions about output R C
2020-02-24  4:52 ` Jack Kamm
2020-02-24  4:53   ` Jack Kamm
2020-02-24  7:13   ` R C
2020-02-24 13:42     ` Fraga, Eric
2020-02-24 16:18       ` Jack Kamm
2020-02-24 16:49         ` Fraga, Eric [this message]
2020-02-24 16:17     ` Jack Kamm
2020-02-24 16:40       ` Fraga, Eric
2020-02-27  4:29       ` R C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sks53sv.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=jackkamm@gmail.com \
    --cc=recifx@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).