View Single Post
Old 09-23-2021, 04:30 PM   #7
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 katknott View Post
here is part of the html that is erroneous
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)

Quote:
Originally Posted by DNSB View Post
What is the purpose of identifying each line in your code using the "data-lnum="xxx""?

Are you creating a web page or an ebook?
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.

Last edited by Tex2002ans; 09-23-2021 at 04:32 PM.
Tex2002ans is offline   Reply With Quote