|03-29-2013, 03:50 AM||#1|
Join Date: Nov 2010
Copying CSS headers to following 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.
Is there any way to automate the copying of altered CSS headers to subsequent chapters in Sigil?
|03-29-2013, 04:11 AM||#2|
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
|03-29-2013, 08:10 AM||#4|
Color me gone
Join Date: Apr 2008
Location: Central Oregon Coast
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, 04:18 PM||#5|
Join Date: Nov 2011
|03-30-2013, 06:00 AM||#6|
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
I wouldn't use Calibre to convert to mobi....use the free - and approved/supported - Kindle Previewer.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Sigil and chapters.||p3aul||Sigil||5||11-29-2012 10:23 PM|
|Sigil + Adobe Digital Editions + chapters||wkuiper||Sigil||6||11-23-2012 11:58 AM|
|Sigil 0.3.4 / Problème CSS entre Sigil et iPad||Grivels||Software||10||07-03-2011 10:06 AM|
|Sigil and epub (can I delete empty chapters?)||desaderal||Sigil||3||03-24-2011 08:57 AM|
|ABBYY - Chapters, Not Headers!||PieOPah||Workshop||0||09-20-2009 09:55 AM|