Mobileread
hello and can someone please help?
#11  katknott 09-24-2021, 09:28 AM
Quote DNSB
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?
I was not first editor. The first editor used Google docs I believe and I didn't add the extra codes. This job has been nightmare.
Reply 

#12  katknott 09-24-2021, 09:39 AM
Quote Tex2002ans
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:

With Styles, you are able to type your entire document out, and then say:

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?
Reply 

#13  Tex2002ans 09-24-2021, 03:54 PM
Quote katknott
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?
Hmmm...

A refresher of word processor (Word/LibreOffice) stuff? Or basics of EPUB + HTML/CSS?

If EPUB, I don't really know of any good (and up-to-date) tutorial-type things.

But a lot of ebook stuff is just knowing the basics of HTML and CSS.

Side Note: Back in 2018, I had a project to digitize 100 ebooks within a year.

I did train a few editors (who knew absolutely nothing about HTML) in HTML/CSS + basics of ebooks.

I called it "Clean Ebooks, Workflows, and HTML".

If you want to see those slides, let me know.

(But it may be more basic than your knowledge level.)

* * *

My mentality is KISS (Keep It Simple Stupid).

Strip everything down to the very bare bones, so your ebook is full of simple HTML:

From there, all you typically need is a handful of exceptions:

And the key thing is, human-readable names!

So this is your original code:

Code
<div class="block_53" data-lnum="219"><span class="bullet_" data-lnum="219">5)&nbsp;</span><span class="calibre9" data-lnum="219">Until January 1, 2018, [...]
<div class="block_53" data-lnum="220"><span class="bullet_" data-lnum="220">6)&nbsp;</span><span class="calibre9" data-lnum="220">No entity shall record
Throw away that data-lnum crap:

Spoiler Warning below






Code
<div class="block_53"><span class="bullet_">5)&nbsp;</span><span class="calibre9">Until January 1, 2018, [...]
<div class="block_53"><span class="bullet_">6)&nbsp;</span><span class="calibre9">No entity shall record


<div class="block_##"> + some random numbers? Nope. Use simple HTML + a <p>:

Spoiler Warning below






Code
<p><span class="bullet_">5)&nbsp;</span><span class="calibre9">Until January 1, 2018, [...]
<p><span class="bullet_">6)&nbsp;</span><span class="calibre9">No entity shall record


<span class="bullet_">, but it's actually a list number? REMOVE:

Spoiler Warning below






Code
<p>5) <span class="calibre9">Until January 1, 2018, [...]
<p>6) <span class="calibre9">No entity shall record


<span class="calibre"> that's probably only saying "this is normal text"? Toss it!

Code
<p>5) Until January 1, 2018, [...]
<p>6) No entity shall record
And, wow, now compare that to your original code.

Look how much cleaner and more readable that is.

And guess what, it'll work great on an actual ereader.

* * *

... Anyway, if you're interested in a "basics of ebook" tutorial:

I may be open for meeting on webcam some time next week.

I could then see:

And testing out some conversion stuff live.

Every single input/output format is going to require slightly different tools/methods.

Quote katknott
I was not first editor. The first editor used Google docs I believe and I didn't add the extra codes. This job has been nightmare.
Yeah, Google Docs creates a bit of a mess.

Yes, the text may "look okay" on the screen, but the innards are horrible.

Note: If you're more comfortable in the word processors (Word/LibreOffice):

You may want to do cleaning + Styles there instead.

THEN when you output to EPUB, you'll have much cleaner HTML to work with.

Side Note: And this looks to be a legal document with lots of nested lists... huge lists+large-negative-indents don't play very nicely in EPUB...

You'd probably have to adjust a lot of that text anyway so it can be read on tall/skinny things like cellphones or IN HUGE FONT SIZES.

Quote Quoth
In LO Writer:
Control-Shift-Space puts a grey mark. Even if display formatting is off.
Thanks.

Quote Quoth
I've used Google Docs in the past because an organisation I was in used it. I accept some individuals find Google Docs fine, [...]
It's a growing marketshare, while old-school Microsoft Word is going down.

Side Note: Yesterday, I watched a presentation at LibreOffice's 2021 conference.

