emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Having problem with latex export of image file
@ 2011-03-15  3:48 Robert Goldman
  2011-03-15  5:04 ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Goldman @ 2011-03-15  3:48 UTC (permalink / raw)
  To: Org Mode

I have the following in my org file:

#+CAPTION: Sample (partial) plan graph.
#+LABEL: fig:sampleGraph
#+ATTR_LaTeX: width=.9\textwidth
[[plan-with-tc-start.pdf]]

which I believe should give me a figure.  However, when I run this
through the latex export I get the following instead:

\hyperref[plan-with-tc-start.pdf]{plan-with-tc-start.pdf}

I pushed "pdf" onto image-file-name-extensions but that doesn't seem to
make any difference.

I figure there's something simple I'm doing wrong, but I can't figure
out what that is.

Thanks for any advice!

best,
r

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

* Re: Having problem with latex export of image file
  2011-03-15  3:48 Having problem with latex export of image file Robert Goldman
@ 2011-03-15  5:04 ` Nick Dokos
  2011-03-15 13:48   ` Robert Goldman
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2011-03-15  5:04 UTC (permalink / raw)
  To: rpgoldman; +Cc: nicholas.dokos, Org Mode

Robert Goldman <rpgoldman@sift.info> wrote:

> I have the following in my org file:
> 
> #+CAPTION: Sample (partial) plan graph.
> #+LABEL: fig:sampleGraph
> #+ATTR_LaTeX: width=.9\textwidth
> [[plan-with-tc-start.pdf]]
> 
> which I believe should give me a figure.  However, when I run this
> through the latex export I get the following instead:
> 
> \hyperref[plan-with-tc-start.pdf]{plan-with-tc-start.pdf}
> 
> I pushed "pdf" onto image-file-name-extensions but that doesn't seem to
> make any difference.
> 
> I figure there's something simple I'm doing wrong, but I can't figure
> out what that is.
> 
> Thanks for any advice!
> 

Try 

[[./plan-with-tc-start.pdf]]

Nick

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

* Re: Having problem with latex export of image file
  2011-03-15  5:04 ` Nick Dokos
@ 2011-03-15 13:48   ` Robert Goldman
  2011-03-15 14:39     ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Goldman @ 2011-03-15 13:48 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode

X-TagToolbar-Keys: D20110315084847273
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 3/15/11 Mar 15 -12:04 AM, Nick Dokos wrote:
> Robert Goldman <rpgoldman@sift.info> wrote:
> 
>> I have the following in my org file:
>>
>> #+CAPTION: Sample (partial) plan graph.
>> #+LABEL: fig:sampleGraph
>> #+ATTR_LaTeX: width=.9\textwidth
>> [[plan-with-tc-start.pdf]]
>>
>> which I believe should give me a figure.  However, when I run this
>> through the latex export I get the following instead:
>>
>> \hyperref[plan-with-tc-start.pdf]{plan-with-tc-start.pdf}
>>
>> I pushed "pdf" onto image-file-name-extensions but that doesn't seem to
>> make any difference.
>>
>> I figure there's something simple I'm doing wrong, but I can't figure
>> out what that is.
>>
>> Thanks for any advice!
>>
> 
> Try 
> 
> [[./plan-with-tc-start.pdf]]

Thanks.  That did fix it.  Question:  what's the rule about file names
here?  Is it that there must be a non-empty directory part?  Or
something else?

A second question:  is there any way to set image file extensions /on a
per-file basis/?  It seems to me, for example, to be quite likely that
in some files PDF should be treated as images (since I use pdflatex, pdf
seems like the best choice for images), whereas in others maybe not...

But it seems like image-file-name-extensions is not something that is
expected to be buffer-local....

best,
r

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

* Re: Having problem with latex export of image file
  2011-03-15 13:48   ` Robert Goldman
@ 2011-03-15 14:39     ` Nick Dokos
  2011-03-15 15:30       ` Nick Dokos
  2011-03-17  9:35       ` Bastien
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Dokos @ 2011-03-15 14:39 UTC (permalink / raw)
  To: rpgoldman; +Cc: nicholas.dokos, Org Mode

Robert Goldman <rpgoldman@sift.info> wrote:

> X-TagToolbar-Keys: D20110315084847273
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> 
> On 3/15/11 Mar 15 -12:04 AM, Nick Dokos wrote:
> > Robert Goldman <rpgoldman@sift.info> wrote:
> > 
> >> I have the following in my org file:
> >>
> >> #+CAPTION: Sample (partial) plan graph.
> >> #+LABEL: fig:sampleGraph
> >> #+ATTR_LaTeX: width=.9\textwidth
> >> [[plan-with-tc-start.pdf]]
> >>
> >> which I believe should give me a figure.  However, when I run this
> >> through the latex export I get the following instead:
> >>
> >> \hyperref[plan-with-tc-start.pdf]{plan-with-tc-start.pdf}
> >>
> >> I pushed "pdf" onto image-file-name-extensions but that doesn't seem to
> >> make any difference.
> >>
> >> I figure there's something simple I'm doing wrong, but I can't figure
> >> out what that is.
> >>
> >> Thanks for any advice!
> >>
> > 
> > Try 
> > 
> > [[./plan-with-tc-start.pdf]]
> 
> Thanks.  That did fix it.  Question:  what's the rule about file names
> here?  Is it that there must be a non-empty directory part?  Or
> something else?
> 

