Quote:
Originally Posted by Nick Payne
Yes, setting justification to off gets the equations centred on the reader screen (it is a kepub).
|
The problem here is that the KePub reader overides the alignment for <div> and <p> objects (and all subclasses of div and p), so the only objects that will retain their alignment in a KePub when the button is not set to "Off" are those using a heading tag like <h1>, <h2>, ... or <blockquote>, etc.
The ePub reader works differently and only overrides <body> (but not subclasses of body) and so often works better, but it depends on the publisher not overriding the default alignment of the main text.
There are firmware patches that can change the way the alignment is set in KePubs, to make it more like the ePub reader, but it is not really possible to get something that works well for all books without also editing the books to regularise their stylesheets, as there are so many different ways the publisher can structure the stylesheet.
Quote:
I had a fiddle with the style used for the images to see what improvement I could get for their display on the reader. It doesn't work too well, as even just the single line equations vary considerably in their native height and width, and setting a specific value in the style for the width or height (as opposed to auto) gives quite a different scale depending on what is in the image. For example, both the attached images are single line equations, but have different heights and scale quite differently unless height and width are left at auto.
|
For the method of making the equation size proportional to the currently selected font size you would need to set the sizes for each individual image style seperately, not just one size for all images, as the calculated size in em depends on the size of the individual image. E.g. if the images are identified as id="eq1", id="eq2", etc. then set the width/height seperately for img#eq1, img#eq2, etc. not just for the main img class. It can be a lot more work than simply resizing the images themselves.
(Edit: Another way would be to create an SVG wrapper for each image, as SVG gives a lot more options for dealing with image sizes than is possible just by styling the img class in CSS, but I think that would take at least as much effort.)
The size of diagrams like the graph in your screenshot are probably better set as a percentage of the screen size (%) rather than proportional to font size (em).
Quote:
I'll have to try your other suggestion, of using Imagemagick to enlarge all the images by the same amount.
|
That is the easiest way to go in most cases, it still leaves you with a book where the images are of a fixed pixel size, but at least it is a size that suits your device's screen and font selection.
Whichever method you use though, the results will depend a bit on the quality of the original images. If they are poor quality to start with then making them larger might not make them that much more readable.