emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Cook, Malcolm" <MEC@stowers.org>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Switch for exported file types when evaluating code blocks
Date: Fri, 19 Jul 2013 15:19:25 +0000	[thread overview]
Message-ID: <D4772401B9D976478C0895769BE3E79216F25E@MBSRV02.sgc.loc> (raw)
In-Reply-To: <20130719102315.GB9369@kuru.dyndns-at-home.com>

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_cook@stowers.org

________________________________________
From: emacs-orgmode-bounces+mec=stowers.org@gnu.org [emacs-orgmode-bounces+mec=stowers.org@gnu.org] on behalf of Suvayu Ali [fatkasuvayu+linux@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	other threads:[~2013-07-19 15:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 22:08 Switch for exported file types when evaluating code blocks Brett Viren
2013-07-18  0:45 ` Cook, Malcolm
2013-07-18  2:02   ` Suvayu Ali
2013-07-18  4:02     ` Nick Dokos
2013-07-18 19:06       ` Cook, Malcolm
2013-07-19  1:02         ` Nick Dokos
2013-07-19 10:23           ` Suvayu Ali
2013-07-19 15:19             ` Cook, Malcolm [this message]
2013-07-19 15:22           ` Cook, Malcolm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4772401B9D976478C0895769BE3E79216F25E@MBSRV02.sgc.loc \
    --to=mec@stowers.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).