Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-13-2012, 10:39 AM   #16
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Well, to be fair, there simply shouldn't be any spaces. Same way there shouldn't be spaces before ? ! . ,

Cause it looks like crap when the line happens to break there and the punctuation just goes into the next line
, because there was a space in front of it.

The smartypants code only looks at chars before/after the ", so it relies on the formatting alone. It does not have a logic that makes the first " in a paragraph opening, the next one closing, etc.
frostschutz is offline   Reply With Quote
Old 03-13-2012, 11:26 AM   #17
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by frostschutz View Post
Well, to be fair, there simply shouldn't be any spaces. Same way there shouldn't be spaces before ? ! . ,

Cause it looks like crap when the line happens to break there and the punctuation just goes into the next line
, because there was a space in front of it.

The smartypants code only looks at chars before/after the ", so it relies on the formatting alone. It does not have a logic that makes the first " in a paragraph opening, the next one closing, etc.
When you have single quotes nested inside double quotes (or vice versa), though, it is conventional to separate them with a space. Without the space, it's very difficult to visually separate them.
HarryT is offline   Reply With Quote
Advert
Old 03-13-2012, 12:06 PM   #18
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Quote:
Originally Posted by HarryT View Post
When you have single quotes nested inside double quotes (or vice versa), though, it is conventional to separate them with a space.
I've looked at some of my paper books. For example in Harry Potter 5 there is no space whatsoever, it looks like this:

Quote:
'I got a "P",' said Ron

'"Troll",' said George promptly
The only reason there is a space between " and ' is due to the comma that's pulled inside the quote. Otherwise there is no space whatsoever so the opening really looks like '''.


In Gregor and the Curse of the Warmbloods it looks like this:

Quote:
"'Turn and turn and turn again,'" she said.
Now in that book there is a slight space between " and ', ' and ". But it's only hinted at, a regular space (between two words) is about three times as wide. So I believe this mini space to be courtesy of the font used by that book. Either that or there is a typographic extra slim space character.

I haven't found a book where it's actually a space. If it's actually necessary, a nonbreakable space should be used instead, as it otherwise can turn out ugly depending on screen / font size.
frostschutz is offline   Reply With Quote
Old 03-13-2012, 12:18 PM   #19
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
It's clearly a space in my printed "Sherlock Holmes" books, and I think personally it looks a lot better like that - it's much easier to read. I guess it's an editorial choice at the end of the day.
HarryT is offline   Reply With Quote
Old 03-13-2012, 02:39 PM   #20
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
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've got a complete collection of Sherlock Holmes, reprints of the Strand magazines.
As well as what HarryT says there's a space following any open quote, also has spaces between words an question/exclamation marks and also another space if there's a following quote.
From A Study In Scarlet

Quote:
" There is no clue ? " said Gregson.
" None at all," chimed in Lestrade.
Just also checked one of the Agatha Christie's I've got, and that is the same as well.
From The Murder at the Vicarage.

Quote:
" So you're back at last," she observed.
" Is Colonel Protheroe here ? " I asked.
Quote-marks are actually curly type.
Perkin is offline   Reply With Quote
Advert
Old 03-13-2012, 03:42 PM   #21
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
That's horrible.

I couldn't read an ebook like that. I'd have to fix this with search&replace first.
frostschutz is offline   Reply With Quote
Old 03-13-2012, 03:50 PM   #22
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by frostschutz View Post
Well, to be fair, there simply shouldn't be any spaces. Same way there shouldn't be spaces before ? ! . ,
Agreed, they shouldn't be there but it does happen.

Quote:
The smartypants code only looks at chars before/after the ",
... but in looking at the characters after the quote it fails to recognize that it's at the end of a paragraph and should handle the quote differently. It acts as if there were printable characters after the quote. Quote + End of paragraph should result in Right Quote regardless of what occurs before the quote
dwig is offline   Reply With Quote
Old 03-13-2012, 06:43 PM   #23
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Yes, sure. One could also argue that it should never close a quote when there it has no opening quote to partner it. But that's simply not how the code works at the moment. It's called smart punctuation but it's really just a simple heuristic which may or may not work.

It actually works quite well all things considered, but with strange formatting such as these space characters it fails.

