emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Gabriel Petrini da Silveira <gpetrinidasilveira@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [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/)]
Date: Tue, 17 Jan 2023 18:29:59 -0300	[thread overview]
Message-ID: <CAHCA-UvaqnegPYfpPcJCqiY8+dDoj0pfX0vDckUui-MCj3wq5A@mail.gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2023-01-18  5:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 21:29 Gabriel Petrini da Silveira [this message]
2023-01-18  8:43 ` [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/)] Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHCA-UvaqnegPYfpPcJCqiY8+dDoj0pfX0vDckUui-MCj3wq5A@mail.gmail.com \
    --to=gpetrinidasilveira@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).