|
|
Thread Tools | Search this Thread |
06-03-2023, 11:15 AM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Jul 2017
Device: none
|
Calibre EPUB Conversion -- EPUB 3 and HTML vs. XHTML internal file naming
Is there an option in Calibre for when it's converting to EPUB 3 to have it name the content (e.g., index_split_xxxx.html) files with an XHTML extension instead of an HTML extension?
As background, the reason I need EPUB 3 vs just continuing to use EPUB 2 is that EPUB 3 supports some important features in highly structured books that EPUB 2 does not. Nested lists and outlines where individual items may span multiple paragraphs (so counter doesn't update on consecutive paragraphs) are common examples, among others. These are standard features in text books and other nonfiction content. If converting from MS Word, which supports these features without doing anything special, when converting in Calibre, they break in EPUB 2, but work perfectly in EPUB 3. Functionally, I realize there is no difference between the two file extensions, but the EPUB 3 validation tools used by many distribution companies report the HTML file names as a problem (triggers a warning, not an error, but that's enough that some will block the EPUB). I'm trying to automatically output files without having to go into the editor and manually rename all the content files from index_split_xxx.html to index_split_xxx.xhtml). The validators seem fine with .HTML or .XHTML in EPUB 2, but only .XHTML in EPUB 3. If there is no built-in way to do this in Calibre, should I submit this as a feature request, or is there perhaps a tool I could run on the final EPUB file after it's created that could go through and rename those files inside the EPUB? Last edited by GranitStateColin; 06-03-2023 at 11:17 AM. Reason: fix typo |
06-03-2023, 04:51 PM | #2 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
As far as I am aware, the current gold standard for checking epubs for error is epubcheck. The requirement for .xhtml as the file extension was dropped by epubcheck several versions back and should no longer cause a warning message.
As for renaming the files, you could use Sigil to select all the .html files in the book browser and then rename them to *.xhtml. I think the calibre ebook-editor has the same functionality but I've never used it for that purpose. Last edited by DNSB; 06-03-2023 at 04:54 PM. |
06-03-2023, 09:21 PM | #3 |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
In the editor, select any or all files and then right click
|
06-03-2023, 11:17 PM | #4 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no requirement for files to have xhtml file extensions in epub 3. That was a bug in epubcheck that has been fixed a long time ago, IIRC.
|
06-04-2023, 01:27 AM | #5 | ||
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I suspect that this was caused by confusion over what was meant by should.
From the epub 3.2 specification section 2.2 Content Conformance: Quote:
Quote:
BTW, the various generations of the epub specifications are hardily recommended as a cure for insomnia. |
||
06-04-2023, 10:44 AM | #6 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Yes the "should" use .xhtml existed in epub 3.0, epub 3.1 and epub 3.2 specs and was erroneously required by epubcheck up untill recently.
|
Tags |
conversion, epub 3, xhtml |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Naming epub file | JaniceS1 | Calibre | 2 | 05-26-2017 01:19 PM |
InDesign - ePub export html files instead of xhtml | csavory | ePub | 5 | 02-06-2015 02:47 AM |
Indesign CS5.5 creates epub with *.html instead of *.xhtml | megabusybee | ePub | 2 | 12-01-2011 02:48 PM |
Quick and dirty conversion of html to epub WITH intra-file links | Birdonawire | ePub | 2 | 06-18-2010 03:18 AM |
Several xhtml/html to a single epub file help. | clowe1028 | ePub | 3 | 03-21-2010 04:47 AM |