03-29-2013, 02:50 AM | #1 |
Member
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Kindle. Boox Leaf2
|
Copying CSS headers to following chapters in Sigil
Is there any way to automate the copying of altered CSS headers to subsequent chapters in Sigil?
This is the background to the question - I am preparing a book of poetry in Sigil. It then goes to Calibre to convert to Mobi and is emailed to my Kindle to check appearance, formatting etc. I started in Sigil with a single file of 36 poems, experimented with style sheet commands to get a format that looked good, and then separated the poems so they act as chapters to make the TOC work as simply as possible. I then noticed that when the Kindle splits a long line it right justifies the first section, which creates large spaces between words and looks awkward and mis-matched to the rest of the poem. So I went back into Sigil to add a text-align: left; command to the CSS for my p.poem style. I sent the new mobi to the Kindle, no change in the longer lines. It took an hour or so of investigating how to get the Kindle to obey the command before I found I'd made a Sigil mistake. My mistake was in thinking that putting the CSS command in the top file, what was once the only CSS sheet in the doc, it would be obeyed by subsequent chapters. Wrong. So I manually copied the command to every chapter's CSS. Success. My question: Is there any way to automate the copying of altered CSS headers to subsequent chapters in Sigil? |
03-29-2013, 03:11 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Your story is a classic story of why you want to have an external stylesheet instead of an internal stylesheet. If you have an external stylesheet and a reference to that stylesheet in each (x)html file, changes can be done in the stylesheet and effective in all files that reference to it.
So, your answer is to create an external stylesheet. Move the styles in it you apparently defined in your original HTML file and create a reference. Even creating the links can be done easily. Select in the Book Browser all the HTML files, right-click and appoint the stylesheet to the files. After that a change in the stylesheet is effective in all files. |
Advert | |
|
03-29-2013, 07:10 AM | #3 |
Member
Posts: 16
Karma: 10
Join Date: Nov 2010
Device: Kindle. Boox Leaf2
|
Thanks, Toxaris.
I've chased up creating and linking stylesheets and got it all up and running. |
03-29-2013, 07:10 AM | #4 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
And you can even create several extenal sytlesheets as described above and apply them to selected chapters. This is useful if you are stuck with tables, say for the Table of Contents and for data. You may want to use small type in the tables, but not in the Table of Contents. You can have your TOC section refer to one stylesheet and the sections with data tables to another.
And if you tune up the one for data tables it applies to all of them, rather than changing all of them and making the inevitable typing mistake in the process. |
03-29-2013, 03:18 PM | #5 |
Guru
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
|
Advert | |
|
03-30-2013, 05:00 AM | #6 |
A Hairy Wizard
Posts: 3,093
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
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil and chapters. | p3aul | Sigil | 5 | 11-29-2012 09:23 PM |
Sigil + Adobe Digital Editions + chapters | wkuiper | Sigil | 6 | 11-23-2012 10:58 AM |
Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |
Sigil and epub (can I delete empty chapters?) | desaderal | Sigil | 3 | 03-24-2011 07:57 AM |
ABBYY - Chapters, Not Headers! | PieOPah | Workshop | 0 | 09-20-2009 08:55 AM |