View Single Post
Old 09-13-2026, 11:54 AM   #22
Lukusaukko
Connoisseur
Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.Lukusaukko ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 392326
Join Date: Feb 2023
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
After testing the smarten punctuation, it could use some work.

The ellipses support and em dash support could use need fixing. You should have options to remove spaces around em dashes and ellipses. Also, an option to go from en dash to em dash.

Punctuation support could use an option to go from UK style quotes to US style quotes and US style to UK style.

After these fixes are done, it's ready to go.
There is an option to remove spaces around em dashes in Cleanup (it's intentional - smartening does the inital sweep and is close to what Calibre's internal smartening or Diaps original smartening does; it basically passes the text to Smartypants with some tweaks), but further fixing is delegated to Cleanup. But you are right, the wording is not obvious: if you select em dash, closed style then Remove markers and use ordinary spaces, it removes whitespace from em dashes. It doesn't support removing spaces from around en dashes, because that could introduce ambiguity in the text; is "word<en dash>word" a parenthetical dash or a range (e.g. "London–Glasgow route"). Maybe I could support that and then leave it to the user. Em dash <-> en dash could be a new option, with the same caveat; you might end up accidentally converting something like "10–12" to "10 — 12" or to "London–Glasgow route" to "London — Glasgow route".

Supporting quote conversion could be trickier, because the UK single primary quote style is easily confused with apostrophes when you are running an automatic conversion - there are a lot of edge cases where you need to figure out whether something is a closing quote or an apostrophe. Not impossible, I think, but something that merits a deeper look than it appears on the surface.

Last edited by Lukusaukko; 09-13-2026 at 11:58 AM.
Lukusaukko is offline   Reply With Quote