View Single Post
Old 02-02-2013, 03:51 PM   #1
packer_backer
Junior Member
packer_backer began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2013
Device: Kindle
Looking for or requesting a Feature: custom "section" code

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?
packer_backer is offline   Reply With Quote