Contents | Start | End | Previous: KB0261: Why are relative widths not working for objects in table cells? | Next: KB0263: Why does Jutoh warn about page references?
See also: Why are relative widths not working for objects in table cells?
When Jutoh imports a DOCX or ODT file and there is paper size information, Jutoh copies this information (and margins if available) to all configurations. Jutoh also enables the configuration option Replace absolute widths.
Then, when generating an ebook, Jutoh finds any absolute width it finds in tables, cells, boxes and images (expressed in mm) and converts these dimensions to percentages of the display width or parent container width, with reference to the paper size and margins it found in the original document. This allows the content to adapt better to a wide variety of device dimensions and resolutions.
If you find that elements in your content aren't scaling correctly, check the configuration options Paper size, Custom paper width, Left margin and Right margin. The space left when margins are subtracted from the paper width is used for calculating element proportions, so if the margins are too big or the paper width too small, this can cause the percentages to be too large. Table cell, in particular, may get widths that add up to more than 100%, causing the first few columns of the table to appear larger than the last one.
So the first thing to try is reducing Left margin and Right margin, perhaps to 0.
You can always replace absolute dimensions with percentages manually in the object's properties, if the automatic method is not working out.
Note that height, margins and padding are not converted. Object height is removed when the width is set, to avoid the object being distorted.
If a table or box has no specified width, Jutoh will assume that it will be sized at 100% in order to continue calculating proportions for contained objects. However if cells don't contain a specific width, it's possible that Jutoh won't be able to calculate a proportion for contained objects.
To see what Jutoh is doing, you can examine the generated Epub with Book | Examine (F6). If generating for Kindle, check Generate Epub in your Kindle configuration and compile again. Look at the XHTML files, see what CSS classes (styles) are being used and check against the CSS file to see what percentages have been generated. You can use the search facility in the Epub viewer to find CSS classes.
Contents | Start | End | Previous: KB0261: Why are relative widths not working for objects in table cells? | Next: KB0263: Why does Jutoh warn about page references?