Originally Posted by nrapallo
I have tried that "2em" left/right margin as well, and even though it makes the "box" smaller that eBook Publisher has to re-size into, it still breaks for taller pics. The problem is that there is no limit/constraint to the bottom margin, ever. Unfortunately, there is always a taller height that this will break on. Been there, done that and now looking in other directions to find a "cure".
this solution presupposes that you have reformatted the images to the correct proportions (multiples of 310 x 430px), by adding extra margins on the sides as necessary. otherwise, you are correct, there will always be a taller image that will break the box. the problem is not the size, but the ratio between height and width.
Great detective work! This will help in finding a solution to this issue. I'll try it out soon.
i have tried it out on the version of Emma i am making right now, and i can tell you right now that you will be in for more teeth-gnashing and cursing (or in your case, possibly more perl scripting, as this seems to be what you do in situations that make me gnash my teeth and curse...
). it turns out you cannot specify a margin (or padding) for the "img" tag, either in the css in the head of the document, or inside the individual img tags.
which means you have to put the margin on the container tags (p or div), which means you have to treat each image individually.
still quite feasible, using search and replace (for example, search ><img
(the end of the opening p tag, the beginning of the opening img tag) and replace with
), but clearly more work than adding one line of css at the top of the html used for the 1200 version.
And who has Garth's ear and email address in her Contact list...
huh, do you think he has anything to do with Publisher as well ? in which case, by all means, let's tell him ! but rather than an email, maybe we should start a thread somewhere to repertorie *all* the bugs and updates we would like, because be honest, this is not the only one (alas
)... (technically, we *all* have Garth's ear... he follows these forums...)
oh, here is the 1200 version of Emma, made with the same images as the 1150 version reformatted to a homothétie of 310 x 430 px like before, however adding a 2em left and right margin on all the images.
if anyone else is faced with this situation, i recommend doing all the code cleanup on the 1150 version *first* ; then save the html / opf, make the book, close. then MAKE A COPY of the html file adding "_1200" to the filename. then you import this file into the _1200 opf which mobi2imp has conveniently created for you, instead of the original html, and add all the margins to the images. this way, you have 2 separate files to address the different format, but you only do the work once.