emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Switch for exported file types when evaluating code blocks


From: Nick Dokos
Subject: Re: [O] Switch for exported file types when evaluating code blocks
Date: Thu, 18 Jul 2013 21:02:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

"Cook, Malcolm" <address@hidden> writes:

> Hi Nick, I'm not sure how to use this ctan package in concert with
> orgmode's export to tex->pdf.
>

Here's a simplfied example of what I did with it. The source block uses
dot to produce an SVG file for illustration - if you already have one
then you can ignore it:

--8<---------------cut here---------------start------------->8---
#+LATEX_HEADER: \usepackage{svg}

* foo

#+name: foo
#+BEGIN_SRC dot :file foo.svg :exports results :results none
digraph foo {
  a -> b
}
#+END_SRC

#+BEGIN_LaTeX
\includesvg{foo}
#+END_LaTeX
--8<---------------cut here---------------end--------------->8---

> Perhaps there is a way to use orgmode's export filtering capability to
> swap in a up-to-date png when exporting to tex....

PNG is a raster format whereas SVG is a vector format. I was trying to
produce some slides and I did use PNG at first because it's easier to
fit into the pdflatex workflow. But when I made the slides full screen,
the PNG got fuzzy. Sticking with SVG got rid of the fuzzies for me.

>
> Hmmm....
>
> Anyone?
>
> Thx!
>
>  >-----Original Message-----
>  >From: address@hidden [mailto:address@hidden On
>  >Behalf Of Nick Dokos
>  >Sent: Wednesday, July 17, 2013 11:02 PM
>  >To: address@hidden
>  >Subject: Re: [O] Switch for exported file types when evaluating code blocks
>  >
>  >Suvayu Ali <address@hidden> writes:
>  >
>  >> Hello again Malcolm,
>  >>
>  >> On Thu, Jul 18, 2013 at 12:45:36AM +0000, Cook, Malcolm wrote:
>  >>>
>  >>> I tend to work with org-export-babel-evaluate set to nil.  Thus, my
>  >>> code blocks are not evaled in the context of an export.  Thus at
>  >>> eval time there is no way of knowing what the eventual backend is
>  >>> going to be.
>  >>>
>  >>> I think I need an approach that auto converts svg to png 
> on-demand/on-the-fly during export.
>  >>
>  >> In that case just use another source block with shell source.  In that
>  >> block you can call inkscape to do the conversion.  For an example, see
>  >> here:
>  >> 
> <http://ctan.mirrorcatalogs.com/info/svg-inkscape/InkscapePDFLaTeX.pdf#subsubsection.2.3.1>
>  >>
>  >
>  >OT for the OP (say that three times fast!) but maybe of some use to 
> somebody:
>  >
>  >For SVG, there is a latex package that is an evolutionary offshoot of
>  >the above link. It does the inkscape dance so you don't have to:
>  >
>  >   http://www.tex.ac.uk/ctan/graphics/svg/
>  >
>  >--
>  >Nick
>  >
>
>
>

-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]