emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with exporting image to PDF
@ 2011-08-25  0:57 Toby
  2011-08-25  1:25 ` Thomas S. Dye
  0 siblings, 1 reply; 6+ messages in thread
From: Toby @ 2011-08-25  0:57 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I am new to org-mode so really just trying to learn the ropes. If anyone can help me figure out how to export images to PDF I would appreciate it as I can't get it to work despite trying various methods in the .org file.

1. [[./images/1.png]]
2. [[./images/1.eps]]
3. #+LaTeX: \includegraphics[width=5em]{./images/1.eps}

The above produce no graphics (or showing the link to the file) in the PDF which is successfully created with C-c C-e d

I have tried different classes (article and koma-article) such as:
#+LaTeX_CLASS: koma-article
#+LaTeX_CLASS_OPTIONS: [a4paper]

I am using:
Debian Squeeze
GNU Emacs 23.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.20.1)
I have installed: texlive and texlive-latex-extra

Thank you in advance for any suggestions on where I should be looking, or further information I should be providing to help diagnose the problem.

Cheers,
Toby

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with exporting image to PDF
  2011-08-25  0:57 Problem with exporting image to PDF Toby
@ 2011-08-25  1:25 ` Thomas S. Dye
  2011-08-25  1:59   ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2011-08-25  1:25 UTC (permalink / raw)
  To: Toby; +Cc: emacs-orgmode

Toby <orgmode@freerangekiwi.com> writes:

> Hello,
>
> I am new to org-mode so really just trying to learn the ropes. If anyone can help me figure out how to export images to PDF I would appreciate it as I can't get it to work despite trying various methods in the .org file.
>
> 1. [[./images/1.png]]
> 2. [[./images/1.eps]]
> 3. #+LaTeX: \includegraphics[width=5em]{./images/1.eps}
>
> The above produce no graphics (or showing the link to the file) in the PDF which is successfully created with C-c C-e d
>
> I have tried different classes (article and koma-article) such as:
> #+LaTeX_CLASS: koma-article
> #+LaTeX_CLASS_OPTIONS: [a4paper]
>
> I am using:
> Debian Squeeze
> GNU Emacs 23.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.20.1)
> I have installed: texlive and texlive-latex-extra
>
> Thank you in advance for any suggestions on where I should be looking, or further information I should be providing to help diagnose the problem.
>
> Cheers,
> Toby
>
>
Aloha Toby,

Welcome to Org-mode.

Typically, for questions like yours, you will need to provide something
the Org-mode community calls an ECM, which is an acronym for a minimal
complete example.  The example should fail to produce the results you
expect, which you should specify, and it should contain as little other
material as possible.  In your case you might want to share the ECM
Org-mode file and the resulting .tex file.

Out of the box, Org-mode uses pdflatex to create pdf from LaTeX source
(although this can be modified).  Pdflatex does not accept eps files for
graphic input, so this might have been part of your problem.  It does
accept png files, though, so it appears something else might be going
on.

