View Single Post
Old 02-10-2013, 04:16 PM   #105
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Agree with JSWolf. I'd even go as far as saying you should write directly in Sigil, and create the book as an epub from the beginning. The book I'm assembling now has poems in it, and the only thing I need to do is this:

Code:
<div class="poem" id="unique-name-here">
  <p>First Line of the Poem</p>
  <p>Second Line of the Poem</p>
  <p>Third Line of the Poem</p>
  <p>Fourth Line of the Poem</p>
</div>
So I just write the lines of the poem as normal paragraphs. The CSS-file has the markup for the entire thing. The only thing you need to do, is set the width as you want it, as this can not be done automatically. For example:

Code:
// This centers all poems on their respective pages.
// It creates 1em margin above and below each poem.

div.poem {
	margin-left: auto;
	margin-right: auto;
	margin-top: 1em;
	margin-bottom: 1em;
}

// This removes the indent set for each first line of paragraphs;
// it's not wanted for poems. It sets the font of all poems to italic.

div.poem p{
	text-indent: 0em;
	font-style: italic
}

// Add this bit for each poem to make it as wide as wanted/required.
// Of course, if all poems must be the same width, add this to div.poem above.
// You can then also refrain from the id="unique-name-here" part.

div.poem#unique-name-here{
	width: 15em;
}
The crux is: in CSS, I've determined how poems must look, and by adding the <div class="poem" id="unique-name-here"> and </div> markings around each one, I don't have to worry about the layout. I *know* it will be correct. The only thing I need to do is set a width manually by adding three lines in the CSS, as this can not (officially) be done automatically.

Really, with your next book, write it as an epub in Sigil from the get-go. Your book will be perfectly formatted (supposing you apply clean markup), it will be perfectly structured and very maintainable. Also, it will convert perfectly to Mobi, AZW3, or any format you'd want.

While it requires some effort to learn to "program" a book, you'll find that it will save you a lot of time in the end. Suppose, if you really create the most epic of layouts for your poems and letters, then you can just cut and paste the CSS into a different book, and you're done. Besides writing the poems and letters, of course. And if you decide: naaah... I don't want the poems in italic. I want them all bold. Then you just change "font-style: italc;" to "font-style: bold;", and you're done. Because you're not working directly with the text itself, as you are in Word, you will never accidentally bodge the layout either.

You'll thank me (and JSWolf) if you switch to full time Sigil for your next book

Quote:
Originally Posted by JSWolf View Post
Amazon wants eBooks uploaded as ePub
Is it strange that I find this ironic? They really want you to upload books to them in what is practically their biggest competitor in terms of format... to upload books in the one format they DON'T support?! How stupid. They're actually acknowledging that EPUB is easier to work with than their own format, IMHO. It would be the same that Microsoft requires documents to be sent to them in ODF format instead of DOC(X)...

edit: I've added an example to show what the sort of CSS above would yield. And yes, you can find the book I'm working on by putting the text into Google. You can actually read the entire thing in Google Books if you'd want (And for people who actually own the hardcover: no, the poems in there are not in italic, but *I* like them better that way.)
Attached Thumbnails
Click image for larger version

Name:	poem.jpg
Views:	173
Size:	181.9 KB
ID:	101040  

Last edited by Katsunami; 02-10-2013 at 04:42 PM.
Katsunami is offline   Reply With Quote