Go directly to main content.

Special alignment option for poetry

Project:EPUB Maintenance
Component:Open Publication Structure (OPS)
Category:feature request
Priority:normal
Assigned:PSorotokin
Status:future consideration

 When typesetting poetry, it is normal to have lines left-aligned. If a line doesn't fit the page, it is broken at a convenient place and the second part is right-aligned, and often with a mark (like an opening square bracket) before it. This is a rather specific need and, as far as I know, it's not a supported property in CSS, so if accepted it would be an extension for EPUB.

It should probably work too if manual linebreaks (<br />) are included, meaning that only lines automatically broken by the render engine should be aligned in this special way, while lines after a <br /> should start left-aligned as usual.

The Mobipocket format includes support for this special alignment see the bottom here, though support for this does not seem quite extended in readers.

Description
Issue Id: 
20
Resolution: 

Close, add to future directions

Comments

#1

I've not actually seen this sort of alignment used much (and didn't find it after 20 minutes of looking through my poetry collection). Generally we just set turnover lines with a larger left indent.

I'd be wary of adding something that's not in XHTML or CSS for such a specialized situation...

#2

It might be the convention is different in different languages, I've often seen it in Spanish (as an example, see this book, page 118.) Maybe I should propose this to the W3C instead?

#3

Wouldn't this be a simple span element containing the text to be flowed in that fashion, with the appropriate justification and perhaps a text-before option?

Or is this a hope to automate it without any author intervention?

#4

It should be automatic, like any other line wrap; it should be done dynamically depending on the line length and page width.

Besides, text-before is not part of the current EPUB spec, it seems.

#5

Assigned to:Anonymous» PSorotokin

#6

Assigned to:PSorotokin» Anonymous

That's more of a CSS problem, than a problem with OPS itself.
On the other hand, the IDPF invented new values for the display property with oeb-page-head and foot.

#7

Assigned to:Anonymous» PSorotokin

I was writing a comment while Peter changed the status, I'm changing the status again.

#8

Status:open» future consideration

Clearly CSS2 cannot do this and it has to be taken to the "future direction". The best option for now is to format each line of the poem as a paragraph with vertical margins set to zero, sizable left margin and negative text-indent, e.g.

.pline {
margin:0px 0px 0px 4em;
text-indent:-1em;
}

I think various options for line breaking would be a good thing to look at for future directions. Two important media for books (paper and eInk) do not support scrolling all that well, and CSS's main focus is displays that can scroll, so breaking overflow lines is certainly underdeveloped there. Source code is another area where current CSS feature set just does not work well without scrolling.

Propose we close it with status "future direction".

#9

Status:future consideration» proposed resolution

corrected the status

#10

moving to proposed resolution, as more than one week passed.

#11

Status:proposed resolution» future consideration