emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] How to fix path to figures in included files


From: Nicolas Goaziou
Subject: Re: [O] How to fix path to figures in included files
Date: Thu, 20 Oct 2016 18:49:26 +0200

Hello,

Nikolaus Rath <address@hidden> writes:

> When using INCLUDE in an org-file to include a file in a sub-directory
> (e.g. "#+INCLUDE: preamble/preamble.org"), and the included file in turn
> refers to a file ("[[./figure1.png]]"), then the LaTeX export for the
> top-level org file refers to the file with its path relative to the
> included .org file rather than the top-level org file for which LaTeX is
> generated.
>
> Is there a way to fix this?

I'm pretty sure that question was raised before on this ML, but, after
a cursory look, I cannot find any reference to it.

There is no way to fix this for the time being. I can think of two
solutions.

1. We could add a hook just before inserting included file in the master
   document, so you get a chance to rewrite links yourself.

2. We could do that rewriting every file link with a relative path
   ourselves.

Second option only makes sense if the behavior you suggest is always the
one needed. We may need some more feedback about this.

Also, it could fail for some link types, when the path is not obviously
a file, e.g. [[foo:a/b]]. IOW, if implemented, we would have to limit
ourselves to "file:" links.

OTOH, the first solution is easy to implement.

Regards,

-- 
Nicolas Goaziou



reply via email to

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