From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer@krugs.de (Rainer M. Krug) Subject: Re: Best practices for literate programming [was: Latex export of tables] Date: Wed, 17 Apr 2013 11:55:50 +0200 Message-ID: <871ua9pjkp.fsf@krugs.de> References: <20130412080600.GA18235@panahar> <20130414232953.GC11696@kuru.dyndns-at-home.com> <20130416115619.GA12405@panahar> <20130416173948.GC7402@kuru.dyndns-at-home.com> <20130416221022.GA7809@panahar> <20130417063930.GA14455@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USP5t-0004fw-92 for emacs-orgmode@gnu.org; Wed, 17 Apr 2013 05:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USP5n-0005bF-6r for emacs-orgmode@gnu.org; Wed, 17 Apr 2013 05:56:01 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USP5m-0005b2-Vp for emacs-orgmode@gnu.org; Wed, 17 Apr 2013 05:55:55 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so1372598wgg.4 for ; Wed, 17 Apr 2013 02:55:54 -0700 (PDT) In-Reply-To: <20130417063930.GA14455@kuru.dyndns-at-home.com> (Suvayu Ali's message of "Wed, 17 Apr 2013 08:39:30 +0200") 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Suvayu Ali Cc: emacs-orgmode@gnu.org Suvayu Ali writes: > Hi Vikas, > > On Wed, Apr 17, 2013 at 03:40:22AM +0530, Vikas Rawal wrote: >> >> > At one point I realised the problem and made the decision to >> > split things into two kinds of files: static content (document >> > structuring, text, plots, etc), and dynamic content (babel, TikZ blocks >> > that generate tables, plots, figures, etc used by the static content >> > files). It is still reproducible research, but modular and less hacky >> > (hence more stable). >> >> This is indeed a very neat approach. Would you kindly elaborate? >> >> Would it be too much work for you to get some illustrations from your >> work? > > Well ... it was couple of years back, the Org version was quite > different, e.g. babel was rapidly evolving. It might be a fair bit of > work to get it working again. That said, last year I gave a talk in an > internal workshop, I made the plots with the attached file. I didn't > spend time to make sure everything is pretty, so the legend and titles > might be a little wonky. Just evaluating the two main source blocks > should give you two plots in pdf files. > >> In your scheme of things, how do you finally combine the static and >> the dynamic content? >> >> Any chance that you could release the source of something like a >> chapter of your thesis for people to see? Or may be create something >> with dummy content? > > The idea is to keep the dynamic content on separate org files which you > export less frequently during the course of your writing, e.g. any > tables that are inputs for source blocks. Evaluating these blocks, or > exporting these dynamic files (whichever is your preference) generates > the graphic which is then used in the static file. This is not limited > to plots, you could write org/LaTeX tables to separate files. You can > then easily include those in your static files. > > My main motivation for this was to make the export process simpler. And > since the complicated interacting bits are all isolated and modularised, > there are fewer things that go wrong and many files are updated only > when required, hence faster too! > > Anyway, this is all probably very vague without working examples. I'll > try to come up with something, but I have been rather busy for the last > year or so and do not see any sign of respite in the near future :-/. > I'll get this fleshed out at some point, just don't know how soon. > > Hope this was helpful in some way, > > :) <#secure method=pgpmime mode=sign> I did not follow the initial thread, but the new header caught my attentian, as I am doing something similar with papers. Nothing against org for writing papers, but I prefer LyX [1]. But for doing the analysis, org together, nothing beats org. So in my org file I have the analysis which creates graphs on export (and a basic report of the analysis, including all the source code necessary, which I can then use as an appendix for the paper). These graphs are then inserted in the lyx file. I assume, you used something similar, only that the oputput can then be used in the org file (thesis) - correct? Cheers, Rainer Footnotes: [1] http://www.lyx.org - very nice LaTeX frontend. -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug