From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Re: Problem exporting table with images Date: Wed, 09 Feb 2011 11:09:23 +0100 Message-ID: <4D5267D3.5010600@gmail.com> References: <4D5126D0.7020700@gmail.com> <80sjvyz44o.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=56059 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pn6zP-0004z4-QU for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 05:09:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pn6zO-00029o-BL for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 05:09:35 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:33406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pn6zO-00029X-3H for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 05:09:34 -0500 Received: by fxm12 with SMTP id 12so7366125fxm.0 for ; Wed, 09 Feb 2011 02:09:33 -0800 (PST) In-Reply-To: <80sjvyz44o.fsf@missioncriticalit.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?B?U8OpYmFzdGllbiBWYXViYW4=?= Cc: emacs-orgmode@gnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/08/2011 09:02 PM, Sébastien Vauban wrote: > Hi Rainer, > > Rainer M Krug wrote: >> #+TITLE: Export of images in table to pdf >> #+AUTHOR: Rainer M. Krug >> #+DATE: 2011-02-08 Tue >> >> Hi >> >> I have problems exporting this table with graphs to pdf: >> 1) when exporting, the links are retained, and okular tells me >> "malformed url" >> 2) I would like to have the graphs inserted instead of the links --- >> according to the manual, this should be done automatically, but it does >> not work. >> >> Is there something I am missing here? >> Cheers, >> >> Rainer >> >> * Generating the graphs >> #+begin_src R :results output org :exports both >> cat("|---|---|---|\n") >> for (x in 1:3) { >> for (y in 1:3) { >> pdf(paste("img", x, y, "pdf", sep=".")) >> plot(runif(100)) >> dev.off() >> } >> cat("|", paste(" [[file:img.1", x, "pdf", sep="."), "]] |", >> paste(" [[./img.2", x, "pdf", sep="."), "]] |", paste("[[./img.3", x, >> "pdf", sep="."), "]] |\n") >> } >> cat("|---|---|---|\n") >> #+end_src >> >> #+results: >> #+BEGIN_ORG >> |-------------------+----------------+----------------| >> | [[file:img.1.1.pdf ]] | [[./img.2.1.pdf ]] | [[./img.3.1.pdf ]] | >> | [[file:img.1.2.pdf ]] | [[./img.2.2.pdf ]] | [[./img.3.2.pdf ]] | >> | [[file:img.1.3.pdf ]] | [[./img.2.3.pdf ]] | [[./img.3.3.pdf ]] | >> |-------------------+----------------+----------------| >> #+END_ORG > > Don't know if that can be the source of the problem, but it appears you have > spaces after the filename, in your links. Partly - now I have: * Generating the graphs #+begin_src R :results output org :exports both cat("|---|---|---|\n") for (x in 1:3) { for (y in 1:3) { pdf(paste("img", x, y, "pdf", sep=".")) plot(runif(100)) dev.off() } cat("|", " [[file:img_1_", x, ".pdf", "]] |", " [[./img_2_", x, ".pdf", "]] |", "[[./img_3_", x, ".pdf", "]] |\n", sep="") } cat("|---|---|---|\n") #+end_src #+results: #+BEGIN_ORG |---|---|---| | [[file:img_1_1.pdf]] | [[./img_2_1.pdf]] |[[./img_3_1.pdf]] | | [[file:img_1_2.pdf]] | [[./img_2_2.pdf]] |[[./img_3_2.pdf]] | | [[file:img_1_3.pdf]] | [[./img_2_3.pdf]] |[[./img_3_3.pdf]] | |---|---|---| #+END_ORG The table is translated to LaTeX as: \begin{tabular}{lll} \hline \includegraphics[width=10em]{./img_1_1.pdf} & \includegraphics[width=10em]{./img_2_1.pdf} & \includegraphics[width=10em]{./img_3_1.pdf} \\ \includegraphics[width=10em]{./img_1_2.pdf} & \includegraphics[width=10em]{./img_2_2.pdf} & \includegraphics[width=10em]{./img_3_2.pdf} \\ \includegraphics[width=10em]{./img_1_3.pdf} & \includegraphics[width=10em]{./img_2_3.pdf} & \includegraphics[width=10em]{./img_3_3.pdf} \\ \hline \end{tabular} Which gives the following error: #### LaTeX Warning: File `./img_1_1.pdf' not found on input line 68. !pdfTeX error: pdflatex (file ./img_1_1.pdf): cannot find image file ==> Fatal error occurred, no output PDF file produced! #### So do I have to provide absolute paths to the graphs? Cheers, Rainer > Best regards, > Seb > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1SZ9MACgkQoYgNqgF2egqNCACcDoJzyUk02hEWWOHsnM9RkKw9 52EAnjB3HuJlNzUo6PrAdWQlqTbBaV8H =x8b/ -----END PGP SIGNATURE-----