Also I'm not sure if the original code has a concept of paragraphs at all, looks more like it's originally designed for plain text, such as what people write in a textarea form field.
frostschutz is offline   Reply With Quote
Old 03-13-2012, 07:10 PM   #24
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,428
Karma: 145491800
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 dwig View Post
While you're at it, take a look at the inverse of HarryT's issue.

I've seen a reliable error occur when a quoted sentence ends with a space before the closing quote.

This (in the source document's HTML):

<p>He said, "Go away — "</p>

becomes (in the MOBI or ePub conversion):

He said, “Go away — “

instead of:

He said, “Go away — ”

If the trailing space is omitted the smart quotes function works correctly.
Where the em dash is are grammatically incorrect spaces. The spaces should not be there. So I'm not blaming the conversion but the source.
JSWolf is offline   Reply With Quote
Old 03-13-2012, 08:41 PM   #25
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by JSWolf View Post
Where the em dash is are grammatically incorrect spaces. The spaces should not be there.
It is not at all "grammatically" incorrect. It is, instead, typographically incorrect to use a full width space before and after the em dash. I listed them only because then can exist and do trip up smartypants' logic.

Em dashes should be wrapped with a thin space if the glyph isn't designed to provide the space. Leaving out the space is a modern electronic font habit since may fonts and layout programs kern (letterspace) the character properly with a space. Traditionally (read: hand set metal type) a thin space should be added before and after an em dash. Since most fonts in ereaders seem to not provide any kerning/letterspacing and since most ereaders won't break a line at an em dash when there is no space, ebooks should have a space before and after an em dash when it occurs in its proper position between two words.

The examples I listed occur when my S&R sweeps miss this inappropriate use of trailing em dashes. Using such em dashes seems to have been common with some writers and publishers. In truth, they should be ellipses. I some times change them and sometimes retain the original typography. When my S&R sweeps work correctly, the trailing em dashes are spaced with a non-breaking space to avoid the evil "only the punctuation wraps" error, omitting the trailing space before the end punctuation.
dwig is offline   Reply With Quote
Old 03-17-2012, 01:53 PM   #26
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Fixes for following should be in next release.

Quote:
John said, “The man said ‘aaaaa’
” ‘bbbb’
” ‘cccc’
” ‘dddd’
” and then ended the story.”
Quote:
He said, "Go away — "</p>

becomes (in the MOBI or ePub conversion):

He said, “Go away — “

instead of:

He said, “Go away — ”
Also fix for incorrect quotes when as following

Quote:
A double quote—"within dashes"—would be nice.
A single quote—'within dashes'—would be nice.
@HarryT, (and others) can you test after next release and let me know if everything is now correct for you. (Works for me)
Perkin is offline   Reply With Quote
Old 03-23-2012, 07:18 PM   #27
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
@HarryT, and others, can you test and let me know if everything is now correct for you.
Perkin is offline   Reply With Quote
Old 03-24-2012, 03:18 AM   #28
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Sorry, I've been away for the last week. Do I just download the latest version of Calibre and test with that?
HarryT is offline   Reply With Quote
Old 03-24-2012, 03:42 AM   #29
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Yes, the changes went into the latest version. Can you test on file/s which was/were showing incorrect smartened quotes.

Thanks.
Perkin is offline   Reply With Quote
Old 05-22-2012, 02:05 PM   #30
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by Perkin View Post
Yes, the changes went into the latest version. Can you test on file/s which was/were showing incorrect smartened quotes.

Thanks.
In 0.8.51 it still fails with a closing italics (</ i> or </ em>) tag just before the close quote. See attached examples (original tick-mark quotes in ePub and conversion to MOBI with smart quotes)
Attached Files
File Type: epub Smart Quote Failure - dwig.epub (1.8 KB, 139 views)
File Type: mobi Smart Quote Failure - dwig.mobi (24.0 KB, 127 views)
dwig is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Smarten punctuation slows conversion kakkalla Calibre 22 01-20-2011 07:22 AM
Configuration of "Smarten Punctuation" Korben Dallas Calibre 2 12-31-2010 07:12 AM
Simpler Way to Smarten Punctuation Rand Brittain Calibre 3 10-10-2010 08:16 PM
Thanks for new 'Smarten Punctuation' feature jackie_w Calibre 1 09-21-2010 02:53 PM
"The Situation" by Jeff VanderMeer - free download Kingston Deals and Resources (No Self-Promotion or Affiliate Links) 10 03-17-2008 11:39 PM


All times are GMT -4. The time now is 10:00 PM.


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