Suvayu,

This is splendid news!  I will try it immediately upon return from "gone 
fishin" in a week...

 (erhm, that is, right after I figure out haw to migrate my orgmode SETUPFILE 
to comport with new export backend I just upgraded to.... my fancy TOC and 
org-export-html-table-tag javascript have "gone missin")

Future is looking bright!,

~ malcolm_c...@stowers.org

________________________________________
From: emacs-orgmode-bounces+mec=stowers....@gnu.org 
[emacs-orgmode-bounces+mec=stowers....@gnu.org] on behalf of Suvayu Ali 
[fatkasuvayu+li...@gmail.com]
Sent: Friday, July 19, 2013 5:23 AM
To: emacs-orgmode@gnu.org
Subject: Re: [O] Switch for exported file types when evaluating code blocks

On Thu, Jul 18, 2013 at 09:02:41PM -0400, Nick Dokos wrote:
>
> #+BEGIN_LaTeX
> \includesvg{foo}
> #+END_LaTeX

I believe even this can be integrated with Org using a filter.  How
about something like this:

(defun my-svg-graphics (contents backend info)
  (when (eq backend 'latex)
    (replace-regexp-in-string "\\`\\\\includegraphics.+\\({.+\.svg}\\)"
       "\\\\includesvg\1" contents)))

(add-to-list 'org-export-filter-link-functions 'my-svg-graphics)

Of course the above ignores the options since I do not know if
\includesvg takes the same options.  But that is a detail that can be
fixed by changing the regexp.

What do you think?


--
Suvayu

Open source is the future. It sets us free.


Reply via email to