Quote:
Originally Posted by DiapDealer
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.
[...]
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
|
I will definitely check out your plugin and do some testing. All I really need is the Smart Quote functionality, I despise it messing with my ellipses, and that sounds perfect.
Quote:
Originally Posted by DiapDealer
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.
|
Therein lies a large problem, you need an algorithm that is not just situational, but takes into account paragraphs at a time, the odd/even, or mismatching quotation marks (is there only a closing quote, with no opening quote in this paragraph? Are there two opening quotes in this paragraph?). And in hard cases, asking for manual intervention (really, the only way to fix some of these).
That is the thing that I love about Toxaris's EPUB Tools, the "Check Dialogue" functionality is just above and beyond anything else I have used so far. So what I do now is Smarten Punctuation, toss into "Check Dialogue", and fix up as much as I can.
Quote:
Originally Posted by DiapDealer
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.
|
Here was a bug where Kovid fixed "measurements" and "years" (like ’60s):
https://bugs.launchpad.net/calibre/+bug/1285351
I could have SWORN there was a topic a few months back too, fixing up ’em, ’tis, ’twas, ... because I got this helpful Regex from someone which was a more condensed version of the one I used before (I did a search and couldn't find the topic!!):
Search: ‘(Em|em|Tis|tis|Twas|twas)
Replace: ’\1
That is when I decided to finally hop over to Calibre's instead of Modify EPUB's, because of the few minor adjustments!