Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only last "dc:title" is used when multiple are present in metadata. #502

Open
outis opened this issue Feb 2, 2022 · 1 comment
Open

Comments

@outis
Copy link

outis commented Feb 2, 2022

Synopsis

When there are multiple dc:title elements in an epub's publication metadata (in the OPF Package Document), FBReader uses the last one (in source order) as the book title, which doesn't match what's done in publications and is incorrect according to standards.

Description

The current Epub standard supports multiple titles, but FBReader does not. The following is valid in an epub:

    <dc:title id="maintitle">Main Title</dc:title>
    <meta property="title-type" refines="#maintitle">main</meta>
    <meta property="display-seq" refines="#maintitle">1</meta>
    <dc:title id="subtitle">Subtitle</dc:title>
    <meta property="title-type" refines="#subtitle">subtitle</meta>
    <meta property="display-seq" refines="#subtitle">2</meta>

FBReader won't use "Main Title" but rather "Subtitle" as the book's title, despite the former having a title-type of "main" and occurring first in the document order.

Something similar to the example occurs in various books I've read, but since they're copyrighted, I can't attach those. Instead, I can do one better: reprexes. The following epubs (submitted as ZIPs, since GitHub doesn't allow epub), one with #maintitle last, the other with #subtitle last, demonstrate this behavior:

Expected result

The first dc:title, or the dc:title with title-type of "main" (and the lowest display-seq) is displayed as the book's title wherever the book's title is used (e.g. the library, book info, the reader's title bar). Additional titles might (or might not) be displayed as well as part of the title.

Actual result

The dc:title that appears last in the source is used as the book's title.

System Info

Platform: Android
FBReader version: 3.0.35

@geometer
Copy link
Owner

geometer commented Feb 3, 2022

Thanks. Implemented in 2.0 for desktops and will be ported to Android and iOS sooner or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants