View Single Post
Old 05-22-2014, 01:57 PM   #669
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,166
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by cybmole View Post
i appreciate that there are other valid coding solutions, but I'm wanting to suggest that the plug-in code is changed so that it just works, for books on tablets, without the need for manual redoing of each book.

I have not as yet looked at how sigil / calibre editor process an insert image action, so see if they do it in the same way as this plug in does.

anyway, it has nothing to do with a surrounding <p> tag as there isn't one. look at the entirety of a titlepage as generated by the insert or replace cover action:
Code:
<head>
<meta content="true" name="calibre:cover" />
 
<title>Cover</title>
<style type="text/css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>
 
<body>
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 299 500" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="500" width="299" xlink:href="../Images/cover.jpeg"></image>
</svg>
</div>
</body>
</html>
the only difference between your code & the plug-in code seems to be the use of <svg> & I have no idea why that tag was chosen for this function , rather than a simple <img> tag?.

I am pretty sure that insert or replace cover writes all the above code, and discards whatever was there before
The S in SVG is scalable. IMHO a better way to go and the code shown also preservesthe Aspect No stretched cover images
theducks is offline   Reply With Quote