Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation of root document that contains an image reference fails if the root document is not in the current directory #299

Open
ronaldtse opened this issue Feb 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Feb 17, 2023

There is some Inkscape processing that fails due to the CWD directory being different from where the document root is.

We need to have something called the "Document.root" which can tell us where the document should be processed at, e.g. load images relative to that path.

Document:

For example:

$ cd mn-samples-bsi
$ cd sources/pas-2030
$ bundle exec metanorma pas-2030/document.adoc
...
** (org.inkscape.Inkscape:38969): WARNING **: 15:07:57.152: Can't open file: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-1.svg (doesn't exist)

** (org.inkscape.Inkscape:38969): WARNING **: 15:07:57.152: Can't open file: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-1.svg (doesn't exist)
ink_file_open: '~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-1.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-1.svg
ConcreteInkscapeApplication::on_open: failed to create document!
Image specified at `images/fig-1.emf` does not exist.

** (org.inkscape.Inkscape:39019): WARNING **: 15:07:57.725: Can't open file: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-a.1.svg (doesn't exist)

** (org.inkscape.Inkscape:39019): WARNING **: 15:07:57.725: Can't open file: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-a.1.svg (doesn't exist)
ink_file_open: '~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-a.1.svg' cannot be opened!
InkscapeApplication::document_open: Failed to open: ~/src/mn/mn-samples-bsi/sources/pas-2030/images/fig-a.1.svg
ConcreteInkscapeApplication::on_open: failed to create document!
Image specified at `images/fig-a.1.emf` does not exist.
@ronaldtse ronaldtse added the bug Something isn't working label Feb 17, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Metanorma Feb 17, 2023
@ronaldtse ronaldtse moved this from 🆕 New to 🌋 Urgent in Metanorma Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🌋 Urgent
Development

No branches or pull requests

2 participants