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: Suvayu Ali
Subject: Re: [O] Switch for exported file types when evaluating code blocks
Date: Fri, 19 Jul 2013 12:23:15 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

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

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