Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-29-2013, 02:50 AM   #1
Kimble
Member
Kimble began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2010
Device: Kindle
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?
Kimble is offline   Reply With Quote
Old 03-29-2013, 03:11 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,861
Karma: 2714881
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.
Toxaris is offline   Reply With Quote
 
Enthusiast
Old 03-29-2013, 07:10 AM   #3
Kimble
Member
Kimble began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Nov 2010
Device: Kindle
Thanks, Toxaris.
I've chased up creating and linking stylesheets and got it all up and running.
Kimble is offline   Reply With Quote
Old 03-29-2013, 07:10 AM   #4
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 1,918
Karma: 1405001
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.
mrmikel is offline   Reply With Quote
Old 03-29-2013, 03:18 PM   #5
exaltedwombat
Evangelist
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 433
Karma: 1703930
Join Date: Nov 2011
Device: none
Quote:
Originally Posted by Kimble View Post
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.
Why convert in Calibre? Kindle Previewer is the obvious tool for this job.
exaltedwombat is offline   Reply With Quote
Old 03-30-2013, 05:00 AM   #6
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
Quote:
Originally Posted by exaltedwombat View Post
Why convert in Calibre? Kindle Previewer is the obvious tool for this job.
+1

I wouldn't use Calibre to convert to mobi....use the free - and approved/supported - Kindle Previewer.
Turtle91 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 12:08 AM.


MobileRead.com is a privately owned, operated and funded community.