02-02-2013, 02:51 PM | #1 |
Junior Member
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> </p> </body> </html> 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> Is this possible? |
02-02-2013, 03:36 PM | #2 | |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
02-02-2013, 08:35 PM | #3 |
A Hairy Wizard
Posts: 3,069
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
What I have done is create a default epub document the way I want it; default cover/title/acknowledgements/css/opf etc and saved that as "default.epub". You could have your code in the chapter page.
When you want to start a new book, simply open the "default.epub" file and "SaveAs" to a different name. Then when you want to start work on a new chapter page, just right click on your preformed page and select "Add Copy". Hope that helps! Cheers, |
02-03-2013, 04:01 AM | #4 | |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
Either of the ways mentioned by theducks or turtle91 work fine. Create a clip with all the text, so when you add a blank page just select it all and paste the clip. Or create your template file, and right click on it and select Add Copy. |
|
02-03-2013, 09:51 AM | #5 |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Another way:
Split Yes, Split the page(near the bottom.even if no words are past the split point). All the boilerplate code is copied |
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Try to remove : This item was downloaded by caliber from .... and "Section Menu", "Ma | poulardalber | Recipes | 4 | 08-21-2012 05:23 AM |
Custom TextToSpeech "engine" as a way to create custom real audiobooks with texts | noisy | Kindle Developer's Corner | 2 | 03-31-2012 08:42 AM |
Custom column: "Updated date", when adding new "versions" of the same file? | enriquep | Library Management | 16 | 11-03-2011 10:46 AM |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
Synchronising "Book" and "Code" views | HarryT | Sigil | 2 | 08-11-2009 07:07 AM |