emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Problem exporting table with images
Date: Wed, 09 Feb 2011 11:09:23 +0100	[thread overview]
Message-ID: <4D5267D3.5010600@gmail.com> (raw)
In-Reply-To: <80sjvyz44o.fsf@missioncriticalit.com>

-----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-----

  reply	other threads:[~2011-02-09 10:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 11:19 Problem exporting table with images Rainer M Krug
2011-02-08 20:02 ` Sébastien Vauban
2011-02-09 10:09   ` Rainer M Krug [this message]
2011-02-09 10:36     ` Sébastien Vauban
2011-02-09 11:21       ` Rainer M Krug

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=4D5267D3.5010600@gmail.com \
    --to=r.m.krug@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.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).