Re: Sony misreading epub layout of poetry - how do I solve it?

Idle Spider Books <[email protected]>
Newsgroups gmane.culture.literature.ebook-community
Message-ID <[email protected]>
I don't recommend using <pre> for verse because the layout breaks at 
larger font sizes; the text on the right extends past the screen and 
disappears (Sony & Nook) or wraps to the left edge (Kindle).

(And because the default font for <pre> is monospace and not all 
readers allow the font to be overridden.)

I've had success stying verse using CSS:

CSS (change indents & margins to your preferences)

div.verse {
         max-width: 600px;     // Keeps the source, if right-aligned, 
near the verse
         margin-bottom: 20px;  // Separates verse from the text that 
comes after
}

p.lineA {
         text-indent: -40px;
         margin: 0px 0px 0px 40px;  // Margins in this order: top, 
right, bottom, left
}

p.lineB { text-indent: -20px; margin: 0px 0px 0px 40px; }


HTML

<div class="verse">
<p class="lineA">Thus communed these; while to their lowly dome,</p>
<p class="lineB">The full-fed swine return&apos;d with evening home;</p>
<p class="lineA">Compell&apos;d, reluctant, to the several sties,</p>
<p class="lineB">With din obstreperous, and ungrateful cries.</p>
</div>

For Kindle 3, put the .lineA and .lineB CSS inline (without margins):

<p style="text-indent: -20px;">

<p style="text-indent: -40px;">

This code has been tested on the Sony Reader PRS-350, Nook, and Kindle 3.

At 5/18/2011 02:35 AM, [email protected] wrote:
1b. Re: Sony misreading epub layout of poetry - how do I solve it?
     Posted by: "Lee Passey" [email protected] wlpassey
     Date: Tue May 17, 2011 3:48 pm ((PDT))
>Traditionally, poetry has been structured in HTML using the <PRE> element[1].
>Text inside a <PRE> element typically 1. does not collapse whitespace (two
>adjacent spaces will remain as two adjacent spaces); 2. does not automatically
>wrap lines (long lines will cause horizontal scrolling); and 3. is rendered in
>a fixed width font (characters appear in "columns"). Typically, all three of
>these attributes are desirable in poetry.

--Sandra Williams

Idle Spider Books
http://idlespiderbooks.com  



------------------------------------

------------------------------------------------------
Post a message:   ebook-community [[at]] *
Unsubscribe:      ebook-community-unsubscribe [[at]] *
Switch to digest: ebook-community-digest [[at]] *
Switch to normal: ebook-community-normal [[at]] *
Put mail on hold: ebook-community-nomail [[at]] *
Administrator:    ebook-community-owner [[at]] *

(* == yahoogroups.com)
-------------------------------------------------------Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ebook-community/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ebook-community/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    ebook-community-fullfeatured-hHKSG33TihhbjbujkaE4pw@public.gmane.org

<*> To unsubscribe from this group, send an email to:
    ebook-community-unsubscribe-hHKSG33TihhbjbujkaE4pw@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.