Within the past decade:

The old-school desktop suites, down, down, down. Cloud-based + Mobile stuff, up, up, up.

Back in 2017:

Those trajectories have only grown since then. (And with the last year and a half, free/open programs have only gotten much stronger.)

Side Note #2: ... Even many of the kids going into COLLEGE have now grown up on:

Multi-device editing is currently the present/future.

Old school Word + only-typing-on-my-desktop-computer is so 10/20/40 years ago.
Reply 

#14  Quoth 09-24-2021, 06:43 PM
Quote Tex2002ans
Old school Word + only-typing-on-my-desktop-computer is so 10/20/40 years ago.
But the Cloud is just typing on someone else's computer like the 1960s, but on a faster less reliable connection and less security. If you do it right your own computer is more reliable and has more up time. There is a story about it.
https://www.corvidspress.com/fiction/otherworld-series/no-silver-lining/
It's about how ALL the Clouds and Internet can go down at once. It won't be an apocalypse and the truth is that the Cloud is already less reliable than decent in house resources, can cost more, be less private and less secure. The security and privacy is opaque.

There ARE good uses for the Cloud and Cloud based editing. But not as much as is claimed.
Reply 

#15  Tex2002ans 09-24-2021, 10:15 PM
Quote Quoth
There ARE good uses for the Cloud and Cloud based editing. But not as much as is claimed.
Personally, I'm not much of a fan of cloud crap, (especially when they try to tie monthly fees to it)... but it has its uses.

For example, I mostly use it for my ebook changelogs.

I can easily keep the latest up-to-date links/URLs up top + all the latest typo corrections. Anyone with the link can see the latest version. I can login to my phone and do a quick little update.

Would I type my entire book on it? Probably not.

Would I use it to easily share + get comments on the text? Yes.

Would I use it for minor files (like changelogs)? Yep.

Would I use Google Docs as an intermediate format and F-up my Styles? No.

Anyway, they're becoming larger and larger pieces of the market, no doubt about that. While typical desktop-only is shrinking.

