Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2025, 09:12 AM   #1
ElMiko
Addict
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 340
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Question about HTML-to-EPUB code

This isn't a conversion problem, per se; it's more of a confusion.

When an HTML file is converted to EPUB and chapter breaks are inserted before <h1> or <h2> tags ([Structure detection] options), at the end of each html "page" in the EPUB I'll see the following code:

Code:
<div class="calibre2" id="calibre_pb_0"></div>
, where "pb_0" increases by two on every subsequent html "page".

This code is not in the original HTML file, the "id" is not referenced anywhere else in the EPUB file (as far as I can tell), and the css for "calibre2" is just "display: block".

Can someone explain what this HTML code is doing, and what—if any—function it has for readability/epub validation/etc. after the converted file has been generated?
ElMiko is offline   Reply With Quote
Old 03-25-2025, 09:38 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,145
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That <div> will have been present in the HTML, calibre's HTML splitting code adds ids to all elements that have a page break applied for internal processing.
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil+HTML question: How to show/visualize entities and code? celiapgt Sigil 4 11-07-2024 10:46 PM
How to view the html source code of epub through calibre qweqwe123456 Editor 14 04-06-2023 02:14 PM
epub code snippets (html / css) zelda_pinwheel ePub 196 10-09-2016 04:21 AM
Quick html code question... pargoo Sigil 4 11-19-2013 03:05 PM
HTML code in epub book Giselleco Kobo Reader 4 07-26-2011 01:33 PM


All times are GMT -4. The time now is 11:31 PM.


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