From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Switch for exported file types when evaluating code blocks Date: Fri, 19 Jul 2013 12:23:15 +0200 Message-ID: <20130719102315.GB9369@kuru.dyndns-at-home.com> 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 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V07qK-0003st-Jt for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 06:23:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V07qJ-0003nT-KF for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 06:23:20 -0400 Received: from mail-ee0-x22a.google.com ([2a00:1450:4013:c00::22a]:51915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V07qJ-0003nJ-E0 for emacs-orgmode@gnu.org; Fri, 19 Jul 2013 06:23:19 -0400 Received: by mail-ee0-f42.google.com with SMTP id c4so2336445eek.1 for ; Fri, 19 Jul 2013 03:23:18 -0700 (PDT) Received: from kuru.dyndns-at-home.com ([2001:610:120:3001:f2de:f1ff:fe37:c76c]) by mx.google.com with ESMTPSA id b7sm26171015eef.16.2013.07.19.03.23.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jul 2013 03:23:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87zjtjcqfi.fsf@gmail.com> 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: emacs-orgmode@gnu.org 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.