02-01-2011, 02:50 PM | #1 |
Enthusiast
Posts: 34
Karma: 2584
Join Date: Jan 2011
Device: Kindle
|
"backward" smart quotes problem
I just encountered, for the first time, an issue with quotation marks appearing inverted -- that is close quotes -- at the BEGINNING of a number of sentences in an ePub when I ran it through Calibre's "smarten punctuation" option. Whether converting to Mobi or just trying to smarten the punctuation marks in the original ePub in question, both formats keep giving the same "backward quote" results.
The book (public domain, reformatted and tweaked by a member here) to which I'm referring was obtained in the ePub books Humor section of the MobileRead Forum, and can be found at this link: https://www.mobileread.com/forums/sho...+lucia+omnibus I examined the ePub using Sigl's code view, but saw nothing obviously wrong. Any help with this perplexing issue would be greatly appreciated. |
02-01-2011, 02:54 PM | #2 |
creator of calibre
Posts: 44,019
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That can happen if the book has unbalanced quotes. i.e. an odd number of "
|
Advert | |
|
02-01-2011, 03:05 PM | #3 |
Enthusiast
Posts: 34
Karma: 2584
Join Date: Jan 2011
Device: Kindle
|
|
02-01-2011, 03:05 PM | #4 |
creator of calibre
Posts: 44,019
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
"some text, "some quoted text"
|
02-01-2011, 03:16 PM | #5 |
Enthusiast
Posts: 34
Karma: 2584
Join Date: Jan 2011
Device: Kindle
|
I must be wearing my stupid cap today, or just missed the point entirely. The quotes throughout the ebook seem consistently balanced -- i.e. nothing like you just pointed out. I'm attaching a screen capture of a typical page with the quotes issue and would be ecstatic if you could tell me if they seem unbalanced -- as I understand your example.
Better yet, here's a link to the ePub in question from MobileRead forum...if you have a few seconds, run it through Calibre's "smarten quotation" to see the dismal results: https://www.mobileread.com/forums/att...4&d=1266764614 And if you have a suggestion to any editing or reformatting I might engage in with something like Sigil, please let me know. Sorry to be such a nuisance Last edited by Rajmahid; 02-01-2011 at 03:19 PM. |
Advert | |
|
02-01-2011, 03:22 PM | #6 |
creator of calibre
Posts: 44,019
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You have to look through the entire document for unbalanced quotes, a particular section doesn't matter, once there is an unbalanced quote, all the remaining quotes become messed up.
|
02-01-2011, 03:26 PM | #7 |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
I opened the epub in sigil and done a search-count for quotes just in the first chapter - was 79, so a quote is missing from a paragraph somewhere (or from several).
(just because there may be an even number, doesn't guarantee they're matching pairs) Use Sigil, and do a search for a quote mark, then just keep looking for the next one, and try to spot any sentences where one is missing, either from the beginning or end of speech/quote etc., then when you find one missing, add it, continue till you're happy. Edit: So continue through rest of book. Last edited by Perkin; 02-01-2011 at 03:28 PM. Reason: missed kovid's post while typing |
02-01-2011, 03:37 PM | #8 | |
Enthusiast
Posts: 34
Karma: 2584
Join Date: Jan 2011
Device: Kindle
|
Quote:
Thank you and Perkin for your assistance! |
|
02-03-2011, 08:41 AM | #9 | |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
Quote:
At least this has been my experience. - Byron |
|
02-03-2011, 10:00 AM | #10 |
creator of calibre
Posts: 44,019
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Open a ticket and attach a test case demonstrating this behavior.
|
02-03-2011, 10:11 AM | #11 |
Fanatic
Posts: 541
Karma: 1152752
Join Date: Aug 2010
Location: Evansville, IN, USA
Device: Samsung Galaxy Tab 4 Nook & Samsung Galaxy Tab S 10.5
|
|
02-05-2011, 03:05 PM | #12 |
Hungry Polar Bear
Posts: 34
Karma: 355562
Join Date: Feb 2011
Location: San Jose, CA
Device: Kindle Keyboard Wi-Fi + 3G
|
Here's an alternate solution
Rather than using calibre's smart quotes option, I decided to go old school and use sed. I wrote a sed script that does a good job of creating html smart quotes.
I'm attaching the file, to use it type Code:
sed -f qscript.txt input file > output file Note, as is, this script only works with GNU Sed. To get it to work with other versions of sed, simply remove all the comments aside from the first one. What you'll end-up with is a file that uses escaped quotations using the numeric character reference. It'll also handle apostrophes and m-dashes. The script has been tested and used only on text files I got from Project Gutenberg and converted to html. This script has a tendency to be under-inclusive. I suggest that you open up the new file and do a search for double and single quotes. If there aren't a lot, you can manually change them. If there are a lot, I dunno. Last edited by Rylon; 02-05-2011 at 03:46 PM. Reason: Whoops, forgot a step in adding the attachment. |
02-05-2011, 03:16 PM | #13 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Where is the attachment?
|
02-05-2011, 03:48 PM | #14 |
Hungry Polar Bear
Posts: 34
Karma: 355562
Join Date: Feb 2011
Location: San Jose, CA
Device: Kindle Keyboard Wi-Fi + 3G
|
|
02-06-2011, 04:06 PM | #15 |
Enthusiast
Posts: 34
Karma: 2584
Join Date: Jan 2011
Device: Kindle
|
Wish I had a script for Windows...it's a painstaking operation doing a search & replace for the quotes in the Lucia Omnibus You'd think only a few chapters would suffer from this weird phenomenon that Calibre can't deal with, but it's ALL of them. 12 chapters are complete -- only 81 (!!!) to go.
The only relief is that I only have to manually fix the front-end quotes, Calibre correctly transforms the end-sentence smart quotes. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"A Problem Occurred" on the "Shop" page. | swallman | Nook Color & Nook Tablet | 1 | 12-25-2010 12:34 PM |
Sudden Problem with "The" and "A" Titles | Otter | Calibre | 13 | 09-05-2010 08:32 PM |
Engadget:Toshiba Shows off "Smart Pad" promises launch before October | kjk | News | 3 | 07-20-2010 07:18 PM |
Classic Australian Daily Telegraph "Smart Edition" and the nook? | firefox | Barnes & Noble NOOK | 0 | 07-19-2010 02:50 AM |
An explanation for the "Oops, We're Working On Your problem," page at the Sony Store | Dr. Drib | Sony Reader | 2 | 07-25-2009 07:40 AM |