Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2022, 07:08 PM   #1
marktaff
Junior Member
marktaff began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2022
Device: Calibre 6.3, Foliate 2.6.4 (Manjaro Linux)
EPUB3 Landmarks not showing in UI

First post.

My landmarks aren't visible anywhere in the UI. I checked in both Calibre 6.3 and current Foliate, no dice. Maybe Calibre is broken, maybe my epub is broken, maybe I'm broken. :-) Maybe landmarks are just pointless? Hopefully you guys can set me straight. As to my experience level, I have decades of experience programming in dozens of languages, as well as web development. However, I've only been in epub-land for about 10 days.

I tried importing a (really, quite terrible) pdf into Calibre, and it choked as expected, and no amount of internal regex was going to fix it. No worries, as Kovid notes, PDFs suck to import from. So I wrote a 2000 line python program to convert it. It works lovely.

The epub validates as epub 3.2 (or generally does or has; presently I'm 3/4 of the way through adding backmatter). However, at no time has any indication of my landmarks shown up in any part of the Calibre or Foliate UI. Other than that, the epub works in Calibre and Foliate.

I expect the landmarks to show up as part of the reader's navigation pane, either above or below the table of contents. The epub also has an in-line ToC. There is very little info out there on how to get landmarks to show up.

nav.xhtml
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
<head>
    <title>Navigation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<!-- See: https://ebookflightdeck.com/handbook/landmarks -->
<nav epub:type="landmarks">
    <h2>Guide</h2>
    <ol>
        <li><a epub:type="backmatter" href="backmatter.xhtml#producer-notes">Producer's Notes</a></li>
        <li><a epub:type="cover" href="coverpage.xhtml">Cover</a></li>
        <li><a epub:type="toc" href="table.of.contents.xhtml#toc">Table of Contents</a></li>
        <li><a epub:type="title-page" href="frontmatter.xhtml#inside-title">Titlepage</a></li>
        <li><a epub:type="frontmatter" href="frontmatter.xhtml">Frontmatter</a></li>
    </ol>
</nav>
<nav epub:type="toc">
    <ol>
        <li><a href="table.of.contents.xhtml#toc">Contents</a></li><!-- Table of contents -->
        <li><a href="chapter_001.xhtml">CHAPTER I A Curious Stranger</a></li>
...
content.opf
Code:
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uuid_id" prefix="calibre: https://calibre-ebook.com">
    <metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata">
...

    <manifest>
        <item id="coverpage" href="coverpage.xhtml" media-type="application/xhtml+xml" properties="svg calibre:title-page"/>
        <item id="frontmatter" href="frontmatter.xhtml" media-type="application/xhtml+xml" />
        <item id="contents" href="table.of.contents.xhtml" media-type="application/xhtml+xml"/>
        <item id="html1" href="chapter_001.xhtml" media-type="application/xhtml+xml"/>
        <item id="html2" href="chapter_002.xhtml" media-type="application/xhtml+xml"/>

...

        <item id="html20" href="chapter_020.xhtml" media-type="application/xhtml+xml"/>
        <item id="backmatter" href="backmatter.xhtml" media-type="application/xhtml+xml" />
        <item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
        <item id="page_css" href="page_styles.css" media-type="text/css"/>
        <item id="css" href="stylesheet.css" media-type="text/css"/>
        <item id="cover" href="cover.jpg" media-type="image/jpeg" properties="cover-image"/>
        <item id="added1" href="frontis.jpg" media-type="image/jpeg"/>
    </manifest>
    <spine>
        <itemref idref="coverpage"/>
        <itemref idref="frontmatter"/>
        <itemref idref="contents"/>
        <itemref idref="html1"/>
        <itemref idref="html2"/>
...
        <itemref idref="html20"/>
    </spine>
</package>
Any help would be appreciated. Thanks!
marktaff is offline   Reply With Quote
Old 08-24-2022, 07:58 PM   #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: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
landmarks are not commonly used, however calibre viewer does support them. IIRC they show up in the Goto panel of the viewer (access the viewer control and click/tap the goto button).

They do not show up in the table of contents
kovidgoyal is online now   Reply With Quote
Advert
Old 08-24-2022, 08:16 PM   #3
marktaff
Junior Member
marktaff began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2022
Device: Calibre 6.3, Foliate 2.6.4 (Manjaro Linux)
Quote:
Originally Posted by kovidgoyal View Post
landmarks are not commonly used, however calibre viewer does support them. IIRC they show up in the Goto panel of the viewer (access the viewer control and click/tap the goto button).

They do not show up in the table of contents
Your memory is correct. Thank you for clearing that up for me! I couldn't find any similar 'go to' feature in Foliate, but that's OK. I'll leave the landmarks convenience view to the reader, and just add any truly important landmarks to the spine and inline ToC.
marktaff is offline   Reply With Quote
Reply

Tags
epub3, landmarks nav


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub3 images showing in footnotes increase ePub 0 02-10-2020 05:45 PM
Thoughts on new epub3 tool: generate guide from Landmarks KevinH Sigil 35 07-11-2019 01:01 PM
Multiple epub:type roles for a file in landmarks nav jcsalomon Sigil 0 02-20-2018 02:08 PM
fixed layout landmarks issue leijoninna ePub 11 06-14-2013 04:24 AM
Using privately owned landmarks mr ploppy Writers' Corner 8 08-10-2011 01:51 PM


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


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