|
|
#1 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 18148
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
|
Simple code for verse breaks in poetry using 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! |
|
|
|
|
|
#2 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,133
Karma: 2460081
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon
|
Add <br/> at the end of each verse in code view (I don't know if there's an equivalent in book view).
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,181
Karma: 539735
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.
__________________
if ePub is Homo neanderthalensis, then Mobipocket is a bunch of baboons flashing their bottoms at each other |
|
|
|
|
|
#4 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 18148
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 } ? |
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,095
Karma: 924917
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
|
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.
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
|
#6 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 18148
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. |
|
|
|
|
|
#7 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 18148
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.
|
|
|
|
|
|
#8 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,684
Karma: 3644259
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2
|
Check our wiki on CSS to learn about creating a file. FBReader does not fully support CSS.
__________________
Dale DePriest http://pages.suddenlink.net/dalede or http://daledepriest.wikispaces.com currently using an EZ Reader or a Literati or my iPad. Last edited by DaleDe; 08-12-2011 at 11:10 AM. |
|
|
|
|
|
#9 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 60
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
When you want a blank line put:
Code:
<p > </p> |
|
|
|
|
|
#10 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,181
Karma: 539735
Join Date: Sep 2009
Device: PRS-505
|
![]() ![]() ![]() No, do it in the css.
__________________
if ePub is Homo neanderthalensis, then Mobipocket is a bunch of baboons flashing their bottoms at each other |
|
|
|
|
|
#11 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 60
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?"
|
|
|
|
|
|
#12 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 627
Karma: 1901287
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
|
Have a look at my epub tutorial (see my signature).
__________________
My Quick and Dirty ePub Tutorial (version 3 covering Sigil 0.7.1 now available, in pdf and ePub format) Bridging the gap between BookDesigner and Sigil: Try HTML02HTML |
|
|
|
|
|
#13 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 73978
Join Date: Jun 2010
Device: Kobo
|
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. |
|
|
|
|
|
#14 |
|
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 60
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. |
|
|
|
|
|
#15 | |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 144
Karma: 73978
Join Date: Jun 2010
Device: Kobo
|
Quote:
I blame Twitter for the whole thing. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free Poetry book | kikar | Author Self-Promotions | 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 |