From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: Switch for exported file types when evaluating code blocks Date: Fri, 19 Jul 2013 15:22:17 +0000 Message-ID: References: <20130718020206.GB24529@kuru.dyndns-at-home.com> <8761w8ecsb.fsf@gmail.com> , <87zjtjcqfi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0CVi-00036w-MY for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:22:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0CVh-00018d-4D for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:22:22 -0400 Received: from smtp01.stowers.org ([12.201.176.61]:59506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0CVg-00018X-T0 for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 11:22:21 -0400 In-Reply-To: <87zjtjcqfi.fsf@gmail.com> 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos , "emacs-orgmode@gnu.org" Great Example, Nick, Thanks, will push on with this approach....=0A= =0A= ~ malcolm_cook@stowers.org=0A= =0A= ________________________________________=0A= From: emacs-orgmode-bounces+mec=3Dstowers.org@gnu.org [emacs-orgmode-bounce= s+mec=3Dstowers.org@gnu.org] on behalf of Nick Dokos [ndokos@gmail.com]=0A= Sent: Thursday, July 18, 2013 8:02 PM=0A= To: emacs-orgmode@gnu.org=0A= Subject: Re: [O] Switch for exported file types when evaluating code blocks= =0A= =0A= "Cook, Malcolm" writes:=0A= =0A= > Hi Nick, I'm not sure how to use this ctan package in concert with=0A= > orgmode's export to tex->pdf.=0A= >=0A= =0A= Here's a simplfied example of what I did with it. The source block uses=0A= dot to produce an SVG file for illustration - if you already have one=0A= then you can ignore it:=0A= =0A= --8<---------------cut here---------------start------------->8---=0A= #+LATEX_HEADER: \usepackage{svg}=0A= =0A= * foo=0A= =0A= #+name: foo=0A= #+BEGIN_SRC dot :file foo.svg :exports results :results none=0A= digraph foo {=0A= a -> b=0A= }=0A= #+END_SRC=0A= =0A= #+BEGIN_LaTeX=0A= \includesvg{foo}=0A= #+END_LaTeX=0A= --8<---------------cut here---------------end--------------->8---=0A= =0A= > Perhaps there is a way to use orgmode's export filtering capability to=0A= > swap in a up-to-date png when exporting to tex....=0A= =0A= PNG is a raster format whereas SVG is a vector format. I was trying to=0A= produce some slides and I did use PNG at first because it's easier to=0A= fit into the pdflatex workflow. But when I made the slides full screen,=0A= the PNG got fuzzy. Sticking with SVG got rid of the fuzzies for me.=0A= =0A= >=0A= > Hmmm....=0A= >=0A= > Anyone?=0A= >=0A= > Thx!=0A= >=0A= > >-----Original Message-----=0A= > >From: emacs-orgmode-bounces+mec=3Dstowers.org@gnu.org [mailto:emacs-org= mode-bounces+mec=3Dstowers.org@gnu.org] On=0A= > >Behalf Of Nick Dokos=0A= > >Sent: Wednesday, July 17, 2013 11:02 PM=0A= > >To: emacs-orgmode@gnu.org=0A= > >Subject: Re: [O] Switch for exported file types when evaluating code bl= ocks=0A= > >=0A= > >Suvayu Ali writes:=0A= > >=0A= > >> Hello again Malcolm,=0A= > >>=0A= > >> On Thu, Jul 18, 2013 at 12:45:36AM +0000, Cook, Malcolm wrote:=0A= > >>>=0A= > >>> I tend to work with org-export-babel-evaluate set to nil. Thus, my= =0A= > >>> code blocks are not evaled in the context of an export. Thus at=0A= > >>> eval time there is no way of knowing what the eventual backend is=0A= > >>> going to be.=0A= > >>>=0A= > >>> I think I need an approach that auto converts svg to png on-demand/o= n-the-fly during export.=0A= > >>=0A= > >> In that case just use another source block with shell source. In tha= t=0A= > >> block you can call inkscape to do the conversion. For an example, se= e=0A= > >> here:=0A= > >> =0A= > >>=0A= > >=0A= > >OT for the OP (say that three times fast!) but maybe of some use to som= ebody:=0A= > >=0A= > >For SVG, there is a latex package that is an evolutionary offshoot of= =0A= > >the above link. It does the inkscape dance so you don't have to:=0A= > >=0A= > > http://www.tex.ac.uk/ctan/graphics/svg/=0A= > >=0A= > >--=0A= > >Nick=0A= > >=0A= >=0A= >=0A= >=0A= =0A= --=0A= Nick=0A= =0A= =0A=