From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: example filter for code blocks? Date: Thu, 26 Sep 2013 09:43:23 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPHTi-0005Kx-DS for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPHTc-0002A9-5v for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:43:58 -0400 Received: from oproxy9-pub.mail.unifiedlayer.com ([69.89.24.6]:56140) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1VPHTb-00029m-Tc for emacs-orgmode@gnu.org; Thu, 26 Sep 2013 15:43:52 -0400 In-Reply-To: (John Kitchin's message of "Thu, 26 Sep 2013 13:57:35 -0400") 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: John Kitchin Cc: emacs-orgmode@gnu.org 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