Okay, based on this feedback, I have now changed the epub3 add cover code to be:
Code:
const QString HTML5_COVER_SOURCE =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n"
"<!DOCTYPE html>\n\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\">\n"
"<head>\n"
" <title>Cover</title>\n"
"</head>\n"
""
"<body>\n"
" <div style=\"height: 100vh; text-align: center; padding: 0pt; margin: 0pt;\">\n"
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"100%\" preserveAspectRatio=\"xMidYMid meet\" version=\"1.1\" viewBox=\"0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT\" width=\"100%\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n"
" <image width=\"SGC_IMAGE_WIDTH\" height=\"SGC_IMAGE_HEIGHT\" xlink:href=\"SGC_IMAGE_FILENAME\"/>\n"
" </svg>\n"
" </div>\n"
"</body>\n"
"</html>\n";
which generates the following when adding the cover image from our Sigil User Guide:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Cover</title>
</head>
<body>
<div style="height: 100vh; text-align: center; padding: 0pt; margin: 0pt;">
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 800" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image width="600" height="800" xlink:href="../Images/cover.png"/>
</svg>
</div>
</body>
</html>
Thanks to all who pointed out the ADE issue (with epub3) and potential workarounds.
This change has now been pushed to Sigil master.