Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2015, 11:42 AM   #1
mtrahan
Colonel Mustard
mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.
 
mtrahan's Avatar
 
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
Poetry Verses Alignment Problem

Hey guys,

I’m facing a problem in a book of poetry and I’m afraid there is no perfect solution in ePub. It’s kinda hard to explain with my limited english, but there are many verses that are aligned with the end of the previous verse. See this blurred page (copyrighted stuff, sorry) from the PDF version for example :

I drew the black lines to show that the beginning of a verse must be aligned with the end of the previous one.

Is there a way to consistently replicate this kind of formatting? I’m afraid not, for many reasons (for example, users can switch fonts).

The closest solution I thought of was to create a style for every strangely aligned verse and tweak the left margin for every one of them... which doesn’t seem like a very good solution, since there are so many. And it probably won’t even be consistent when users change fonts, etc.)

The option I proposed to the publisher is to uniformize these strangely aligned verse to a common value (left margin). He doesn’t really like this option, but I don’t exactly see a better one.

Am I missing something here? Any ideas?

Thanks in advance,

Michael
mtrahan is offline   Reply With Quote
Old 03-30-2015, 11:52 AM   #2
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
I can think of two approaches that might work to varying degrees, but you'd have to experiment to see.

1. Put both lines it in the same paragraph and shift the second one down with a baseline shift. Caveat: if it ends up wrapping to the next line, that will obviously look less than ideal.

2. Use a table whose width is set to the width of the browser screen, with two rows and two columns. Caveat: not all readers handle tables very well.
dgatwood is offline   Reply With Quote
Advert
Old 03-30-2015, 11:56 AM   #3
mtrahan
Colonel Mustard
mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.
 
mtrahan's Avatar
 
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
Quote:
Originally Posted by dgatwood View Post
I can think of two approaches that might work to varying degrees, but you'd have to experiment to see.

1. Put both lines it in the same paragraph and shift the second one down with a baseline shift. Caveat: if it ends up wrapping to the next line, that will obviously look less than ideal.

2. Use a table whose width is set to the width of the browser screen, with two rows and two columns. Caveat: not all readers handle tables very well.
The table idea is pretty good, I didn’t even think about it, but that means creating A LOT of tables for not super safe results. Thanks for the input.
mtrahan is offline   Reply With Quote
Old 03-30-2015, 12:00 PM   #4
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
One idea would be to make alternate lines align left and align right. This would not line up exactly on the previous line but the effect would be the same I believe from a user experience. You might have to try it over a large area to see the effect. In poetry it is the experience that counts.

You could also make the left/right margins stagger with the right justified section having a bigger left margin while the left justified would have a bigger right margin. This would have the effect of staggering even long lines or lines that overflowed one screen line.

Dale

Last edited by DaleDe; 03-30-2015 at 03:38 PM.
DaleDe is offline   Reply With Quote
Old 03-30-2015, 01:57 PM   #5
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
You could use "visibility: hidden", but it may be unsupported by some readers, and it may not play nicely with text-to-speech systems.
Jellby is offline   Reply With Quote
Advert
Old 03-30-2015, 08:27 PM   #6
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by mtrahan View Post
The table idea is pretty good, I didn’t even think about it, but that means creating A LOT of tables for not super safe results. Thanks for the input.
Tables are the ONLY way to achieve anything remotely like that, that won't have reflow issues when a) the font size is changed, b) the font is changed, c) the margins are changed (! don't forget that one), etc. And even THEN, you'll still have some issues when you change font sizes, assuming that your table settings are in ems, possibly.

And yes, it's a lot of work. We've had such "save the drama for your mama" here about "visual poetry" that generally, unless I've had a very, very clear discussion with the author/poet and/or publisher, we decline the work. It's just hard to make it pay enough to cover the brain-damage, both from the initial work (did I mention, a bajillionty tables?) and the inevitable subsequent hysteria when a font size is changed, when the client receives the review file. Even charging "uber-complex" just never seems to cover the costs.

FWIW. I'd second Dale's ideas, either shifting the content left/right, alternating, or using stagger, but no matter what you do, without tables, the overflow issue with come back and likely bite you in the tailbone.

Hitch
Hitch is offline   Reply With Quote
Old 03-31-2015, 06:40 AM   #7
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
As a rule, it's easier to change one's workflow (or expectations, in this case) than to get the world to change its.
Notjohn is offline   Reply With Quote
Old 03-31-2015, 09:09 AM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Hi Michael;

Maybe there is an easier way to get what you want. I works perfectly under ADE 3.0 so I think it should also work on RMSDK ereaders. The code I used was:

1. In the .xhtml file:

Code:
  <p class="fl">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

  <p class="sc">This is the second line</p>
2. In the .css file:

Code:
.fl {
    display: inline;
    margin-bottom: 0em;
    text-align: justify;
}

.sc {
    display: inline;
    position: relative;
    top: 1.2em; /*This position must be linked with the line-height you are using; take in count that */
}
As you can see, we only need to use the property "display: inline" to the the desired effect. This is how it looks in Sigil and ADE 3.0 (ADE with two size of fonts):

Click image for larger version

Name:	Image1.png
Views:	234
Size:	66.3 KB
ID:	136636 Click image for larger version

Name:	Image2.png
Views:	238
Size:	25.3 KB
ID:	136637 Click image for larger version

Name:	Image3.png
Views:	248
Size:	35.6 KB
ID:	136639

Below you can check the respective .epub.

Regards
Rubén

UPDATE: If you want to consecutive stanzas with that format, then you need to enclose them in a <div> block with the property "display: block"; so you'd need to use the following styles:

Spoiler:

Code:
.bl {
    display: block;
    margin-bottom: 1.2em;
}

