View Single Post
Old 09-24-2021, 09:39 AM   #12
katknott
Junior Member
katknott began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2021
Device: callibre
Quote:
Originally Posted by Tex2002ans View Post
Okay, in Calibre's Editor:

1. Press Ctrl+F to get the Find/Replace.

2. Make sure Mode: "Regex" is set in the dropdown.

3. Type these into the boxes, then press Replace All:

Find: value="\d+"
Replace: <----- (PUT NOTHING IN HERE. BLANK.)

Find: data-lnum="\d+"
Replace: <----- (PUT NOTHING IN HERE. BLANK.)

That should remove those errors.

4. Make sure to put Mode back to "Normal".

- - - - - -

Side Note: In your EPUB's code, I also see a lot of:

Code:
<p class="block_58" data-lnum="78"> </p>

[...]

<p class="block_59" data-lnum="86"> </p>
I call this the "ENTER ENTER ENTER" problem, and it will not be very nice in ebooks.

(When readers change the font sizes + paragraph spacing, these "blank paragraphs" are going to explode.)

Why does this occur?

When you are typing in Word (or Google Docs, or LibreOffice, etc.), you're pressing "ENTER ENTER ENTER" between every paragraph.

How to avoid?

Instead, you should be designing your documents using Styles.

Instead of constantly typing:
  • Paragraph 1 is a long example.
  • ENTER ENTER ENTER
  • Paragraph 2 is another long example.
  • ENTER ENTER ENTER
  • [...]
  • Paragraph 1000.
  • ENTER ENTER ENTER
  • The End.

With Styles, you are able to type your entire document out, and then say:
  • "Hey, make the gap between paragraphs a little larger."

The entire document will update in a single shot. NO MORE ENTER ENTER ENTERS!!!

These are 2 videos I found very helpful on the why/how of Styles:

Word 2013: Use Quick Styles
How to REALLY use Microsoft Office: Word Styles 101

and I wrote quite a bit about it in this thread last year:

"eBook Formatting in Sigil" (Specifically my Posts #46 + #50 + #52)



Probably generated by Google Docs or something like that.

Looks like every individual item is tagged with that chronologically. (Could be a hidden paragraph count?)

Anyway, it's invalid in EPUB, so it's got to go anyway.
Thank you so very much. It has been years since I used html and did online newspaper, teaching, etc. Can you suggest course or something I can take for refresher?
katknott is offline   Reply With Quote