View Single Post
Old 09-02-2014, 11:12 AM   #20
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,705
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Tex2002ans View Post
Hmmm... what are the Smarten Punctuation tools you use that allow such granularity? I would LOVE to upgrade!
I use the same smartening algorithm that calibre does (Smarty Pants). It (the python script) has many configurable options that calibre just doesn't choose to present to the user. I either use my own wrapper script to call SmartyPants, or I also have a plugin for calibre's editor that I use that offers more granular control of the algorithm. As far as starting with a mixture of smart and "dumb" quotations, I've never had too many problems myself. The algorithm isn't really predicated on matching pairs of quotes to do what it does. It's based more on a situational/positional logic.

Now if you want to throw back-tick quote conversion into the mix--that really screws the pooch. I turn that support off completely.

My calibre editor plugin isn't "official" by any means, but it's posted in the Editor subforum in the following thread if you want to experiment.
https://www.mobileread.com/forums/sho...d.php?t=243817

Quote:
Originally Posted by Tex2002ans View Post
I used to use Modify ePub's Smarten Punctuation, I have shifted over to Calibre's Smarten Punctuation, because it handles a few of those edge cases better.
For all intents and purposes, those two are the same thing. Modify ePub calls the same internal calibre routines that calibre's own Smartening code calls (which is in fact, the SmartyPants script)--it (Modify ePub) just enabled you to do so without doing a full-blown conversion--before calibre's editor came along. I suppose the methods for calling SmartyPants could have deviated slightly (between Modify ePub and calibre's conversion parameters--and now the Smartening feature of calibre's editor) in recent versions, but last time I checked, they were identical.

Last edited by DiapDealer; 09-02-2014 at 12:46 PM.
DiapDealer is offline   Reply With Quote