From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: example filter for code blocks? Date: Fri, 27 Sep 2013 08:59:36 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d4b80fa999d04e75d0ed9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPXe0-0002QT-FV for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPXdy-0005lr-0o for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:59:40 -0400 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]:38069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPXdx-0005lk-Le for emacs-orgmode@gnu.org; Fri, 27 Sep 2013 08:59:37 -0400 Received: by mail-pb0-f41.google.com with SMTP id rp2so2556972pbb.28 for ; Fri, 27 Sep 2013 05:59:36 -0700 (PDT) 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" --047d7b5d4b80fa999d04e75d0ed9 Content-Type: text/plain; charset=ISO-8859-1 Actually, it turns out the publisher did put up the pdf with embedded files, you just can't open them in a pdf in a browser. If you download the file and open in a good pdf reader, you can open the embedded files. It just made my day to figure that out! This link: http://pubs.acs.org/doi/suppl/10.1021/ie400582a/suppl_file/ie400582a_si_001.pdf is a supporting information file created from org-mode, with embedded excel sheets, and the org-file that was exported to the pdf! It contains all of the data used to make the figures in the paper, along with the python scripts we used to make the figures. It is probably our most complete supplemental file ever. And, this file is freely available (although the manuscript requires a subscription to the journal). We actually wrote the manuscript in org-mode too, and submitted the latex source that was exported from the org-file. Now, if we can just get publishers to let us embed the org-source of the manuscript in the supporting information file so at least the content is available for free... 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 4:58 PM, Thomas S. Dye wrote: > Hi John, > > Terrific! There go my plans for the weekend ... :) > > Good luck with the heavy-handed journal processor. It seems worth > pursuing to me. > > All the best, > Tom > > John Kitchin writes: > > > 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 > >> > > 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 > > > > > > -- > T.S. Dye & Colleagues, Archaeologists > 735 Bishop St, Suite 315, Honolulu, HI 96813 > Tel: 808-529-0866, Fax: 808-529-0884 > http://www.tsdye.com > --047d7b5d4b80fa999d04e75d0ed9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Actually, it turns out the publisher did pu= t up the pdf with embedded files, you just can't open them in a pdf in = a browser. If you download the file and open in a good pdf reader, you can = open the embedded files. It just made my day to figure that out!

This link: http://pubs.acs.org/doi/suppl/10.1021= /ie400582a/suppl_file/ie400582a_si_001.pdf

is a supporting= information file created from org-mode, with embedded excel sheets, and th= e org-file that was exported to the pdf! It contains all of the data used t= o make the figures in the paper, along with the python scripts we used to m= ake the figures.=A0 It is probably our most complete supplemental file ever= . And, this file is freely available (although the manuscript requires a su= bscription to the journal).

We actually wrote the manuscript in org-mode too, and submitted t= he latex source that was exported from the org-file. Now, if we can just ge= t publishers to let us embed the org-source of the manuscript in the suppor= ting information file so at least the content is available for free...


John

-----------------------------------
John Kitch= in
Associate Professor
Doherty Hall A207F
Department of Chemical E= ngineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingr= oup.cheme.cmu.edu



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

Terrific! There go my plans for the weekend ... :)

Good luck with the heavy-handed journal processor. =A0It seems worth
pursuing to me.

All the best,
Tom

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

> 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, usi= ng
> attachfile to embed data files and scripts in the pdf. Unfortunately, = the
> journal "processed" the pdf file, and stripped those files o= ut ;( We
> haven't tried to see if we can get our original supplemental pdf a= ccepted.
>
>
> 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 <tsd@tsdye.com> wrote:
>
>> Hi John,
>>
>> John Kitchin <jkitch= in@andrew.cmu.edu> writes:
>>
>> > Hi everyone,
>> > Thanks for =A0the tips in using export filters for code block= s. I thought I
>> > would share my current solution. The goal was to export all t= he 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 t= o 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 o= f
>> reproducible research. I suspect most readers would prefer to have= a pdf
>> entry point into a compendium over an Org-mode entry point. Instea= d of
>> distributing the Org-mode file that is configured to make a pdf fi= le,
>> carry out calculations, draw figures, etc., one could distribute a=
>> ready-made pdf file with an appendix of Supplementary Material tha= t has
>> all the code for calculations, figures, etc.
>>
>> What do you think?
>>
>> All the best,
>> Tom
>>
>> --
>> Thomas S. Dye
>> http://www.tsdy= e.com
>>
> 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 str= ipped
> those files out ;( We haven't tried to see if we can get our origi= nal
> 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 <tsd@tsdye.com> wrote:
>
> =A0 =A0 Hi John,
>
>
> =A0 =A0 John Kitchin <jk= itchin@andrew.cmu.edu> writes:
>
> =A0 =A0 > Hi everyone,
> =A0 =A0 > Thanks for the tips in using export filters for code bloc= ks. I
> =A0 =A0 thought I
> =A0 =A0 > would share my current solution. The goal was to export a= ll the
> =A0 =A0 code blocks
> =A0 =A0 > in an org-file to files systematically named part1/script= -%d.py
> =A0 =A0 where %d is
> =A0 =A0 > a number. I didnot want to tangle exactly, because I want= ed to
> =A0 =A0 avoid naming
> =A0 =A0 > the code block tangle files.
> =A0 =A0 >
> =A0 =A0 > Then, I wanted to insert a pdf link that would open the f= ile,
> =A0 =A0 after the
> =A0 =A0 > syntax highlighted code.
> =A0 =A0 >
> =A0 =A0 > I wanted this because it is not convenient to copy and pa= ste the
> =A0 =A0 > syntax-highlighted code into an editor. I teach from the = pdf
> =A0 =A0 that is
> =A0 =A0 > generated, and it would be convenient to just open the co= de,
> =A0 =A0 edit and rerun
> =A0 =A0 > to explore solutions.
>
>
> =A0 =A0 This seems like it might be an elegant way to distribute a pie= ce
> =A0 =A0 of
> =A0 =A0 reproducible research. I suspect most readers would prefer to = have
> =A0 =A0 a pdf
> =A0 =A0 entry point into a compendium over an Org-mode entry point. > =A0 =A0 Instead of
> =A0 =A0 distributing the Org-mode file that is configured to make a pd= f
> =A0 =A0 file,
> =A0 =A0 carry out calculations, draw figures, etc., one could distribu= te a
> =A0 =A0 ready-made pdf file with an appendix of Supplementary Material=
> =A0 =A0 that has
> =A0 =A0 all the code for calculations, figures, etc.
>
> =A0 =A0 What do you think?
>
> =A0 =A0 All the best,
> =A0 =A0 Tom
>
> =A0 =A0 --
> =A0 =A0 Thomas S. Dye
> =A0 =A0 http://www.= tsdye.com
>
>

--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, = Fax: 808-529-0884 http://www.tsdye.com=

--047d7b5d4b80fa999d04e75d0ed9--