View Single Post
Old 05-22-2014, 01:32 PM   #668
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
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

Last edited by cybmole; 05-22-2014 at 01:35 PM.
cybmole is offline   Reply With Quote