emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: malcolm cook <malcolm.cook@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: how to handle svg files when exporting orgmode to html and pdf?
Date: Sat, 27 Jul 2013 02:36:09 -0400	[thread overview]
Message-ID: <87ppu4mrvq.fsf@gmail.com> (raw)
In-Reply-To: <loom.20130718T023027-869@post.gmane.org>

Hi Malcom,

2013ko uztailak 17an, malcolm cook-ek idatzi zuen:
> 
> Hi, 
> 
> I am creating .svg files with R source blocks and ESS in org. 
> 
> I am happily viewing them in-line in my emacs buffer. 
> 
> I am happily exporting as html and viewing them in-line in the resulting web 
> page, including a table of images. 
> 
> I do not have an approach for including them into PDF when I export-tex-pdf. 
> 
> I'm thinking there might be an approach to converting them on-the-fly to png 
> (or something) during the export->tex->pdf. 
> 
> A similar problem was addressed with custom macros here: 
> http://thread.gmane.org/gmane.emacs.orgmode/56532/focus=58322 
> 
> But it does not work with  R source blocks that produce .svg files. 
> 
> Any suggestions for me?  Is this a lost cause?  Am I asking for too many 
> assumptions to be made by such an auto-conversion process that it is doomed 
> to fail anyway?

I have been using a variant of this workflow with some success.  Using a
patch I just pushed to the master branch, you should be able to
successfully export SVG image files to LaTeX documents, using the “svg”
LaTeX package: http://www.ctan.org/pkg/svg

No configuration should be needed on the org side.

The svg LaTeX package is a bit fussy.  It only works under pdfTeX (it
can be patched to work with LuaTeX, but cannot work with XeTeX at all).
It also requires you to have the inkscape command line program
installed.  But within those constraints it works very nicely.

You may need to arrange for whatever compilation process you use for
LaTeX files to pass the “-shell-escape” command line option to pdftex.
This allows TeX code to execute command line programs, which is needed
to communicate with inkscape and convert the SVG into something LaTeX
can use.

I think in the long run it would be nice if Org could help you translate
the image types in your document into image types an exporter
understands (basically an expanded and generalized version of what is
already done with LaTeX snippets for non-LaTeX export).  But that is
a bigger project, I think.

-- 
Aaron Ecay

  reply	other threads:[~2013-07-27  6:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18  0:32 how to handle svg files when exporting orgmode to html and pdf? malcolm cook
2013-07-27  6:36 ` Aaron Ecay [this message]
2013-08-08 17:46   ` Malcolm Cook
2013-08-08 19:19     ` Nick Dokos
2013-08-08 21:15       ` Cook, Malcolm
2013-08-08 19:36     ` Aaron Ecay
2013-08-08 19:46       ` Malcolm Cook
2013-08-08 21:00         ` Aaron Ecay
2013-08-08 21:11           ` Malcolm Cook
2013-08-08 21:34             ` Aaron Ecay
2013-08-09  2:04               ` Malcolm Cook
2013-08-09 20:52                 ` Aaron Ecay
2013-08-09 21:01                 ` Cook, Malcolm
2013-10-28 19:18                   ` Cook, Malcolm
2013-10-28 20:02                     ` Aaron Ecay
2013-10-28 22:02                       ` Cook, Malcolm
2013-10-30  6:08                         ` Aaron Ecay
2013-08-09  4:43         ` Nick Dokos

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=87ppu4mrvq.fsf@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=malcolm.cook@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).