From: Malcolm Cook <malcolm.cook@gmail.com>
To: malcolm cook <malcolm.cook@gmail.com>,
emacs-orgmode@gnu.org, Nick Dokos <ndokos@gmail.com>,
Aaron Ecay <aaronecay@gmail.com>
Subject: Re: how to handle svg files when exporting orgmode to html and pdf?
Date: Thu, 8 Aug 2013 12:46:28 -0500 [thread overview]
Message-ID: <CAAAQmVbjx8aPJekyXX+pA+_J1Xt=h+gbuGznDuJTa5TsQiYHew@mail.gmail.com> (raw)
In-Reply-To: <87ppu4mrvq.fsf@gmail.com>
Aaron & Nick,
Thanks for the help. I think I'm almost there.
So far I did
* install a latex package (first time for everything). I wound up
just putting svg.sty file it for now in the same directory as the .org
file since my attempts to date failed using $HOME/texfm
* 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)
* 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
When I "export to latex as PDF file", I get error "PDF file ./test.pdf
wasn't produced"
Sleuthing, I see the output .tex file includes the following lines:
\usepackage{svg}
...
\includegraphics[width=.9\linewidth]{mtcars.png}
@@backend:\includesvg{mtcars}
However, when they get processed, and the includesvg seeks the pdf_tex
file, I get this error:
! LaTeX Error: File `mtcars.pdf_tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: pdf_tex)
Enter file name:
! Emergency stop.
<read *>
l.354 \includesvg{mtcars}
If you have any suggestions to me for further sleuthing I would be much obliged.
Thanks,
Malcolm Cook
On Sat, Jul 27, 2013 at 1:36 AM, Aaron Ecay <aaronecay@gmail.com> wrote:
>
> 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
next prev parent reply other threads:[~2013-08-08 17:47 UTC|newest]
Thread overview: 20+ 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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2013-07-18 0:25 Malcolm Cook
2013-07-18 0:47 ` Suvayu Ali
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAAQmVbjx8aPJekyXX+pA+_J1Xt=h+gbuGznDuJTa5TsQiYHew@mail.gmail.com' \
--to=malcolm.cook@gmail.com \
--cc=aaronecay@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.