.fl {
    display: inline;
    margin-bottom: 0em;
    text-align: justify;
}

.sc {
    display: inline;
    position: relative;
    top: 1.2em;
}


and in the .xhtml file:

Spoiler:

Code:
  <div class="bl">
    <p class="fl">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

    <p class="sc">This is the second line</p>
  </div>

  <div class="bl">
    <p class="fl">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

    <p class="sc">This is the second line</p>
  </div>


This is how it looks under ADE:

Click image for larger version

Name:	Image4.png
Views:	250
Size:	35.0 KB
ID:	136640

Also I attach a new .epub.
Attached Files
File Type: epub Poetry Aligment.epub (2.2 KB, 159 views)
File Type: epub Poetry Aligment II.epub (2.2 KB, 151 views)

Last edited by RbnJrg; 03-31-2015 at 10:27 AM.
RbnJrg is offline   Reply With Quote
Old 04-01-2015, 10:45 AM   #9
mtrahan
Colonel Mustard
mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.mtrahan is no ebook tyro.
 
mtrahan's Avatar
 
Posts: 90
Karma: 1426
Join Date: Feb 2010
Location: Montreal
Device: iPhone 6, Kindle Paperwhite 2, iPad 2
Wow, thanks guys. You are awesome. I did manage to convince the publishers to just use the same indent for all strangely aligned verses, but I will try RbnJrg’s solution a bit. It is quite impressive actually, very clever solution.

A huge thanks for all the help, I really appreciate it.
mtrahan is offline   Reply With Quote
Old 04-01-2015, 11:20 AM   #10
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by mtrahan View Post
...I will try RbnJrg’s solution a bit. It is quite impressive actually, very clever solution.
Thank you very much; I really hope that my code can help you.

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 04-03-2015, 11:33 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,987
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by mtrahan View Post
Wow, thanks guys. You are awesome. I did manage to convince the publishers to just use the same indent for all strangely aligned verses, but I will try RbnJrg’s solution a bit. It is quite impressive actually, very clever solution.

A huge thanks for all the help, I really appreciate it.
I have to say this. RbnJrg's solution will not work as you want. I can easily break it. All you need it to have large enough text, or wide enough margins, or a combination of both where your lines don't fit on screen without some wrapping. So while it looks good as long as you have no wrapping, once you do, it's all shot to hell.
JSWolf is offline   Reply With Quote
Old 04-04-2015, 03:44 PM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
I have to say this. RbnJrg's solution will not work as you want. I can easily break it. All you need it to have large enough text, or wide enough margins, or a combination of both where your lines don't fit on screen without some wrapping. So while it looks good as long as you have no wrapping, once you do, it's all shot to hell.
Where are you opening the .epub? Can you post a screenshot of your results? Below you can see a screenshot of ADE 3.0 with large enough text:

Click image for larger version

Name:	Image1.png
Views:	333
Size:	109.1 KB
ID:	136796

As you can watch, the code I wrote works fine; maybe you are doing something wrong and of that way are getting different results. Below I attach the respective new .epub so you can check all.
Attached Files
File Type: epub Poetry Aligment III.epub (2.4 KB, 166 views)

Last edited by RbnJrg; 04-04-2015 at 03:47 PM.
RbnJrg is offline   Reply With Quote
Old 04-05-2015, 12:46 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,987
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by RbnJrg View Post
Where are you opening the .epub? Can you post a screenshot of your results? Below you can see a screenshot of ADE 3.0 with large enough text:

Attachment 136796

As you can watch, the code I wrote works fine; maybe you are doing something wrong and of that way are getting different results. Below I attach the respective new .epub so you can check all.
The ePub you've posted looks nothing like the screen grab.
JSWolf is offline   Reply With Quote
Old 04-05-2015, 05:38 AM   #14
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
The ePub you've posted looks nothing like the screen grab.
Again I ask you, where are you opening the .epub? Again I ask you, can you post a screenshot of your results? Please, could you answer my questions? Anybody can open the .epub I attached in my post on ADE 3.0 and to get the same results that I showed in my screenshot.

Last edited by RbnJrg; 04-05-2015 at 05:57 AM.
RbnJrg is offline   Reply With Quote
Old 04-05-2015, 07:03 AM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by RbnJrg View Post
Again I ask you, where are you opening the .epub? Again I ask you, can you post a screenshot of your results? Please, could you answer my questions? Anybody can open the .epub I attached in my post on ADE 3.0 and to get the same results that I showed in my screenshot.
Ruben:

I suspect that Jon is opening this (VIII) in ADE 2.0, or Sony Reader. Neither will display the results as you have them there. Nor will Nook for PC (and, presumably, Nook devices--I admit, I haven't loaded it there yet; my Nook has developed a wonkiness with whether or not my beacon is visible for using Dropbox with it, so I'm lazy about USB-ing it).

FWIW. I haven't tested it on an iBooks reader on iPad, either; I'd tend to assume it would work there, but...

P.S., Jon: you really ought to answer Ruben's questions, sweetie.

Hitch

Last edited by Hitch; 04-05-2015 at 07:04 AM. Reason: Note to Jon.
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to mobi - text alignment problem sskywalker Calibre 6 05-02-2014 11:27 PM
Text - Image alignment problem MrB Sigil 10 11-03-2012 03:36 AM
Debut e-book poetry collection "Subconscious Verses" PrimitiveDonkey Self-Promotions by Authors and Publishers 1 10-27-2011 11:34 AM
Text Alignment Problem fan of kovid Conversion 15 03-20-2011 05:39 PM
Formatting Poetry - A Problem Patricia Sony Reader 8 08-21-2007 02:33 PM


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


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