emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Org-export does not updates figure path when using recursive includes [9.6 (9.6-??-bed47b4 @ /home/gpetrini/.emacs.d/.local/straight/build-28.2/org/)]
@ 2023-01-17 21:29 Gabriel Petrini da Silveira
  2023-01-18  8:43 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Petrini da Silveira @ 2023-01-17 21:29 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1887 bytes --]

*Expected behaviour*: Using recursinve includes generates a PDF file
 with the respective figures.

*Actual behaviour:* Figure only appears when not using recursive includes.

In order to reproduce this bug, I prepared a minimum example.
The is a larger file (=Large_File.org=) which have two sections.
The first includes another file (=./tmp/Small_File.org=) as a whole.
The second, includes the contents of =./tmp/Small_File.org= as it is.
This =./tmp/Small_File.org= only includes a figure (I tried with
org-mode (=./tmp/img/a.png=), for example ).
It is expected that org updates the path of figure inside
=./tmp/Small_File.org= file in order to be found by =Large_File.org=.
However, only the second section works.

Here as the files that I mentioned:

----- Begin of Large_File.org ----
#+title: Large file

* Recursive include

This section includes a file that also have a =#+INCLUDE= command.


#+include: "./tmp/Small_File.org"

* Non-recursive include

This section includes reproduces the =Small_File.org= file structure,
adjusting the respective paths.



#+INCLUDE: "./tmp/Section_Image.org"
----- End of Large_File.org ----


----- Begin of ./tmp/Small_File.org ----
#+title: Small File

#+INCLUDE: "./Section_Image.org"
----- End of ./tmp/Small_File.org ----

----- Begin of ./tmp/Section_Image.org ----
* Section with a image



#+CAPTION: This is the caption for the next figure link (or table)
#+NAME:   fig:SED-HR4049
[[./img/a.png]]
----- End of ./tmp/Section_Image.org ----

PS: This is my first bug report. If I can clarify something, let me know.

------------------------------------------------------------------------



Emacs  : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.35, cairo version 1.16.0)
 of 2022-12-19, modified by Debian
Package: Org mode version 9.6 (9.6-??-bed47b4 @
/home/gpetrini/.emacs.d/.local/straight/build-28.2/org/)

[-- Attachment #1.2: Type: text/html, Size: 2130 bytes --]

[-- Attachment #2: Large_File.org --]
[-- Type: text/org, Size: 313 bytes --]

#+title: Large file

* Recursive include

This section includes a file that also have a =#+INCLUDE= command.


#+include: "./tmp/Small_File.org"

* Non-recursive include

This section includes reproduces the =Small_File.org= file structure, adjusting the respective paths.



#+INCLUDE: "./tmp/Section_Image.org"

[-- Attachment #3: Small_File.org --]
[-- Type: text/org, Size: 54 bytes --]

#+title: Small File

#+INCLUDE: "./Section_Image.org"

[-- Attachment #4: Section_Image.org --]
[-- Type: text/org, Size: 135 bytes --]


* Section with a image



#+CAPTION: This is the caption for the next figure link (or table)
#+NAME:   fig:SED-HR4049
[[./img/a.png]]

[-- Attachment #5: a.png --]
[-- Type: image/png, Size: 150777 bytes --]

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

end of thread, other threads:[~2023-01-18  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 21:29 [BUG] Org-export does not updates figure path when using recursive includes [9.6 (9.6-??-bed47b4 @ /home/gpetrini/.emacs.d/.local/straight/build-28.2/org/)] Gabriel Petrini da Silveira
2023-01-18  8:43 ` Ihor Radchenko

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