From observation of effects, it seems to me that in LaTeX export:

o plain file names in links get hyperref'ed, e.g [[image.pdf]
o pathnames in links get a figure environment and \includegraphics, e.g. [[./image.pdf]]
o file: type links get \includegraphics without a figure environment, e.g. [[file:image.pdf]]

I didn't look very hard, but I didn't find documentation on these.
But I seem to recall some discussion of this on the ML a long time ago.

In HTML export, everything is a link. What happens in other exports,
I have no idea.

Nick

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

* Re: Having problem with latex export of image file
  2011-03-15 14:39     ` Nick Dokos
@ 2011-03-15 15:30       ` Nick Dokos
  2011-03-17  9:35       ` Bastien
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2011-03-15 15:30 UTC (permalink / raw)
  Cc: nicholas.dokos, Org Mode, rpgoldman

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Robert Goldman <rpgoldman@sift.info> wrote:
> 
> > X-TagToolbar-Keys: D20110315084847273
> > Content-Type: text/plain; charset=ISO-8859-1
> > Content-Transfer-Encoding: 7bit
> > 
> > On 3/15/11 Mar 15 -12:04 AM, Nick Dokos wrote:
> > > Robert Goldman <rpgoldman@sift.info> wrote:
> > > 
> > >> I have the following in my org file:
> > >>
> > >> #+CAPTION: Sample (partial) plan graph.
> > >> #+LABEL: fig:sampleGraph
> > >> #+ATTR_LaTeX: width=.9\textwidth
> > >> [[plan-with-tc-start.pdf]]
> > >>
> > >> which I believe should give me a figure.  However, when I run this
> > >> through the latex export I get the following instead:
> > >>
> > >> \hyperref[plan-with-tc-start.pdf]{plan-with-tc-start.pdf}
> > >>
> > >> I pushed "pdf" onto image-file-name-extensions but that doesn't seem to
> > >> make any difference.
> > >>
> > >> I figure there's something simple I'm doing wrong, but I can't figure
> > >> out what that is.
> > >>
> > >> Thanks for any advice!
> > >>
> > > 
> > > Try 
> > > 
> > > [[./plan-with-tc-start.pdf]]
> > 
> > Thanks.  That did fix it.  Question:  what's the rule about file names
> > here?  Is it that there must be a non-empty directory part?  Or
> > something else?
> > 
> 
> From observation of effects, it seems to me that in LaTeX export:
> 
> o plain file names in links get hyperref'ed, e.g [[image.pdf]
> o pathnames in links get a figure environment and \includegraphics, e.g. [[./image.pdf]]
> o file: type links get \includegraphics without a figure environment, e.g. [[file:image.pdf]]
> 
> I didn't look very hard, but I didn't find documentation on these.
> But I seem to recall some discussion of this on the ML a long time ago.
> 
> In HTML export, everything is a link. What happens in other exports,
> I have no idea.
> 

This is right (I think) as far as it goes, but it misses the larger
point: the effect of #+CAPTION.  See

        http://thread.gmane.org/gmane.emacs.orgmode/17814/focus=18537

for more details.

Nick

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

* Re: Having problem with latex export of image file
  2011-03-15 14:39     ` Nick Dokos
  2011-03-15 15:30       ` Nick Dokos
@ 2011-03-17  9:35       ` Bastien
  2011-03-19 21:58         ` Robert Goldman
  1 sibling, 1 reply; 7+ messages in thread
From: Bastien @ 2011-03-17  9:35 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode, rpgoldman

Hi Nick,

Nick Dokos <nicholas.dokos@hp.com> writes:

> I didn't look very hard, but I didn't find documentation on these.

If Robert or you can provide a documentation patch for this, it would
be nice.  It's not (only) laziness from me: since you stumbled on the
issue, I guess you can better explain what is at stake.

Thanks!

-- 
 Bastien

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

* Re: Having problem with latex export of image file
  2011-03-17  9:35       ` Bastien
@ 2011-03-19 21:58         ` Robert Goldman
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Goldman @ 2011-03-19 21:58 UTC (permalink / raw)
  To: Bastien; +Cc: nicholas.dokos, Org Mode

On 3/17/11 Mar 17 -4:35 AM, Bastien wrote:
> Hi Nick,
> 
> Nick Dokos <nicholas.dokos@hp.com> writes:
> 
>> I didn't look very hard, but I didn't find documentation on these.
> 
> If Robert or you can provide a documentation patch for this, it would
> be nice.  It's not (only) laziness from me: since you stumbled on the
> issue, I guess you can better explain what is at stake.
> 
> Thanks!
> 

I'm ordinarily willing to chime in with a manual patch, but this seems
odd enough that I wonder if there isn't a bug that needs fixing.

In particular, it seems very weird to me that the latex exporter would
treat un-directoried pathnames as files to be exported as links rather
than inline images *even if there is a #+CAPTION present*.

Is it worth re-examining this, instead of documenting it?

cheers,
r

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

end of thread, other threads:[~2011-03-19 21:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15  3:48 Having problem with latex export of image file Robert Goldman
2011-03-15  5:04 ` Nick Dokos
2011-03-15 13:48   ` Robert Goldman
2011-03-15 14:39     ` Nick Dokos
2011-03-15 15:30       ` Nick Dokos
2011-03-17  9:35       ` Bastien
2011-03-19 21:58         ` Robert Goldman

Code repositories for project(s) associated with this 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).