09-15-2020, 08:42 AM | #1 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
Weird Formatting Issues, Extra Spaces
I recently bought a copy of some translated Japanese books made by Kodansha. The book isn't actually in Japanese, but it looks like it uses Kodansha's stylesheets and so forth, and it's doing some weird things when I send it to an ebook reader. It looks completely normal in Calibre or Sigil, but when I send it to my Kobo or my Bookeen Diva, there's a giant space after every apostrophe and some letters will just disappear.
I've cleaned out several thousand unused styles and I can't find anything in them that I would expect to cause this. The encoding is UTF-8, just like the ebooks I make myself. Can anybody tell me what the source of this problem might be? |
09-15-2020, 02:49 PM | #2 |
A Hairy Wizard
Posts: 3,105
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
It might make it easier to help if we could see the CSS and a sample of the HTML that exhibits the error. If it is copyrighted, then you can Borkify it before posting.
|
09-15-2020, 09:49 PM | #3 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
I can't get Borkify to work, so I'll just post a bit of a page.
Code:
<div class="indent-2em"> <p>“If something’s on your mind, just say it.”</p> </div> <div class="indent-2em"> <p>The man seemed bothered by her question.</p> </div> <div class="indent-2em"> <p>“It’s not like that─I’m just a little out of place. I’m an island monkey. I don’t think I’ve ever stepped on wood so shiny.”</p> </div> Code:
body { font-size: 100%; vertical-align: baseline; background: transparent; text-align: justify; } div, p { display: block; margin: 0; padding: 0; } body, div, p { text-indent: 0; } body > p, div > p { text-indent: inherit; } h1, h2, h3, h4, h5, h6 { display: block; margin: 0; padding: 0; font-size: 100%; font-weight: inherit; background: transparent; } img { width: auto; height: auto; margin: 0; padding: 0; border: none; vertical-align: baseline; background: transparent; } a { font-style: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; background: transparent; } .align-center { text-align: center; } .align-right, .align-end { text-align: right; } .hltr a { text-decoration: underline; } a:link, a:visited, a:hover, a:focus, a:active { color: #00f; } img.gaiji, img.gaiji-line, img.gaiji-wide { display: inline-block; margin: 0; padding: 0; border: none; background: transparent; } img.gaiji { width: 1em; height: 1em; } .hltr img.gaiji, .hltr img.gaiji-line, .hltr img.gaiji-wide { vertical-align: text-bottom; } .fit { display: inline-block; page-break-inside: avoid; max-height: 100%; max-width: 100%; } .hltr .fit { vertical-align: top; } .super { font-size: x-small; vertical-align: super; } .hltr .gfont, .vrtl .gfont { font-family: sans-serif; } .font-090per { font-size: 90%; } .font-110per { font-size: 110%; } .bold { font-weight: bold; } .italic { font-style: italic; } .indent-2em { text-indent: 10%; } .hltr .h-indent-2em { text-indent: -2em; padding-left: 2em; } .hltr .start-3em { margin-left: 3em; } .hltr .start-5em { margin-left: 5em; } .hltr .end-3em { margin-right: 3em; } .hltr .align-right, .vrtl .hltr .align-right { text-align: right; padding-left: 3em; } a:visited { color: #00008b; } .cover-page .main { margin: 0; padding: 0; text-align: center; } .image-page .main { margin: 0; padding: 0; text-align: center; } |
09-15-2020, 10:00 PM | #4 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
And here's an example of what comes out:
|
09-15-2020, 10:02 PM | #5 |
Well trained by Cats
Posts: 29,855
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
It looks like a space after the apostrophe
The body style is JUSTIFY the space allow the justify to pad in that plac. Normally it is just whatever's no space Also the style for the paragraph indent (2em) reads 10% |
09-15-2020, 10:04 PM | #6 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
It's not normal for justified text to behave that way. It's definitely not normal for it to split "they're" into "they" and "re" on two separate lines, so I don't think it can be a justification issue.
The text is also not supposed to be italic and Calibre and Sigil don't render it that way. |
09-15-2020, 10:10 PM | #7 |
Well trained by Cats
Posts: 29,855
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The only unusual (tome) is that Background: transparent
ADE was notorious for ditching a CSS with errors |
09-15-2020, 10:21 PM | #8 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
Ah! Good point. That would explain why it keeps intermittently reading everything in italic, but only sometimes. Let me run ePubCheck on it and make sure it's completely error-free...
But no. Correcting everything that ePubCheck doesn't like still doesn't solve the problem. /stares Ah! I found it! The xhtml attribute still has lang:"ja" set. I knew it was going to be something like that. Switching it to lang:"en" fixes all the issues. |
09-16-2020, 11:04 AM | #9 |
A Hairy Wizard
Posts: 3,105
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
great...glad I could be of help...lol
|
09-16-2020, 02:42 PM | #10 | |
Resident Curmudgeon
Posts: 74,278
Karma: 129333566
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
One final thing to do is from the Tools menu select "Congress images losslessly". This will remove the crud inside the images without changing the image quality. By removing the crud, you make them smaller. And finally, test your ePub in ADE and see what happens. |
|
09-16-2020, 04:14 PM | #11 | |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
Quote:
The problem is fixed by changing the language settings in the xhtml tag; I just wanted to mention that because this particular ePub had 5,000 unused style rules when I first processed it. I guess Kodansha's default stylesheets are just ungodly huge and probably intended for Japanese-language texts. |
|
09-16-2020, 05:25 PM | #12 | |
Resident Curmudgeon
Posts: 74,278
Karma: 129333566
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-21-2020, 09:14 PM | #13 |
Bookmaker
Posts: 416
Karma: 2143650
Join Date: Sep 2010
Device: Cybook Opus
|
Also it turns out that instead of an emdash it was using a totally different character called a "box drawings light horizontal" that won't display in a normal font, so there's also that.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unwanted extra spaces in Comment section | C-novice | Library Management | 8 | 06-05-2021 10:32 PM |
Extra spaces between words | Drybonz | Conversion | 4 | 12-14-2015 08:15 PM |
Extra spaces in Sigil | noteon | Sigil | 2 | 04-08-2011 02:42 PM |
Weird formatting issues - Sigil .epub in Calibre viewer | december | Sigil | 9 | 06-18-2010 04:04 PM |
I'm having a problem with extra paragraph spaces | akosimike | Calibre | 10 | 05-27-2010 06:53 PM |