Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2014, 06:26 AM   #1
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
Keeping punctuation from splitting across text-wrap linebreak

Wolfy's thread https://www.mobileread.com/forums/sho...d.php?t=243212 reminded me that I wanted to ask if there might be a secret trick to keep multiple closing punctuation marks from breaking onto the next line.

I've often seen things like word(nospace)em-dash(nospace)quote. And the em-dash and/or the quote mark jump down to the next line.

“But I want—


Or nested quote marks ’”, and it splits between the single and the double quote.

“‘Did gyre and gymbal in the wabe.’


Using nbsp between them does seem to keep them welded together, but adding spaces is not standard typography for American text. No space at all, at all, *ought* to work the same way as nbsp.

I've never come across a cure, but I thought I would ask in case I missed something obvious in my obtuseness... Now somebody has the opportunity to say, “No, silly, you know you can’t DO that
!”
GrannyGrump is offline   Reply With Quote
Old 07-25-2014, 06:47 AM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Seems like there are some unicode characters that would do the job, but gee what a lot of work for what ought to work right in the first place.
mrmikel is offline   Reply With Quote
Advert
Old 07-25-2014, 07:40 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,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
The character U+2060 (word joiner, & #8288;) should do what you want. But the reader should not break the lines at those points to start with. I don't know if this character is properly supported, and I'm a bit reluctant to include clutter (it makes editing and searching more difficult) in order to work around a clear bug (or we should maybe start writing this character before every comma and fullstop, and around every accented letter, just in case...).

Last edited by Jellby; 07-25-2014 at 07:42 AM.
Jellby is offline   Reply With Quote
Old 07-25-2014, 03:07 PM   #4
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
That split that can happen between quotes or other characters drives me crazy as well while reading. Yes, it should work that the software doesn't allow the split between certain characters, but it just doesn't work that way.

I finally gave in and put the no-break space between the " and ' and between the em-dash and quotes or ellipse and quotes. From feedback from others looking at the text, most agreed that
“ ‘Sentence example’ ”
looked better and easier to read than nesting the quotes to avoid
“‘Sentence example’”.
And I had to agree after looking at them while reading often enough.

I'll have to give the character U+2060 a try next time and see how that turns out. While adding the no-break space between them might not be a perfect solution, it always avoids splitting it between 2 lines (at least on my 2 readers), so I just consider it the lesser of the two evils and go with it.
Ripplinger is offline   Reply With Quote
Old 07-25-2014, 08:53 PM   #5
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Moderator, I think these two threads '(keeping punctuation...' and 'nbspaces... ') are dealing with the same issue. Could they be joined? Would anyone object?

Last edited by AlexBell; 07-25-2014 at 08:55 PM.
AlexBell is offline   Reply With Quote
Advert
Old 07-25-2014, 09:56 PM   #6
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: 79,749
Karma: 145864619
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 AlexBell View Post
Moderator, I think these two threads '(keeping punctuation...' and 'nbspaces... ') are dealing with the same issue. Could they be joined? Would anyone object?
I would not mind the merging of the two threads.
JSWolf is offline   Reply With Quote
Old 07-26-2014, 02:31 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by GrannyGrump View Post
Using nbsp between them does seem to keep them welded together, but adding spaces is not standard typography for American text. No space at all, at all, *ought* to work the same way as nbsp.
Are you sure about that? According to my knowledge, to be typographically correct, it should actually be a THIN SPACE between the inner single quote + the outer double quote. (I remember deliberately looking this one up when I thought they were errors in a few of the books I was OCRing). I also asked our typographer if that was proper, and she told me thin spaces between inner+outer quotes are correct.

I also quickly looked it up on Wikipedia: https://en.wikipedia.org/wiki/Quotation_mark#Spacing

Quote:
There is generally no space between an opening quotation mark and the following word, or a closing quotation mark and the preceding word. When a double quotation mark or a single quotation mark immediately follows the other, proper spacing for legibility may suggest that a non-breaking space ( ) or thin space ( ) be inserted.
I don't have any Manuals of Style on hand to give other input.

