Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2022, 12:24 PM   #1
katknott
Junior Member
katknott began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2021
Device: callibre
hello and can someone please help?

I am using Calibre for epub and getting an html error im unfamiliar with how to fix. it is for bare text. There are three all the same as this line: <p class="calibre1"> with text following this tag
katknott is offline   Reply With Quote
Old 10-16-2022, 03:03 PM   #2
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 769
Karma: 1537886
Join Date: Sep 2013
Device: Kobo Forma
Bare text is text that's outside tags. Can you copy/paste the actual error message and the html around where it's saying the problem is?
enuddleyarbl is offline   Reply With Quote
Old 10-16-2022, 04:11 PM   #3
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,312
Karma: 20171571
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
Also, with ePub, you need an opening AND closing tag.

<p class="calibre">Some text.</p>

It can throw an error if it doesn’t find the closing tag.

That can catch people that have done web design because it’s not required in html, but it is in xhtml.
Turtle91 is offline   Reply With Quote
Old 10-17-2022, 05:21 AM   #4
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,705
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
I've never seen working HTML without closing tags other than standalone tags such as <br>, which is usually <br/>

It doesn't just throw an error. The rest of the file can be affected.
Quoth is offline   Reply With Quote
Old 10-17-2022, 09:39 AM   #5
bookman156
Addict
bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.bookman156 ought to be getting tired of karma fortunes by now.
 
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
Quote:
I've never seen working HTML without closing tags other than standalone tags such as <br>, which is usually <br/>

It doesn't just throw an error. The rest of the file can be affected.
Actually there is such a thing a tag omission:

Quote:
Paragraphs are block-level elements, and notably will automatically close if another block-level element is parsed before the closing </p> tag. See "Tag omission" below.
Quote:
Tag omission:

The start tag is required. The end tag may be omitted if the <p> element is immediately followed by an <address>, <article>, <aside>, <blockquote>, <div>, <dl>, <fieldset>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hr>, <menu>, <nav>, <ol>, <pre>, <section>, <table>, <ul> or another <p> element, or if there is no more content in the parent element and the parent element is not an <a> element.

https://developer.mozilla.org/en-US/...HTML/Element/p
I only noticed it when a page of mine validated with a missing closing p tag.

(Obviously this won't work in xhtml in epubs, where even void elements like hr and br have to be closed with a trailing slash: <hr />, <br />.)

Last edited by bookman156; 10-17-2022 at 10:14 AM.
bookman156 is offline   Reply With Quote
Old 10-17-2022, 10:25 AM   #6
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
If using Sigil, run Mend. Sigil's gumbo parser will parse according to html (as well as xhtml rules) and serialize to xhtml. Since calibre has a parser originally based on gumbo too, it should do the same.
KevinH is offline   Reply With Quote
Old 10-17-2022, 01:35 PM   #7
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,705
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Quote:
Originally Posted by bookman156 View Post
Actually there is such a thing a tag omission
It may be "legal" but it's sloppy even for simple HTML. I'd flag it as an error if I wrote an HTML validator because it usually is a mistake!
Quoth is offline   Reply With Quote
Old 10-17-2022, 03:59 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,478
Karma: 5703586
Join Date: Nov 2009
Device: many
There are actually lots of legal html omissions of ending tags. In fact any time an ending tag can be inferred from other starting or ending tags (such as inferring an ending p tag by seeing another opening p tag) it is legal to omit it. See the whatwg rules if interested.

A real html parser involves lots of special rules.

https://html.spec.whatwg.org/multipa...plied-end-tags

Last edited by KevinH; 10-17-2022 at 04:42 PM.
KevinH is offline   Reply With Quote
Reply

Tags
bare text error, epub validation


Forum Jump


All times are GMT -4. The time now is 03:43 AM.


MobileRead.com is a privately owned, operated and funded community.