Hi
Sigil is very handy namely for its plugins, this explains the title I gave to this thread.
It is about calculating and inserting image width.
Rationale: we have two kinds of images: the fullscreen ones and the others.
1. - A fullscreen image is very safely contained in its own page.
I tend to use this very basic code (example):
2. - A plain image will just flow with the text:
We'll use only a part of the above code.
Code:
<div style="text-align:center"><img alt="002" id="fig-2" src="../Images/Image-02.jpg" style="width: 60%;"/></div>
For both kinds of images, the
width calculation to perform will be the same.
The percentage of width (here in bold) is truly the crucial figure. The more precise, the better display. Obviously it can't be more than 100%.
This how I calculate width for an image of a 626 × 942 pixels size to obtain 88.6%
(626/942) ×4 /3
I wish this could be done and inserted automatically for all images of an Epub.
If one does not agree with the 4/3 fraction (because his(her) own screen may have a different size), this fraction could be defined as a variable.