Sometimes these obscure rules are hard to actually find info on.

What I personally do, for easy coding purposes (and that line splitting problem in EPUBs/MOBIs), I just settled on jamming them together with these Search/Replaces:

LEFT QUOTES:

Search: “ ‘
Replace: “‘

RIGHT QUOTES:

Search: ’ ”
Replace: ’”

I guess you could easily just replace with:

Replace (Alt): “ ‘
Replace (Alt): ’ ”

Of course, in UK English, the single/double quotes would be flipped.

Quote:
Originally Posted by Jellby View Post
The character U+2060 (word joiner, & #8288;) should do what you want. But the reader should not break the lines at those points to start with. I don't know if this character is properly supported, and I'm a bit reluctant to include clutter (it makes editing and searching more difficult) in order to work around a clear bug (or we should maybe start writing this character before every comma and fullstop, and around every accented letter, just in case...).
I doubt that Unicode char is properly supported, it will most likely show up as ? or boxes on most devices.

And I too try to avoid sticking too many entities throughout the code, although in this case, I don't think its inclusion would be TOO bad. It is quite rare, and I don't believe it would severely effect search. Unless it occurred left and right throughout the entire book.

This entire situation reminds me of including quotation marks/punctuation inside of italics as well. I just strip nearly ALL punctuation to lay outside of italics. While not typographically correct, it saves me A MASSIVE amount of time from cleaning up OCR. You would have to go through the entire book on a case-by-case basis and figure out which actually belong in the italics, and which don't. (I only fix up the italics in the relatively rare cases of italic punctuation in headings).

Last edited by Tex2002ans; 07-26-2014 at 02:39 AM.
Tex2002ans is offline   Reply With Quote
Old 07-26-2014, 03:24 AM   #8
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,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Tex2002ans View Post
Replace (Alt): “ ‘
Replace (Alt): ’ ”
I remove the space and simply add kerning to the font (if it doesn't already have one).
Jellby is offline   Reply With Quote
Old 07-26-2014, 05:04 AM   #9
Ripplinger
350 Hoarder
Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.Ripplinger ought to be getting tired of karma fortunes by now.
 
Ripplinger's Avatar
 
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
Quote:
Originally Posted by Jellby View Post
I remove the space and simply add kerning to the font (if it doesn't already have one).
Isn't that a fix only for yourself though and it won't fix the problem on other readers without your special font? Unless of course you embed the font, but there's a lot of people (me included), who remove embedded fonts before loading them onto my readers so I can read in my preferred font.
Ripplinger is offline   Reply With Quote
Old 07-26-2014, 07:00 AM   #10
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Quote:
Originally Posted by Ripplinger View Post
Isn't that a fix only for yourself though and it won't fix the problem on other readers without your special font? Unless of course you embed the font, but there's a lot of people (me included), who remove embedded fonts before loading them onto my readers so I can read in my preferred font.
The best-laid schemes o' mice an' men
Gang aft agley,...

Tis true, alas.
mrmikel is offline   Reply With Quote
Old 07-26-2014, 05:07 PM   #11
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,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Ripplinger View Post
Isn't that a fix only for yourself though and it won't fix the problem on other readers without your special font? Unless of course you embed the font, but there's a lot of people (me included), who remove embedded fonts before loading them onto my readers so I can read in my preferred font.
Yes, only for myself (I don't embed fonts), and for anyone who uses a correctly designed font (on the basis that a correctly designed font should have such a kerning). On the other hand, it automatically fixes all books I read with this font. If I remember correctly, the Heuristica font needed no modification.
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to wrap text around pictures? ecbritz Sigil 7 05-04-2013 11:57 AM
I need help with text wrap... skammer1974 Sigil 3 03-06-2013 07:28 PM
TEXT WRAP AROUND IMAGES RKEP71 Sigil 1 06-20-2011 08:26 PM
Wrap Text Around Picture - Mobi Bull06 Conversion 6 03-23-2011 11:52 AM
LRF and wrap-around text Seabound Calibre 13 12-28-2008 03:30 PM


All times are GMT -4. The time now is 06:26 PM.


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