View Single Post
Old 04-27-2011, 05:27 PM   #8
affa
Connoisseur
affa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheese
 
Posts: 56
Karma: 1234
Join Date: Apr 2011
Device: kindle
Quote:
Originally Posted by SteveC100 View Post
Well, er, that sounds like what I want to do. I can do the search/replace and I understand the structure of an epub. But I couldn't follow all that. If you could be more specific, it would be great.

All I want to do is add a cover to the In Design epub. How could it be so hard?

Is there a sample somewhere of proper XML for the cover?

Steve
I'm not sure if you're asking for instructions on the quick way or the long term way.

If it's the quick way, add the image, then split the file just like the tutorial says. Then go into the cover file in Sigil, look to see if it 'stole' the header file, and if so, copy and paste it back to the file you split the cover from.

Ultimately, your code will look something like this:

Code:
<?xml version="1.0"?>
<!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>The Name of my Book</title>
  <link href="../Styles/template.css" rel="stylesheet" type="text/css" />
</head>

<body style="">
  <div id="the-name-of-my-book">
    <div class="story">
      <p class="generated-style"><img alt="" src="../Images/cover.jpg" /></p>
    </div>
  </div>
</body>
</html>

However, if you simply follow the tutorial, as previously mentioned, you'll likely have an extra header line in the body that you need to cut and paste into the file you split from.
affa is offline   Reply With Quote