View Single Post
Old 02-02-2013, 03:36 PM   #2
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: 29,818
Karma: 54830978
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 packer_backer View Post
Hi,

I've been using Sigil for a few months now, restoring public domain books and making them available on Amazon. Its worked out very well for me. Thank you for creating and maintaining it.

I'd like to suggest (or, if it already exists, know how to find) a feature.

There are certain pieces of code that I always add to each "section" file (usually CSS-related). Is there a way that Sigil could utilize a user-defined xhtml file automatically when creating a new "Section"?

For example, right now, any new "section" added to a EPUB book contains this code:
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></title>
</head>

<body>
  <p>&nbsp;</p>
</body>
</html>
I would find it helpful if I could, somehow, tell Sigil to create every new "section" with:
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></title>
  <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <p class="ChapterTitle"> Insert Chapter Title</p>

</body>
</html>
Obviously, this is a very minor change to the code, but thee may be people that have significantly greater amounts of changes they like to make to their books.

Is this possible?
Use the Clipboard tool to save (and later past your custom boilerplate(s))
theducks is offline   Reply With Quote