(Same with desktop usage in general. It's being DWARFED by mobile devices.)
Reply 

#16  Quoth 09-25-2021, 06:43 AM
Quote Tex2002ans
(Same with desktop usage in general. It's being DWARFED by mobile devices.)
Most casual home users that in the past bought a PC (or a laptop) now use a tablet. Webmail and browser and apps.
Desktop PC gaming is a niche now with Nintendo, MS Xbox and Sony PS dominating. Casual games on phones and tablets.

The iPhone users more likely buy an iPad. The Android phone users an Android Tablet (as all their apps will migrate for free as well as data).

Business mostly buy laptops. Tower PCs are very niche, outsold by the expensive inflexible All-in-one screens with a sort of laptop motherboard. A real laptop has a built-in UPS and even with a separate 24" 2K screen can cost less than an all-in-one. Then there are the "mini" Macs and PC, like a cost reduced laptop without screen, keyboard or battery; I think a Raspberry Pi makes more sense than those if you don't need Mac OS or x86-64 Windows (Oddly MS does have an ARM version of Windows for the Pi, but it makes no sense as the entire point of Windows is Corporate x86-64 programs).

Google's Chrome OS and Chrome book is a crippled Linux that can be used standalone but is meant for always on broadband and Google's Cloud. Now MS is bringing out their version of MS Surface/Windows as Cloud Windows HW for Azure. Both those are less good ideas than a real Laptop (Mac, Win1x or Linux – Mint with mate recommended).

Apple will gradually merge MacOS and iOS to have Mac in a Walled Garden now they have moved to ARM (Mac 68000, PowerPC, 32 bit Intel, Intel with 64 bit and then 64 bit only x86-64 Intel Mac OS before the ARM laptop).

MS doing ARM and x86-64 versions of Windows on Tablets was a failure because of legacy x86, legacy x86-64 and unlike Apple they can't force all the Application devs to use ARM and the users to buy new versions of all the Software. Though Rosetta for Power PC to Intel wasn't too bad.
Reply 

#17  Tex2002ans 09-25-2021, 08:02 AM
Getting way off topic. Maybe we can discuss that further in a discussion thread.
Reply 

#18  Turtle91 09-25-2021, 08:21 AM
Quote katknott
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?
MR's Wiki has a bunch of mini-tuts about eBooks and ePublishing.

I like W3Schools reference pages for HTML/CSS. They help with understanding the basic coding. If you want to do something a little 'different' then I just use mr google and there are several websites that usually have the answer.

Of course, you always have the great people here at MR that can help... you'll get some great advice as well as a little opinion thrown in to spice things up!
Reply 

#19  Quoth 09-25-2021, 09:05 AM
Quote Turtle91
I like W3Schools reference pages for HTML/CSS. They help with understanding the basic coding.
...
Of course, you always have the great people here at MR that can help... you'll get some great advice as well as a little opinion thrown in to spice things up!
Absolutely to both of those. I find W3Schools, Tex and Hitch invaluable.
Also the Calibre editor uses a different color/colour for unrecognised terms. Sometimes someone has typed it wrong (sometimes me) and sometimes people are trying to be too clever.

On ebooks I believe in KISS and not trying to replicate some paper book. Apps is the place to be "clever". Being too clever breaks websites and makes ebooks very limited to a particular tested platform.
Reply 

#20  Tex2002ans 09-25-2021, 10:16 AM
Quote Turtle91
MR's Wiki has a bunch of mini-tuts about eBooks and ePublishing.
I'll have to look through those again, I haven't done that in a looong time.

A lot of the "How to Make An Ebook" stuff was written many years ago, and much of that information is a bit out of date. (Like Liz Castro's ol' ebook/website.)

Of course, the core, KISS + basic HTML stuff is all correct.

... but a lot of the surrounding EPUB-specific info may need updating. They'll be discussing:

And they may be missing newer EPUB3 stuff. Or not discussing the tweaks/enhancements/tools that have come over the years like:

There's better/faster workflows out there, but much of this information is scattered.

Eventually, my blog will be up and running and all this stuff will be gathered to the best of my ability (I KNOW I KNOW, lol).

But for now, all this stuff is spread in separate MR threads.

* * *

Usually, if you have ANY sort of issue in ebooks, you can do search this in your favorite search engine:

Code
Your Problem Here Tex2002ans site:mobileread.com
Your Problem Here Hitch site:mobileread.com
and you'll find your answer.

Have a problem with "<ol> lists"? Type in:

<ol> lists tex2002ans site:mobileread.com

And boom, here's one of my answers from 2019. (Don't use <ol> in EPUB, very buggy. Hardcode your numbers.)

Have a problem with "soft hyphens"? Type in:

soft hyphens tex2002ans site:mobileread.com

32 hits over the years. (I even wrote another post all about why soft hyphens are awful a few days ago.)

* * *

If you can't find it with mine or Hitch's username in your search? (Not very likely!) THEN you can do a general search across the internet... but all the coolest ebook people are here!

Quote Turtle91
Of course, you always have the great people here at MR that can help... you'll get some great advice as well as a little opinion thrown in to spice things up!


A few months back, I actually hopped on webcam and did an "EPUB crash course" with anonlivros (he wrote that great Paper Book -> PDF Tutorial).

It was the first time I ever TAUGHT someone else live.

And, since his PDF tutorial was so good, I wanted to get him up to speed on the PDF->EPUB side of things.

Many tips/tricks were methods I've been using for 8+ years, but never actually spoke to anyone else.

Definitely made me think differently too, and I even came up with newer methods on the fly as I tried to reexplain things to him (since he was an EPUB noob).

... and you guys have secretly been seeing a lot of that in my posts within the past 5 months.

* * *

Anyway, that's why I offered katknott (or anyone else who's interested) the webcam thing.

I could take a look at that document and see what I can do. Or how I'd tackle it.

And then I could even show you Sigil/Calibre, explain the basics of EPUB, answer any questions, etc.

Eventually, this info will be solidified on my site... and it'll be the ultimate EPUB resource.
Reply 

 « First  « Prev Next »  Last »  (2/3)
Today's Posts | Search this Thread | Login | Register