View Single Post
Old 01-12-2017, 07:23 AM   #13
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,840
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Turtle91 View Post
Let me throw in my .02...

You an cheat Sigil into putting any kind of code in when you Add a cover. Simply save whatever code you want as a file named "cover.xhtml" into Sigil's default folder. When you add a cover it will use that template if it is available; if not, it uses it's default SVG wrapper.

Here's the template I use:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Cover</title>
</head>

<body style="margin:0; padding:0; text-align:center; background-color:black">
  <h1 style="display:none" title="Cover"/>

  <div style="margin:0; padding:0; text-align:center">
    <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">
      <image height="SGC_IMAGE_HEIGHT" width="SGC_IMAGE_WIDTH" xlink:href="SGC_IMAGE_FILENAME"/>
    </svg>
  </div>
</body>
</html>
SGC_IMAGE_HEIGHT
SGC_IMAGE_WIDTH
SGC_IMAGE_FILENAME

Are variables that autofill with the properties of the image you select.

It should work just fine with any kind of HTML code as well as it does with SVG...

Cheers,
Great tip! Thank you very much for sharing it.
RbnJrg is offline   Reply With Quote