You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally, we pass images into the Presentation XML as Data URIs, rather than references to external image files. It is however possible to have a Metanorma XML file with images referenced as files with src attributes.
By default, those files are expected to be in the same directory as the Presentation XML file, so that any local file references are relative to that directory: so a src="./file.jpg" will be interpreted as being relative to the location of the Presentation XML file.
It is however possible for the file to move around during compilation, particularly in the process of generating a Metanorma site.
For that reason, we now have an optional baseassetpath path in Metanorma compilation, which nominates the starting point for any local URI references to image sources. So if baseassetpath is say "/root/images/", then any reference to src="./file.jpg" is relative not to the current location of the Presentation XML file, but to "/root/images/". (So the file is located in "/root/images/file.jpg".)
This ticket is a request for you to process the baseassetpath parameter, passed to mn2pdf, and to interpret any image file locations in the Presentation XML source as being relative to that directory. I am hoping that this can be implemented as an instance of --param baseassetpath = ....
I am not going to invoke it until you have completed this.
The text was updated successfully, but these errors were encountered:
Follow-up to #242
Normally, we pass images into the Presentation XML as Data URIs, rather than references to external image files. It is however possible to have a Metanorma XML file with images referenced as files with src attributes.
By default, those files are expected to be in the same directory as the Presentation XML file, so that any local file references are relative to that directory: so a src="./file.jpg" will be interpreted as being relative to the location of the Presentation XML file.
It is however possible for the file to move around during compilation, particularly in the process of generating a Metanorma site.
For that reason, we now have an optional
baseassetpath
path in Metanorma compilation, which nominates the starting point for any local URI references to image sources. So ifbaseassetpath
is say "/root/images/", then any reference to src="./file.jpg" is relative not to the current location of the Presentation XML file, but to "/root/images/". (So the file is located in "/root/images/file.jpg".)This ticket is a request for you to process the
baseassetpath
parameter, passed to mn2pdf, and to interpret any image file locations in the Presentation XML source as being relative to that directory. I am hoping that this can be implemented as an instance of--param baseassetpath = ...
.I am not going to invoke it until you have completed this.
The text was updated successfully, but these errors were encountered: