[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] how to handle svg files when exporting orgmode to html and pdf?
From: |
Cook, Malcolm |
Subject: |
Re: [O] how to handle svg files when exporting orgmode to html and pdf? |
Date: |
Mon, 28 Oct 2013 22:02:16 +0000 |
Hi Aaron,
>> 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
>
>It sounds from
><https://bugs.launchpad.net/inkscape/+bug/719320/comments/3> as though
>inkscape makes a deliberate effort to support LaTeX markup in their
>pdf+latex output. So it’s not surprising that % is a problem.
>
>It’s unfortunate from the perspective of having a single SVG file that
>works in both HTML and LaTeX, but I don’t know if that is an argument
>that will cut ice with them. I don’t know what org can/should do to
>patch around inkscape’s design decisions.
Indeed! So, I made a suggestion to 'fix' (?) Inkscape here:
https://bugs.launchpad.net/inkscape/+bug/719320
Let's see if I get any traction on that!
>
>Certainly the svg LaTeX package could be patched to use inkscape’s pdf
>export, instead of the pdf+latex one. This would lose the nice fonts
>that running the text through latex nets you, but get rid of the %
>annoyances.
>
>>
>> 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.
>
>Have you looked at the \graphicspath macro from the graphics package?
><http://www.tex.ac.uk/cgi-bin/texfaq2html?label=graphicspath>. You may
>be able to get things to work by adding \graphicspath{{fig/}} (note the
>double braces) to your document. \setsvg{svgpath=fig/} from the svg
>package may also/additionally be needed.
>
Excellent! Adding to the top of my emacs .org file the following allowed it to
work.
#+LATEX_HEADER: \graphicspath{{fig/}}
Much better workaround. But still a workaround?
~ Malcolm
>Aaron
>
>PS Maybe org should be generating the \includesvg command relative to
>the graphicspath or svgpath – I’m not sure. But let us know if setting
>those variables works at all, and if so we can think about adding
>support to org.
>
>--
>Aaron Ecay