Thread: Tables in ePub
View Single Post
Old 12-10-2021, 06:00 PM   #49
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Quoth View Post
LO sort of has format based searches. [...]
Yes, I wrote detailed LibreOffice instructions in that linked thread. Going from:

Word has that functionality sitting in the Advanced Find & Replace as well...

... but Word's "Select all similar formatting" is amazing! Then you don't even have to go digging through all those menus + submenus + select the perfectly correct fonts, etc.

Click the mess you want to change, Find All Similar, press your Style, boom.

Quote:
Originally Posted by Quoth View Post
I've tried various plug-ins/Export tools for epub on Word & Writer and all all inferior to SaveAs docx and import to Calibre.
Toxaris's EPUBTools is the best.

It also has a fantastic EPUB import functionality.

The best thing is it carries over your HTML classes and maps them to Styles.

- - -

Import Note: One of the only few downsides is EPUB import only carries over the first class:

Code:
<p class="poem margintop">
would only get mapped to a single "poem" Style (and the "margintop" would be lost).

Export Note: EPUBTools export also has one major disadvantage. All formatting within footnotes is lost.

(Toxaris was aware of this bug + it was fixed in v2.0 of EPUBTools... but progress on that release is currently stalled.)

DOCX:

Code:
<sup>1</sup> First Last, Book Title (2020), Publisher.
would turn into plain:

Code:
[1] First Last, Book Title (2020), Publisher.
(Losing the bold/italics.)

So if I have a document with actual DOCX footnotes in it (with heavy use of italics), I sadly have to fallback to a Calibre conversion.

Quote:
Originally Posted by Hitch View Post
There was, for some years, a deliberate incompatibility, due to a dispute between MSFT and Adobe. That's been resolved for...oh, 5-6 years now or a bit longer? Even their lowest-end PDF export works fine.
Yeah, PDF export was one of the largest advantages of LibreOffice for a long time.

Nowadays, newer versions of Word can do PDF export too. (Wasn't that added in Word 2013? It's definitely in 2016.)

Way back when, you had to mess with all these "PDF Printers" and other such nonsense (scam websites, scumbag conversion sites where you "send us your DOCX and we'll give you a PDF", etc.).

Such an enormous security risk + so many bugs in all those third party drivers... and Microsoft let that languish for decades.

Quote:
Originally Posted by Hitch View Post
Actually, if you have to deal with other people's cruft a lot, MS Word+Toxaris's ePUB Tools beats Calibre hands-down. It just does. I cannot tell you what a godsend those tools are, particularly for taking some Ad Hoc nightmare, tagging all the text formatting (local) like bold, italics, etc. and being able to, in one fell swoop, nuke all the other ad hoc formatting. It's ...fantastic.
Yep. It's my preferred way to convert DOCX->EPUB too.

EPUBTools

I love it because it strips everything down to barebones HTML (your basic <i>, <b>, <h1>, [...]), while still carrying over a clean slate for ebooks.

It also, optionally, lets you carry over your exact Styles:
  • If your "Poetry" Style is in Word?
    • You'll get <p class="Poetry"> in your EPUB.
  • "smallcaps" Style is used?
    • It'll appear as <span class="smallcaps">.
    • (Or it can auto-detect OpenType smallcaps, then convert that to a smallcaps class for you too!)

(Optional) You can even select which Styles you want to carry over in a dialog window.

Calibre

Follows the GIGO model. It will convert the document as is, but a lot of the garbage will come along too... All the hidden junk like:
  • transparent background
  • widows/orphans
  • fractional + barely perceptible margin/font/font-size differences
  • Colors (black text)
  • [...]

AND, my biggest frustration, Calibre renames all unique combinations of Styles/formatting into "calibre123" class names.

- - -

Side Note: You can read all about the problem of hidden junk + "close-but-not-quite-the-same" classes in my posts:

The cleanup methods are pretty labor intensive + technical.

There will be tools in the near-future which will help this dirty-file cleanup though:

But Toxaris's EPUBTools, poof. All that hidden DOCX nonsense is gone at the push of a button!

Quote:
Originally Posted by Hitch View Post
Like I said--and I believe I've told the story here more than once--for probably a decade, I was a staunch anti-Word person.
I'm still pretty anti-Word.

LibreOffice lets you have actual multi-OS support.

Word on non-Windows platforms are second-class citizens.
  • Word (Mac) ≠ Word (Windows)
    • No plugins.
    • (And key functionality like the "Select Similar Formatting" is missing too! [As of a few years ago. No idea if 365 added this.])
  • Word (Online) ≠ Word (Windows)
  • Word (Android/iOS) ≠ Word (Windows)
  • Word (Linux)... there's no such thing.

And transferring between those, you'll have all sorts of fun.

LibreOffice is the same everywhere—Windows/Mac/Linux.

Note: For "Google Docs"-like functionality, there's Collabora Online.

For Android/iOS, there's Collabora Office.

Both of these are pretty much LibreOffice in the backend + a skin on top.

No more mangling up your documents between OSes!

Quote:
Originally Posted by Hitch View Post
(I have a horror story, truly, about a customer, Word, indices and foototes, and *&^%$#@* Google Docs.

[...]

He finally said "on an iPad" and when I pursued it further, turned out he was BY DEFAULT opening the goddamned files in GDocs and editing them, or even not, but just SAVING them and what happens? Yes, yes, yes, you guessed right--all the tagging, etc. totally disappeared. We redid that book 3x. What a nightmare.)
Google Drive Rant

Reminds me of my related story too.

I sent perfectly-Styled DOCX via Google Drive.

In my mind, I always just zoom my eyes to the upper-right corner, download the DOCX file directly.

Turns out, Google Drive, in their drive to "help"... see it's a DOCX file, then generate a fancy looking preview page... clicking anywhere in there converts+opens the file within Google Docs.

Author pops that open, does his fixes... I get it back... all my Styles, mangled. (Luckily, I don't rely heavily on Styles for that step, and only needed the textual changes, so I was able to somewhat recover.)

But yes... if you were relying on that more advanced Word innards, Google Docs open/save would mangle it + disappear it all into the ether.

(Even basic, gods damn Styles! Google Docs F's it all up!)

Note: And then you taught me the trick of being able to generate a URL directly to the Google Drive download. No more stupid Google Docs preview!

Online Grammarcheck Rant

Another serious problem online is these grammarchecker programs. (I shall not name the one I hate...)

IF you're in your Google Docs (or whatever browser-based app), you run your grammar plugin, then decide to make a correction, it will insert gobbledygook direct formatting.

Many people also copy/paste their entire document into these online checkers... then copy/paste back into their main document.

Disastrous consequences. (I was just reading a comment on Reddit a few weeks back where this guy was saying after doing that, Styles/classes around every word were introduced.)

Side Note: I'm no fan of those things either... and would never install them within the browser. They're some of the worst offenders at bloating memory usage + slowing down the entire browser dramatically.

Every year, DebugBear releases their browser extension analysis:

Stuff like Evernote, coupon/shopping extensions, grammarcheckers... the worst.

Last edited by Tex2002ans; 12-10-2021 at 08:18 PM.
Tex2002ans is offline   Reply With Quote