Skip to content

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

@ronaldtse

Description

@ronaldtse

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

Status

🌋 Urgent

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions