Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-09-2011, 08:24 AM   #1
pstjmack
Connoisseur
pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.
 
pstjmack's Avatar
 
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!
pstjmack is offline   Reply With Quote
Old 08-09-2011, 08:31 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
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).
Jellby is offline   Reply With Quote
Advert
Old 08-09-2011, 02:42 PM   #3
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
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.
charleski is offline   Reply With Quote
Old 08-12-2011, 01:49 AM   #4
pstjmack
Connoisseur
pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.
 
pstjmack's Avatar
 
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
}

?
pstjmack is offline   Reply With Quote
Old 08-12-2011, 02:09 AM   #5
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: 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.
Toxaris is offline   Reply With Quote
Advert
Old 08-12-2011, 07:30 AM   #6
pstjmack
Connoisseur
pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.
 
pstjmack's Avatar
 
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.
pstjmack is offline   Reply With Quote
Old 08-12-2011, 07:37 AM   #7
pstjmack
Connoisseur
pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.pstjmack knows better than to ask about the Gravitic Imploder Lance.
 
pstjmack's Avatar
 
Posts: 73
Karma: 87474
Join Date: Jul 2011
Location: Budapest, Hungary
Device: Android tablet
Quote:
Originally Posted by Toxaris View Post
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.
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.
pstjmack is offline   Reply With Quote
Old 08-12-2011, 11:07 AM   #8
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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.
DaleDe is offline   Reply With Quote
Old 08-12-2011, 03:42 PM   #9
Faster
Connoisseur
Faster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of light
 
Posts: 61
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
When you want a blank line put:
Code:
<p >&nbsp;</p>
Faster is offline   Reply With Quote
Old 08-12-2011, 04:29 PM   #10
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by Faster View Post
When you want a blank line put:
Code:
<p >&nbsp;</p>


No, do it in the css.
charleski is offline   Reply With Quote
Old 08-12-2011, 05:40 PM   #11
Faster
Connoisseur
Faster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of light
 
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?"
Faster is offline   Reply With Quote
Old 08-12-2011, 05:55 PM   #12
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Quote:
Originally Posted by Faster View Post
"Can anyone please tell me the simplest, no-brain way to ensure consistent breaks between verses in poetry when creating ePub books with Sigil?"
Have a look at my epub tutorial (see my signature).
Pablo is offline   Reply With Quote
Old 08-13-2011, 02:14 AM   #13
shall1028
Nameless Being
 
Quote:
Originally Posted by Faster View Post
"...the simplest, no-brain way..."
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>&nbsp;</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.
  Reply With Quote
Old 08-13-2011, 03:46 AM   #14
Faster
Connoisseur
Faster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of lightFaster is a glorious beacon of light
 
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.
Faster is offline   Reply With Quote
Old 08-13-2011, 01:18 PM   #15
shall1028
Nameless Being
 
Quote:
Originally Posted by Faster View Post
Whoa there! I'm quoting the original poster and making the point to charleski about what was asked for.
My hesitant and vague apology. The "" marks were somewhat unnoticeable with the bold text in between and the post was so far down the list from the original poster's post that it was easy enough to assume a second person looking for the same sort of thing.

I blame Twitter for the whole thing.
  Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:16 AM.


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