From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fraga, Eric" Subject: Re: ob-python.el: questions about output Date: Mon, 24 Feb 2020 16:49:07 +0000 Message-ID: <878sks53sv.fsf@ucl.ac.uk> References: <87eeuky4cn.fsf@gmail.com> <87sgj06r0y.fsf@ucl.ac.uk> <875zfwx8km.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44328) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Gut-0002Oo-PE for emacs-orgmode@gnu.org; Mon, 24 Feb 2020 11:49:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6Gus-0005i6-Nq for emacs-orgmode@gnu.org; Mon, 24 Feb 2020 11:49:11 -0500 Received: from mail-eopbgr80119.outbound.protection.outlook.com ([40.107.8.119]:44611 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6Gus-0005hd-B4 for emacs-orgmode@gnu.org; Mon, 24 Feb 2020 11:49:10 -0500 In-Reply-To: <875zfwx8km.fsf@gmail.com> (Jack Kamm's message of "Mon, 24 Feb 2020 08:18:33 -0800") Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Jack Kamm Cc: R C , "emacs-orgmode@gnu.org" 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=20 `---- so the slides can concentrate on the material that is important. Adding such to ob-python etc. should not be difficult. --=20 : Eric S Fraga via Emacs 28.0.50, Org release_9.3.6-354-g9d5880