08-09-2011, 08:24 AM | #1 |
Connoisseur
Posts: 73
Karma: 87474
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
|
Simple code for verse breaks in poetry using Sigil?
Can anyone please tell me the simplest, no-brain way to ensure consistent breaks between verses in poetry when creating ePub books with Sigil?
I don't want to do indents; I don't want to centre text; I don't want to play fancy tricks with the margins. All I want to do is make sure that verses come out with a break after them, to separate them consistently and make sure it's possible to see where a verse begins and ends. As everyone is probably aware, hard returns don't work. What does? Some kind of consistent find/replace function to do bulk changes on Gutenberg-derived html or txt would be a bonus, but really I just want the basic code. This is driving me mad with frustration: someone please help! |
08-09-2011, 08:31 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Add <br/> at the end of each verse in code view (I don't know if there's an equivalent in book view).
|
08-09-2011, 02:42 PM | #3 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
div.verse {
margin: 1.2em 15%; page-break-inside: avoid } Then wrap the paragraphs for each verse in <div class="verse"> ... </div> tags. |
08-12-2011, 01:49 AM | #4 |
Connoisseur
Posts: 73
Karma: 87474
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
|
Sorry, charleski, do you mean that at the start of the whole document there should be:
div.verse { margin: 1.2em 15%; page-break-inside: avoid } ? |
08-12-2011, 02:09 AM | #5 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No, that part has to go into the stylesheet. Then do the following:
<div class="verse"> <p>Line 1</p> <p>Line 2</p> <p>Line 3</p> <p>Line 4</p> </div> <div class="verse"> <p>Line 1</p> etc... Of course instead of paragrapgs you could also use blockquotes. |
08-12-2011, 07:30 AM | #6 |
Connoisseur
Posts: 73
Karma: 87474
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
|
The Project Gutenberg epub of Gray's "An Elegy Wrote in a Country Church Yard" actually seems to get the formatting right for once in a Gutenberg epub file. The code looks like this:
<div class="poem"> <div class="stanza"> <span>When the voices of children are heard on the green<br /></span> <span>And whisp'rings are in the dale,<br /></span> <span>The days of my youth rise fresh in my mind,<br /></span> <span>My face turns green and pale.<br /></span> </div> </div> The results look like they should come out perfectly in Sigil Book View, but unfortunately in FBReader they all come out the same as ever - no breaks between verses. |
08-12-2011, 07:37 AM | #7 |
Connoisseur
Posts: 73
Karma: 87474
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
|
And how do I create the style sheet? So far on the project files I've created, there's no style sheet in the Styles folder of the Book Browser.
|
08-12-2011, 11:07 AM | #8 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Check our wiki on CSS to learn about creating a file. FBReader does not fully support CSS.
Last edited by DaleDe; 08-12-2011 at 11:10 AM. |
08-12-2011, 03:42 PM | #9 |
Connoisseur
Posts: 61
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
When you want a blank line put:
Code:
<p > </p> |
08-12-2011, 04:29 PM | #10 |
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
|
08-12-2011, 05:40 PM | #11 |
Connoisseur
Posts: 61
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
"Can anyone please tell me the simplest, no-brain way to ensure consistent breaks between verses in poetry when creating ePub books with Sigil?"
|
08-12-2011, 05:55 PM | #12 |
Guru
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
|
|
08-13-2011, 02:14 AM | #13 |
Nameless Being
|
Unfortunately your question is akin to those such as "how long is a piece of string?" All those who do answer your question believes that their method is the simplest or fastest way to accomplish the task and for them it probably is.
The section in Pablo's tutorial PDF is pretty simple and probably should be the one you use to keep the semantic people happy. If you don't give a toss about the semantic people just use one <p> per stanza with <br /> at the end of each line and use your own <p> </p> between stanzas. It's not what I personally use (nor Pablo's method) but since I do know "how long a piece of string is" I am happy to keep my method to myself. |
08-13-2011, 03:46 AM | #14 |
Connoisseur
Posts: 61
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
Whoa there! I'm quoting the original poster and making the point to charleski about what was asked for.
@ Pablo - your "tutorial" is simplistic and I passed that level long ago, but congratulations on getting a plug in for your post. Keep at it! @ shall1028 - try reading the full thread and noting who the poster is before sounding off. |
08-13-2011, 01:18 PM | #15 | |
Nameless Being
|
Quote:
I blame Twitter for the whole thing. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free Poetry book | kikar | Self-Promotions by Authors and Publishers | 7 | 01-29-2012 04:10 AM |
Semantic formating for simple poetry: any comments on my code? | sourcejedi | ePub | 12 | 04-22-2011 06:28 AM |
epub3 Sigil Poetry(fixed layout) | Giggleton | Sigil | 7 | 04-04-2011 12:58 PM |
Simple Recipe Breaks in Latest Version | Tegan | Recipes | 6 | 02-14-2011 10:48 AM |
Formatting, code, simple help needed | panda6855 | Sigil | 43 | 01-13-2011 06:37 PM |