You might also check your Org-mode version.  I don't keep up with the
various Linux distributions but I understand that some of them ship old
versions of Org-mode.  The current version is 7.7 and you'll want to use
something fairly close to that.

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with exporting image to PDF
  2011-08-25  1:25 ` Thomas S. Dye
@ 2011-08-25  1:59   ` Nick Dokos
  2011-08-25  7:30     ` suvayu ali
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2011-08-25  1:59 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: nicholas.dokos, emacs-orgmode, Toby

Thomas S. Dye <tsd@tsdye.com> wrote:

> Toby <orgmode@freerangekiwi.com> writes:
> 
> > Hello,
> >
> > I am new to org-mode so really just trying to learn the ropes. If anyone can help me figure out how to export images to PDF I would appreciate it as I can't get it to work despite trying various methods in the .org file.
> >
> > 1. [[./images/1.png]]
> > 2. [[./images/1.eps]]
> > 3. #+LaTeX: \includegraphics[width=5em]{./images/1.eps}
> >
> > The above produce no graphics (or showing the link to the file) in the PDF which is successfully created with C-c C-e d
> >
> > I have tried different classes (article and koma-article) such as:
> > #+LaTeX_CLASS: koma-article
> > #+LaTeX_CLASS_OPTIONS: [a4paper]
> >
> > I am using:
> > Debian Squeeze
> > GNU Emacs 23.2.1 (powerpc-unknown-linux-gnu, GTK+ Version 2.20.1)
> > I have installed: texlive and texlive-latex-extra
> >
> > Thank you in advance for any suggestions on where I should be looking, or further information I should be providing to help diagnose the problem.
> >
> > Cheers,
> > Toby
> >
> >
> Aloha Toby,
> 
> Welcome to Org-mode.
> 
> Typically, for questions like yours, you will need to provide something
> the Org-mode community calls an ECM, which is an acronym for a minimal
> complete example.  The example should fail to produce the results you
> expect, which you should specify, and it should contain as little other
> material as possible.  In your case you might want to share the ECM
> Org-mode file and the resulting .tex file.
> 
> Out of the box, Org-mode uses pdflatex to create pdf from LaTeX source
> (although this can be modified).  Pdflatex does not accept eps files for
> graphic input, so this might have been part of your problem.  It does
> accept png files, though, so it appears something else might be going
> on.
> 

It's probably the case that even though there is a processing error with
.eps files, in some circumstances, a PDF file *is* produced, but it's
just a skeleton and therefore does not properly render even the "good"
image.  If the OP deletes the .eps lines, the .png one will probably
work.

I say "probably", because in one of my experiments, I was able to
duplicate the OP's results and get no images rendered - but try as I
might, I cannot do it again :-) The .png image was rendered properly in
all other experiments, and I don't know what I did in the "successful"
(unsuccessful?) one.

In any case, when bafflement strikes, it's probably a good idea to do
the export in two steps: export to LaTeX and then compile the .tex file
on the command line or with AucTeX to PDF. Any errors raised will be
readily apparent - in particular, the .eps error with pdflatex.

Nick

PS. BTW, width=5em makes for a rather small image.

> You might also check your Org-mode version.  I don't keep up with the
> various Linux distributions but I understand that some of them ship old
> versions of Org-mode.  The current version is 7.7 and you'll want to use
> something fairly close to that.
> 
> hth,
> Tom
> 
> -- 
> Thomas S. Dye
> http://www.tsdye.com
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with exporting image to PDF
  2011-08-25  1:59   ` Nick Dokos
@ 2011-08-25  7:30     ` suvayu ali
  2011-08-25 14:23       ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: suvayu ali @ 2011-08-25  7:30 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Toby

Hi Toby, John and Nick,

Its early in the morning for me, so whatever follows could simply be
wrong. :-p

On Thu, Aug 25, 2011 at 3:59 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Thomas S. Dye <tsd@tsdye.com> wrote:
>
>> Toby <orgmode@freerangekiwi.com> writes:
>>
>> > I have tried different classes (article and koma-article) such as:
>> > #+LaTeX_CLASS: koma-article
>> > #+LaTeX_CLASS_OPTIONS: [a4paper]
>> >

I believe this might be your problem. Org recognises only a few document
classes by default. You need to add to the org-export-latex-classes
variable to support other classes. Presently the supported classes are:
article, report, book and beamer.

>>
>> Out of the box, Org-mode uses pdflatex to create pdf from LaTeX source
>> (although this can be modified).  Pdflatex does not accept eps files for
>> graphic input, so this might have been part of your problem.  It does
>> accept png files, though, so it appears something else might be going
>> on.
>>
>
> It's probably the case that even though there is a processing error with
> .eps files, in some circumstances, a PDF file *is* produced, but it's
> just a skeleton and therefore does not properly render even the "good"
> image.  If the OP deletes the .eps lines, the .png one will probably
> work.
>

Actually for TeXLive 2010 and above all included eps files are converted
to pdf (with eps2pdf I think) and included. I am not sure if this is the
case for earlier versions though.

HTH

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with exporting image to PDF
  2011-08-25  7:30     ` suvayu ali
@ 2011-08-25 14:23       ` Nick Dokos
  2011-08-27 10:18         ` Toby
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2011-08-25 14:23 UTC (permalink / raw)
  To: suvayu ali; +Cc: nicholas.dokos, emacs-orgmode, Toby

suvayu ali <fatkasuvayu+linux@gmail.com> wrote:

> Hi Toby, John and Nick,
> 
> Its early in the morning for me, so whatever follows could simply be
> wrong. :-p
> 
> On Thu, Aug 25, 2011 at 3:59 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > Thomas S. Dye <tsd@tsdye.com> wrote:
> >
> >> Toby <orgmode@freerangekiwi.com> writes:
> >>
> >> > I have tried different classes (article and koma-article) such as:
                                       ^^^^^^^
