I am a contributor to a project that converts PreTeXt XML to various output formats. I'm currently working on an XSLT conversion to .odt, and I have hit an obstacle. I'm hoping to find insight here for how to proceed.
The issue is that PreTeXt XML does not declare heights for image files. A width is always declared (or inferred to be 100%) and it is assumed that the image file knows its own aspect ratio, and that the renderer will use the defined width and the image file to infer a height for display. I'm not having success translating to an .odt file that opens and shows images. I'm creating content with constructions like:
Code: Select all
<text:p>
<draw:frame svg:width="some width" text:anchor-type="as-char">
<draw:image xlink:href="the correct path" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:mime-type="the correct type"/>
</draw:image>
</text:p>
Is it possible to build a .odt file with images, not declare an image height, and still expect the word processors to display the images with their native aspect ratio? (If not, the conversion process from PreTeXt to .odt will need to analyze image files, which will be a significant additional stage to conversion.)