Quote:
Originally Posted by gbm
I covert every ebook to epub then edit the epub when I have it the way I like then convert the epub to AZW3.
Here is how I fix Em dashes :
First in the calibre editor create a function name it Em dashes
Code:
def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):
return match.group().replace(' – ', '—').replace(' –', '—').replace('– ', '—').replace('--', '—').replace(' - ', '—').replace(' —', '—').replace(' — ', '—').replace('— ', '—')
This is the search that I use:
Code:
<body.*?>.*?</body>
https://manual.calibre-ebook.com/function_mode.html
be sure to save it.
https://manual.calibre-ebook.com/edi...saved-searches
This change a - a to a—a and will remove all spaces before and after em dashes.
bernie
|
I didn't know we could make functions, so thank you! But this didn't accomplish anything, unfortunately, because the spaces are not in the file. (I think I wasn't clear enough about this in the original post, sorry for the confusion! I really appreciate learning about the functions, though!)