emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* problem including graphics
@ 2009-11-09 12:45 "Martin G. Skjæveland"
  2009-11-09 16:44 ` [babel] " Dan Davison
  0 siblings, 1 reply; 2+ messages in thread
From: "Martin G. Skjæveland" @ 2009-11-09 12:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I have a problem including dot generated graphics in my export.

The code is

#+begin_src dot :file ./test.pdf :cmdline -Tpdf
digraph test  {
Hello -> World;
};
#+end_src

When I export to latex it turns into

\hyperref[./test.pdf]{file:./test.pdf}

However, then I tried this in a separate document (to make this small 
example) it works fine and exports to

\includegraphics[width=10em]{./test.pdf}

So now my question is why is the same code in different documents 
interpreted different? Both documents have the same #+OPTIONS settings. 
My working document is a large document, so perhaps there are other bits 
of my document that interfere, but they shouldn't, right?

Thanks!
Martin

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

* [babel] Re: problem including graphics
  2009-11-09 12:45 problem including graphics "Martin G. Skjæveland"
@ 2009-11-09 16:44 ` Dan Davison
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Davison @ 2009-11-09 16:44 UTC (permalink / raw)
  To: Martin G. Skjæveland; +Cc: emacs-orgmode

"Martin G. Skjæveland" <martige@ifi.uio.no> writes:

> Hi all,
>
> I have a problem including dot generated graphics in my export.
>
> The code is
>
> #+begin_src dot :file ./test.pdf :cmdline -Tpdf
> digraph test  {
> Hello -> World;
> };
> #+end_src

Hi Martin and all,

Please note that if you have org-babel activated, then exporting
any #+begin_src XXX block will make use of org-babel, and therefore that
any problems may be org-babel problems (and therefore that a [babel]
subject tag may be appropriate.) I think it's reasonable to treat this
as a [babel] thread for now.

Having said that, I'm not knowledgable enough about the export mechanics
to have come up with any good suggestions here. Could you cut down your
large file until you find a reasonably small version that still shows
the problem, and then post that?

Fwiw:

Org-babel should have inserted

[[file:./test.pdf]]

which should export to

\includegraphics[width=10em]{./test.pdf}

I can get something similar to the \hyperref by using a named link

[[file:./test.pdf][./test.pdf]]

which exports to

\href{file:///tmp/test.pdf}{./test.pdf}

(I don't know what the difference is between href and hyperref nor what
determines which is used.)

Dan

>
> When I export to latex it turns into
>
> \hyperref[./test.pdf]{file:./test.pdf}
>
> However, then I tried this in a separate document (to make this small
> example) it works fine and exports to
>
> \includegraphics[width=10em]{./test.pdf}
>
> So now my question is why is the same code in different documents
> interpreted different? Both documents have the same #+OPTIONS
> settings. My working document is a large document, so perhaps there
> are other bits of my document that interfere, but they shouldn't,
> right?



>
> Thanks!
> Martin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-11-09 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09 12:45 problem including graphics "Martin G. Skjæveland"
2009-11-09 16:44 ` [babel] " Dan Davison

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