|
|
#1 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2013
Device: Kindle
|
Looking for or requesting a Feature: custom "section" code
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? |
|
|
|
|
|
#2 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,958
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 615
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
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, |
|
|
|
|
|
#4 | |
|
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,266
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.
__________________
See the Sigil User Guide and its tutorials for details about Sigil. |
|
|
|
|
|
|
#5 |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,958
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
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
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
![]() |
| 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 |