View Single Post
Old 07-22-2025, 09:46 AM   #8
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,363
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Quoth View Post
If it's an ebook it's easiest to fix in Calibre.

I'm no expert on regex, so I decline to look like an idiot and post the idiotic regexes I use in LO Writer.

I replace all tabs with a space.
I replace multiple spaces with a space.
I replace a space at the start of of a paragraph with nothing.
I replace a space at the end of of a paragraph with nothing.
I replace empty paragraphs with nothing.
I have regexes to find illegal (in English, French is different) space with punctuation.

I have a spreadsheet with list of docs on first column and headings on other columns are regexes to copy/paste. Then I put a checkmark in the column. Other sheets have revision level, status, etc.

Only paragraphs that are headings or certain lists (e.g. contents) should end with no punctuation. Those can be found with a regex.

However if it's a downloaded ebook rather than a source docx/odt, then regex and daip's toolbag (global change HTML tags etc) in Calibre is best.



Nothing beats a workflow that you already have setup!


However, if you haven't set it up in Calibre yet, you can use Sigil's "Mend and Prettify" function to do the first 4 (not positive about the tab??) of those steps with a click of the mouse. Then you can add as many more regexes as you wish to a Saved Searches group to do them all with another click.


The only extra step is having to save your document as an html file before importing to Sigil...but you have to do that anyway to make an ePub.
Turtle91 is offline   Reply With Quote