emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Nikolaus Rath
Subject: [O] How to fix path to figures in included files
Date: Wed, 12 Oct 2016 09:31:31 -0700
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (gnu/linux)

Hi,

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?

In other words, if I have a file "main.org" that contains just

,----
| #+INCLUDE: preamble/preamble.org"
`----

and preamble/preamble.org contains

,----
| * Preamble
| 
| Look at this amazing image:
| [[./file1.png]]
`----

Then the LaTeX that is generated for "main.org" is

,----
| \part{Preamble}
| \label{sec:orgheadline3}
| 
| Look at this amazing image:
| 
| \includegraphics[width=.9\linewidth]{./figure1.png}
`----

but I want it to be:

,----
| \part{Preamble}
| \label{sec:orgheadline3}
| 
| Look at this amazing image:
| 
| \includegraphics[width=.9\linewidth]{preamble/figure1.png}
`----

Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«



reply via email to

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