View Single Post
Old 07-25-2017, 10:44 PM   #3
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Welcome to MR dougfetch2!

Formatting poetry properly is one of the more difficult, if not impossible, challenges in a reflowable format such as ePub. There should be easy css properties to do what you want, but apparently the demand isn't high enough for the IDPF (the ePub standards people) to require them.

There are multiple threads on here that discuss formatting poetry, but the basic answer is for the author to accept that some of the more esoteric shapes/designs cannot be done in reflowable ePub. If it is essential to have a specific shape, then sometimes inserting an image of the poem is the easiest option. The other option (not for the novice or faint of heart) is to do a fixed format ePub.

For your specific question of line breaks and justified alignment: I can only recommend <br /> and text-align:justify and perhaps setting a <div> with a specific width (and perhaps a monospace/fixed-width font). The page-break-inside, orphans, and widows settings MIGHT help prevent breaking over a page, but it sounds like iBooks has a bug - what a shock...

Code:
CSS
div.poem   {width:410px; margin:2em; page-break-inside:avoid}
div.poem p {font-size:.8em; text-indent:0; text-align:justify; orphans:0; widows:0}

<div class="poem">
     <p>
     Bacon ipsum dolor amet andouille<br />
     meatloaf rump meatball, shank ribeye<br />
     jowl turkey swine. Drumstick tri-tip<br />
     brisket, cupim tongue andouille chuck<br />
     spare ribs. Bresaola cow drumstick,<br />
     tail boudin ground round sausage<br />
     kielbasa prosciutto turkey andouille<br />
     jowl spare ribs. Short ribs brisket.
     </p>
</div>
The div width could be set to a value that just covers the longest line???

Sorry I don't have more help for you - hopefully one of our poetry formatting gurus has some better advice!

Cheers
Turtle91 is offline   Reply With Quote