Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-08-2012, 01:20 PM   #1
ibn opcit
Junior Member
ibn opcit began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2012
Device: none
phantom indents in poetry

Hi,

I am converting some poetry books to epub and kf8/mobi. To achieve backwards-compatible indentation behavior, I am using Joshua Tallent's techniques, described here.

My question is about a special case of poetry indentation, where a line is indented according to the space taken by the previous line. The attached image gives the idea.

It is important that the indentation be font-independent, so that the alignment survives under a change of font.

In latex (in the memoir class), this kind of indent can be achieved using
Code:
\vinphantom{this will insert whitespace which is exactly the width of this text}
On newer e-readers, this kind of indent can be achieved using
Code:
span.hemistich {
    visibility: hidden;
}
... in the css, then something like ...
Code:
<p class="poemline">At a four-way stop the minivan guns it,</p>
<p class="poemline"><span class="hemistich">At a four-way stop the minivan guns it,</span>--the girl's hair</p>
I am looking for a version of this technique that degrades gracefully on older devices that do not support the visibility property. It's okay if the indent doesn't work perfectly on older devices, but you get the grand prize if it does.

Ideas?
Attached Thumbnails
Click image for larger version

Name:	indents.PNG
Views:	284
Size:	34.2 KB
ID:	90360  
ibn opcit is offline   Reply With Quote
Old 08-08-2012, 11:14 PM   #2
44reader
Connoisseur
44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese44reader can extract oil from cheese
 
44reader's Avatar
 
Posts: 61
Karma: 1234
Join Date: Jun 2012
Device: none
I'm not going to win any prizes here.

But, just in case there's anything useful in these two articles, here are two links.

http://epubsecrets.com/formatting-po...pub-part-1.php

http://www.pigsgourdsandwikis.com/20...poetry-on.html

There's probably nothing there as you seem to be pretty expert already and just want to achieve something very specific. So...

I hand you back to the MR experts.
44reader is offline   Reply With Quote
Advert
Old 08-09-2012, 04:50 AM   #3
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,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The problem is not exactly with "older" devices, but with the fact the visibility property is not supported by the ePub 2.01 specification, so any device could not support it and still be ePub-compliant. On the other hand, mobi does not support CSS at all, new or old, and it has no equivalent for visibility as far as I know.

You could try to force the invisibility by using:

Code:
visibility: hidden;
color: white;
opacity: 0;
But opacity is a CSS3 property that's not in ePub 2.01 either, or in ePub 3, I believe. Using a white color for the text will only work if the background is white, something you can't guarantee unless you force it (and that's not nice). Unfortunately "transparent" can only be used with background color, not with text.
Jellby is offline   Reply With Quote
Old 08-09-2012, 11:44 AM   #4
ibn opcit
Junior Member
ibn opcit began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2012
Device: none
@44reader, thanks, I might wind up trying to contact those bloggers directly to see if they've ever done anything like this.

@Jellby, ok, so it looks like I'm up against the spec more than the devices. I've had limited success with white text, but when it fails the failure mode is pretty bad (the spacer text shows up!).
ibn opcit is offline   Reply With Quote
Reply

Tags
indentation, poetry


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indents ignored Ray Green Introduce Yourself 5 04-02-2012 08:58 PM
Indents and hanging indents in epub poetry Derek R ePub 14 02-19-2012 04:43 AM
Indents again James_Wilde Conversion 9 04-03-2011 10:42 AM
Indents! Please Help! Ephraim Sigil 8 11-23-2010 03:43 PM
The Phantom Returns (Based on The Phantom of the Opera) sam_dee Reading Recommendations 15 05-28-2010 02:43 AM


All times are GMT -4. The time now is 04:05 PM.


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