emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Problem exporting table with images


From: Rainer M Krug
Subject: Re: [Orgmode] Re: Problem exporting table with images
Date: Wed, 09 Feb 2011 11:09:23 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15pre) Gecko/20110207 Lightning/1.0b2 Shredder/3.1.9pre

-----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:      address@hidden

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 via email to

[Prev in Thread] Current Thread [Next in Thread]