From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: example filter for code blocks? Date: Thu, 26 Sep 2013 15:48:50 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b86f558ab2f9f04e74ea8d7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPHYV-0007df-Uq for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:48:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPHYR-0003im-JV for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:48:55 -0400 Received: from mail-pb0-x232.google.com ([2607:f8b0:400e:c01::232]:49039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPHYR-0003ib-7k for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:48:51 -0400 Received: by mail-pb0-f50.google.com with SMTP id uo5so1572491pbc.37 for ; Thu, 26 Sep 2013 12:48:50 -0700 (PDT) In-Reply-To: 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: "Thomas S. Dye" Cc: "emacs-orgmode@gnu.org" --047d7b86f558ab2f9f04e74ea8d7 Content-Type: text/plain; charset=ISO-8859-1 I think it is so interesting, we have actually tried a variation of it! I set up an org-file that exported a supplementary information file, using attachfile to embed data files and scripts in the pdf. Unfortunately, the journal "processed" the pdf file, and stripped those files out ;( We haven't tried to see if we can get our original supplemental pdf accepted. John ----------------------------------- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Thu, Sep 26, 2013 at 3:43 PM, Thomas S. Dye wrote: > Hi John, > > John Kitchin writes: > > > Hi everyone, > > Thanks for the tips in using export filters for code blocks. I thought I > > would share my current solution. The goal was to export all the code > blocks > > in an org-file to files systematically named part1/script-%d.py where %d > is > > a number. I didnot want to tangle exactly, because I wanted to avoid > naming > > the code block tangle files. > > > > Then, I wanted to insert a pdf link that would open the file, after the > > syntax highlighted code. > > > > I wanted this because it is not convenient to copy and paste the > > syntax-highlighted code into an editor. I teach from the pdf that is > > generated, and it would be convenient to just open the code, edit and > rerun > > to explore solutions. > > This seems like it might be an elegant way to distribute a piece of > reproducible research. I suspect most readers would prefer to have a pdf > entry point into a compendium over an Org-mode entry point. Instead of > distributing the Org-mode file that is configured to make a pdf file, > carry out calculations, draw figures, etc., one could distribute a > ready-made pdf file with an appendix of Supplementary Material that has > all the code for calculations, figures, etc. > > What do you think? > > All the best, > Tom > > -- > Thomas S. Dye > http://www.tsdye.com > --047d7b86f558ab2f9f04e74ea8d7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I think it is so interesting, we have actually tried = a variation of it! I set up an org-file that exported a supplementary infor= mation file, using attachfile to embed data files and scripts in the pdf. U= nfortunately, the journal "processed" the pdf file, and stripped = those files out ;( We haven't tried to see if we can get our original s= upplemental pdf accepted.


John
<= br>-----------------------------------
John Kitchin
Associate Profess= or
Doherty Hall A207F
Department of Chemical Engineering
Carnegie = Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

<= /div>

On Thu, Sep 26, 2013 at 3:43 PM, Thomas = S. Dye <tsd@tsdye.com> wrote:
Hi John,

John Kitchin <jkitchin@andrew= .cmu.edu> writes:

> Hi everyone,
> Thanks for =A0the tips in using export filters for code blocks. I thou= ght I
> would share my current solution. The goal was to export all the code b= locks
> in an org-file to files systematically named part1/script-%d.py where = %d is
> a number. I didnot want to tangle exactly, because I wanted to avoid n= aming
> the code block tangle files.
>
> Then, I wanted to insert a pdf link that would open the file, after th= e
> syntax highlighted code.
>
> I wanted this because it is not convenient to copy and paste the
> syntax-highlighted code into an editor. I teach from the pdf that is > generated, and it would be convenient to just open the code, edit and = rerun
> to explore solutions.

This seems like it might be an elegant way to distribute a piece of reproducible research. I suspect most readers would prefer to have a pdf entry point into a compendium over an Org-mode entry point. Instead of
distributing the Org-mode file that is configured to make a pdf file,
carry out calculations, draw figures, etc., one could distribute a
ready-made pdf file with an appendix of Supplementary Material that has
all the code for calculations, figures, etc.

What do you think?

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com=

--047d7b86f558ab2f9f04e74ea8d7--