From: "Cook, Malcolm" <MEC@stowers.org>
To: 'Malcolm Cook' <malcolm.cook@gmail.com>,
"'emacs-orgmode@gnu.org'" <emacs-orgmode@gnu.org>,
'Nick Dokos' <ndokos@gmail.com>,
'Suvayu Ali' <fatkasuvayu+linux@gmail.com>,
'Eric Schulte' <schulte.eric@gmail.com>,
'Vincent Beffara' <vbeffara@ens-lyon.fr>,
"'Thomas S. Dye'" <tsd@tsdye.com>,
"'philten@cern.ch'" <philten@cern.ch>,
'Charles Berry' <ccberry@ucsd.edu>,
'Aaron Ecay' <aaronecay@gmail.com>
Subject: Re: how to handle svg files when exporting orgmode to html and pdf?
Date: Mon, 28 Oct 2013 19:18:19 +0000 [thread overview]
Message-ID: <D4772401B9D976478C0895769BE3E792C1A613@MBSRV02.sgc.loc> (raw)
In-Reply-To: <D4772401B9D976478C0895769BE3E792BC233C@MBSRV02.sgc.loc>
Thomas, Suvayu, Aaron, Nick, Eric, Carsten, Phil, et al,
Hi again!
Can I re-open this thread to discuss two new issues I now experience with emacs 24.3.1 and orgmode version 8.2.1 in the handling of svg => tex => pdf ?
Here goes:
1) If the plot has text in it which contains a percent character (%), then we fail due to https://bugs.launchpad.net/inkscape/+bug/857231
2) If the :file is in a sub-directory (for example, `:file fig/mtcars.svg`), even though both ./fig/mtcars.pdf_tex and ./fig/mtcars.pdf are created, the reference to the .pdf in the .pdf_tex is not interpreted relative to the subdirectory, but rather to the parent, and so the .pdf is not found.
The workaround for (1) is to not use '%' as a label on my plots.
The workaround for (2) is to not put my figures in a './fig/' subdirectory.
I suppose the fix for (1) is to get the inkscape export 'fixed' to (optionally) escape the labels, and to take the option. Thoughts?
I suppose the fix for (2) is somewhere in the org code. Any takers?
Or, any other fixes suggested?
Thanks!
Malcolm
>-----Original Message-----
>From: emacs-orgmode-bounces+mec=stowers.org@gnu.org [mailto:emacs-orgmode-bounces+mec=stowers.org@gnu.org] On
>Behalf Of Cook, Malcolm
>Sent: Friday, August 09, 2013 4:01 PM
>To: 'Malcolm Cook'; 'emacs-orgmode@gnu.org'; 'Nick Dokos'; 'Suvayu Ali'; 'Eric Schulte'; 'Vincent Beffara'; 'Thomas S. Dye';
>'philten@cern.ch'; 'Charles Berry'; 'Aaron Ecay'
>Subject: Re: [O] how to handle svg files when exporting orgmode to html and pdf?
>
>Thomas, Suvayu, Aaron, Nick, Eric, Carsten, Phil, et al,
>
>Thanks for all your help.
>
>I am now satisfied with approach for exporting images to inline html and inline latex=>pdf.
>
>In my hands, the following code block will produce in-line images in html and be included in exported pdf.
>
>#+LATEX_HEADER: \usepackage{svg}
>#+begin_src R :results graphics output :exports both :file mtcars.svg
>with(mtcars,plot(wt, mpg))
>#+end_src
>
>I am using:
> Emacs 24.3.1
> Suvayus orgmode export filter:
>
>(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)
>
>* svg latex package v1.0 2004/11/05
>
> * customize the emacs variable `org-latex-pdf-process` to include
>'--shell-escape' (following advice in
>http://orgmode.org/worg/org-dependencies.html, which outlines some
>other options)
>
>* customize org-export-html-inline-image-extensions to include "svg"
>
> * upgrade to inkscape version 0.48.+ (which is more recent than our
>centOS repos proffered, but, hey) since the --export-latex switch that
>svg.sty depends upon is not implemented till this version
>
>* upgrade org-mode version 8.0.7-377 built from git pull yesterday
>
>I think I've covered all the pieces.
>
>I have not explored how/whether any options passed to includegraphics are interpreted by includesvg.
>
>Now, if I could get .svg images to display inline in my emacs buffer. The following is not respected, at least in my hands.
> '(org-export-latex-inline-image-extensions (quote ("pdf" "jpeg" "jpg" "png" "ps" "eps" "svg")))
>Any takers?
>
>
>~ Malcolm
>
>
>
> >-----Original Message-----
> >From: emacs-orgmode-bounces+mec=stowers.org@gnu.org [mailto:emacs-orgmode-bounces+mec=stowers.org@gnu.org] On
> >Behalf Of Malcolm Cook
> >Sent: Thursday, August 08, 2013 9:05 PM
> >To: Malcolm Cook; emacs-orgmode@gnu.org; Nick Dokos
> >Subject: Re: [O] how to handle svg files when exporting orgmode to html and pdf?
> >
> >Aaron,
> >
> >Thanks for staying with me on this.
> >
> >I'm not sure what you're suggesting.
> >
> >Nonetheless, I just updated org from `git clone git://orgmode.org/org-mode.git`
> >
> >So, now I'm got org-version release_8.0.7-377-gef2d47.dirty.
> >
> >Are you suggesting that with this patch.svg created with exporting
> >graphics :file should now display in the emacs buffer when I toggle
> >display of inline images? I wish they would. They do not, despite my
> >adding "svg" to org-export-latex-inline-image-extensions.
> >
> >Are you suggesting that such a .svg created by org code block would be
> >appear in the pdf created when I export to latex -> pdf? I wish that
> >also... that's what I've been trying to accomplish.
> >
> >Thanks!,
> >
> >
> >Malcolm
> >
> >
> >PS - I see you are/were in PA in linguistics. My first job after my
> >masters in AI from U Mass was at CMU's psych dept as a lisp programmer
> >for John Anderson's intelligent tutoring systems. I then went on in
> >computational linguistics a bit, working on a marcus parser based
> >natural language processing system at wang labs. Ages ago. Now I'm
> >in computational biology. The one commonality through it all? Emacs!
> >--
> >Malcolm Cook
> >h - 913.642.5257
> >c - 913.226.1542
> >w - 816.926.4449
> >
> >
> >On Thu, Aug 8, 2013 at 4:34 PM, Aaron Ecay <aaronecay@gmail.com> wrote:
> >> Hi Malcom,
> >>
> >> There is a patch that was added to the master branch of the org git
> >> repository on Jul 27, which turns this from a link into a real inclusion
> >> of the image. So, it will only work as intended if you are using a git
> >> checkout from after that date.
> >>
> >> My apologies, I should have made this more prominent in my earlier
> >> mails.
> >>
> >> --
> >> Aaron Ecay
>
next prev parent reply other threads:[~2013-10-28 19:18 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
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 [this message]
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=D4772401B9D976478C0895769BE3E792C1A613@MBSRV02.sgc.loc \
--to=mec@stowers.org \
--cc=aaronecay@gmail.com \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=fatkasuvayu+linux@gmail.com \
--cc=malcolm.cook@gmail.com \
--cc=ndokos@gmail.com \
--cc=philten@cern.ch \
--cc=schulte.eric@gmail.com \
--cc=tsd@tsdye.com \
--cc=vbeffara@ens-lyon.fr \
/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).