Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Suvayu Ali <fatkasuvayu+linux <at> gmail.com>
Subject: Re: Switch for exported file types when evaluating code blocks
Newsgroups: gmane.emacs.orgmode
Date: Friday 19th July 2013 10:23:15 UTC (over 4 years ago)
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.
 
CD: 3ms