![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Preventing hyphenation in chapter titles?
I'm doing a number of books that have chapter titles and I'd like to prevent those from getting automatically hyphenated while leaving the main text alone. My understanding is that one can use the following properties in the stylesheet for the chapter header:
Code:
-webkit-hyphens: none !important; -epub-hyphens: none !important; -moz-hyphens: none !important; adobe-hyphenate: none !important; So should I use this property or not? And if I don't, will I get hyphenation of chapter titles on readers using the Adobe engine? Confused beginner! |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
You will need to use adobe-hyphenate: none; if you want to turn off the automatic hyphenation on Adobe-based readers.
Edit: The W3C validator is a useful tool for picking up spelling mistakes in CSS, because it will report a typo like text-algin:justify; as an error. But there is no way for it to tell the difference between a misspelt known property and a correctly-spelt unknown property like adobe-hyphenate. Last edited by GeoffR; 11-15-2016 at 04:35 PM. Reason: The W3C validator ... |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
WHat does epubcheck say about this?
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
Thanks for confirming! Sent from my Nexus 9 using Tapatalk |
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Epubcheck seems fine with it! So I guess I'll run with it. Just want to get it as good as I can. Have run the CSS through CSSLint, that's all good too.
Works on my oldest reader Sony PRS-350, fine in ADE, great with Google Play books, seems to open and display OK in most popular Android reading apps, though some clearly have less CSS support than others. I can't test on iBooks, don't own any iDevices. Sent from my Nexus 9 using Tapatalk |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
There is also just plain ol':
hyphens: none; |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Turns out hyphens: none also triggered an error warning from the W3C validator. So I took that AND the adobe-hyphenate COMPLETELY OUT and stress tested the book by putting it on my Sony PRS-350 with font at XXL. No chapter titles got hyphenated.
Then I uploaded it to Play Books and cranked font to 700% ... that wasn't exactly pretty, but NO chapter titles hyphenated. So I believe for practical purposes, using just the webkit, epub and moz properties will be fine without anything else. I know the stylesheets will validate with those and if 700% font size didn't cause something to hyphenated, can't imagine much would in practical use. Sent from my Pixel C using Tapatalk |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
If you are using centred or left-aligned text for your headers then you are probably okay to do without adobe-hyphenate with current Adobe readers, but I wouldn't rely on it as the hyphenation behaviour has changed from version to version.
Last edited by GeoffR; 11-17-2016 at 02:12 AM. Reason: ... or left-aligned ... |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
Sent from my Nexus 9 using Tapatalk |
|
![]() |
![]() |
![]() |
#10 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
What exactly is the Validator saying and what are the settings you are using? If you press on the More Options button in the Validator, you can see more detailed settings (Profile, Vendor Extensions, [...]). In CSS, it doesn't hurt if the parser runs across properties it doesn't understand. A device that only understands CSS2 and runs across CSS3 "hyphens: none" should ignore it + do absolutely nothing with that information, then just move on. What you should look out for though is a serious blunder, like a missing/extra ; or {}. ADE absolutely chokes and throws away the entire CSS file if there is any sort of parsing error in the CSS. Quote:
Last edited by Tex2002ans; 11-17-2016 at 02:13 PM. |
||
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
Sent from my Pixel C using Tapatalk |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
Sent from my Pixel C using Tapatalk |
|
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
LEFTHYPHENMIN 5 RIGHTHYPHENMIN 5 That means you won't get hyphens unless the line can handle 6 characters (including the hyphen). Also, words won't hyphen if they are less than 5 to the left & right of the hyphen. I found a hyphenation dictionary that works very well and set the options to allow more hyphenation and less craters (gaps). Install it and try your ePub again. https://www.mobileread.com/forums/sho...d.php?t=252405 |
|
![]() |
![]() |
![]() |
#15 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
|
Quote:
leastways the one I used to own did. Annoyed the hell out of me, but then it broke anyway ![]() T3 used a newer version of ADE than the T1, T2 did |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chapter #s or Chapter Titles? | bmcox | Writers' Corner | 33 | 02-01-2013 07:03 AM |
Prevent titles hyphenation in iPad and iPhone | fante1998 | ePub | 0 | 02-24-2012 05:43 AM |
Ebook chapter titles: with or without chapter number? | amoroso | Writers' Corner | 16 | 06-14-2011 06:35 AM |
PRS-350 Breaks after Chapter Titles | Rand Brittain | Sony Reader | 2 | 10-25-2010 12:53 PM |