> >> > #+LaTeX_CLASS: koma-article
> >> > #+LaTeX_CLASS_OPTIONS: [a4paper]
> >> >
> 
> I believe this might be your problem. Org recognises only a few document
> classes by default. You need to add to the org-export-latex-classes
> variable to support other classes. Presently the supported classes are:
> article, report, book and beamer.
> 

The OP tried article - see above.

> >>
> >> Out of the box, Org-mode uses pdflatex to create pdf from LaTeX source
> >> (although this can be modified).  Pdflatex does not accept eps files for
> >> graphic input, so this might have been part of your problem.  It does
> >> accept png files, though, so it appears something else might be going
> >> on.
> >>
> >
> > It's probably the case that even though there is a processing error with
> > .eps files, in some circumstances, a PDF file *is* produced, but it's
> > just a skeleton and therefore does not properly render even the "good"
> > image.  If the OP deletes the .eps lines, the .png one will probably
> > work.
> >
> 
> Actually for TeXLive 2010 and above all included eps files are converted
> to pdf (with eps2pdf I think) and included. I am not sure if this is the
> case for earlier versions though.
> 

Not sure what version I have, but it does throw an error w/eps. I'll see
if I can upgrade.

Thanks,
Nick

> HTH
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problem with exporting image to PDF
  2011-08-25 14:23       ` Nick Dokos
@ 2011-08-27 10:18         ` Toby
  0 siblings, 0 replies; 6+ messages in thread
From: Toby @ 2011-08-27 10:18 UTC (permalink / raw)
  To: emacs-orgmode

Hi Tom, Nick, and suvayu,

Thank you for your replies, I really appreciate the warm welcome! 

Good news is, I got it working using PNG images... Slightly bad news is I don't actually know how :-) It seems like just posting to the list made it magically work. Actually, I have tried several times to replicate it *not* working without success, so was probably my own error in listing the right file path/name.

Tom, I have discovered the Org-mode version I have is behind-the-times (7.01g on Debian Squeeze). Thank you for your suggestions on ECM which I shall know to use next time I post.

Cheers,
Toby


-----Original Message--------------------------------------------
Date: Thu, 25 Aug 2011 10:23:02 -0400
From: Nick Dokos <nicholas.dokos@hp.com>
To: suvayu ali <fatkasuvayu+linux@gmail.com>
Cc: "Thomas S. Dye" <tsd@tsdye.com>, emacs-orgmode@gnu.org,    Toby <orgmode@freerangekiwi.com>, nicholas.dokos@hp.com
Subject: Re: [O] Problem with exporting image to PDF


suvayu ali <fatkasuvayu+linux@gmail.com> wrote:

> Hi Toby, John and Nick,
> 
> Its early in the morning for me, so whatever follows could simply be
> wrong. :-p
> 
> On Thu, Aug 25, 2011 at 3:59 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > Thomas S. Dye <tsd@tsdye.com> wrote:
> >
> >> Toby <orgmode@freerangekiwi.com> writes:
> >>
> >> > I have tried different classes (article and koma-article) such as:
                                       ^^^^^^^
> >> > #+LaTeX_CLASS: koma-article
> >> > #+LaTeX_CLASS_OPTIONS: [a4paper]
> >> >
> 
> I believe this might be your problem. Org recognises only a few document
> classes by default. You need to add to the org-export-latex-classes
> variable to support other classes. Presently the supported classes are:
> article, report, book and beamer.
> 

The OP tried article - see above.

> >>
> >> Out of the box, Org-mode uses pdflatex to create pdf from LaTeX source
> >> (although this can be modified).  Pdflatex does not accept eps files for
> >> graphic input, so this might have been part of your problem.  It does
> >> accept png files, though, so it appears something else might be going
> >> on.
> >>
> >
> > It's probably the case that even though there is a processing error with
> > .eps files, in some circumstances, a PDF file *is* produced, but it's
> > just a skeleton and therefore does not properly render even the "good"
> > image.  If the OP deletes the .eps lines, the .png one will probably
> > work.
> >
> 
> Actually for TeXLive 2010 and above all included eps files are converted
> to pdf (with eps2pdf I think) and included. I am not sure if this is the
> case for earlier versions though.
> 

Not sure what version I have, but it does throw an error w/eps. I'll see
if I can upgrade.

Thanks,
Nick

> HTH
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-27 10:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25  0:57 Problem with exporting image to PDF Toby
2011-08-25  1:25 ` Thomas S. Dye
2011-08-25  1:59   ` Nick Dokos
2011-08-25  7:30     ` suvayu ali
2011-08-25 14:23       ` Nick Dokos
2011-08-27 10:18         ` Toby

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