View Full Version : A couple of issues regarding TOC and OPF

03-15-2012, 04:55 PM
Hi there. I'm kind of a newbie in this whole thing of eBooks which I've been looking into for the last few weeks. I'm trying to put together some standard ePubs for a small publishing house and so far I've come across a couple of issues:

-First, in all of my ePubs, when I "validate" them in Sigil, the following line appears, making reference to the cover '.jpg' file:

"File: cover.jpg" "Line: N/A" "Message: The resource is present in he OPF <manifest>, but it's not reachable (it's unused)."

I don't know why that's happening since the file is acually there, and I can see it in any reader or previewer. Any suggestions?

-I have a book which consists of five articles, each one written by a different author. The book has no "main author", so I want all of them to appear. The thing is, if I put their names separated by semicolons in a single OPF entry, it would ignore all of them but the first. The same happens when I create an entry for each name. Using ampersands doesn't work either since the whole entry is taken as a single sentence, therefore taking the five authors as one.

In the same book, I want the TOC to be displayed like it follows:

Article 1 title............................................. ......................Page nš

Article 2 title............................................. ......................Page nš

Article 1 title............................................. ......................Page nš


I've tried and tried but there's no way I can get what I want. Either the author and the title appear in the same line, or the page number is included in both lines.

I hope I've been clear enough for you to understand my issues.

I would really appreciate your help. Thanks!!

PS: I always export the ePUB from InDesign and then edit the code in Sigil.

03-15-2012, 05:35 PM
The first is simple. The cover.jpg is not used in any xhtml file. You should have a xhtml file with the cover.jpg in it. That is also usually the first file in the ePUB. A lot of readers will not show the cover if it is not in a xhtml file.

The second, make the author heading 1 and the title heading 2. Rebuild your TOC accordingly.

You can have multiple authors in your opf. Use the following in your opf.
<dc:creator opf:role="aut">author1 &amp; author2 &amp; author2</dc:creator>

03-15-2012, 05:40 PM
Regarding your cover error, all that means is that the cover image is not being used in the xhtml of the epub. You can add a xhtml page in Sigil displaying the cover image so it is part of the body of the book.

With multiple authors, I've seen them separated by comas "," or the word "and", don't know if that helps you though.

With the TOC I'm thinking you mean the TOC displayed by the reader when you select "Show Table of Contents"? If so I'm not sure that it is possible to have a two line display like you're discribing.

03-16-2012, 01:26 PM
You can have multiple authors in your opf. Use the following in your opf.
<dc:creator opf:role="aut">author1 &amp; author2 &amp; author2</dc:creator>

The proper way is to use separate tags:

<dc:creator opf:role="aut">author1</dc:creator>
<dc:creator opf:role="aut">author2</dc:creator>
<dc:creator opf:role="aut">author3</dc:creator>

If a given reading system doesn't recognize this and shows only one, that's a bug or a deficient implementation. Do not use degraded coding to work around shortcomings of particular readers, please.

03-16-2012, 03:49 PM
Jellby, this is how Sigil handles multiple authors and Calibre understands it. I have no idea if it is according to specs.

03-16-2012, 05:03 PM
But that way you can't have a "file-as" attribute for each of the authors.

03-16-2012, 06:44 PM
Calibre does and that is what I use.

03-17-2012, 07:18 AM
Then you have an ePub that is made for use with calibre, but does not have its metadata in the spec-recommended format:

Publications with multiple co-authors should provide multiple creator elements, each containing one author. The order of creator elements is presumed to define the order in which the creators' names should be presented by the Reading System.

This specification recommends that the content of the creator elements hold the text for a single name as it would be presented to the Reader.

03-17-2012, 02:52 PM
I am fine to follow the specs as you know, but I am wary of making changes myself in the opf. I can, but for ePUB that are for myself I will not bother. For published ePUB, that is something else.

03-21-2012, 08:19 PM
Thank you all!!!

03-23-2012, 05:42 PM
This should all be easier to do soon as the metadata will be able to be edited in Sigil for individual authors as creators or contributors and file as per entry, without having to edit the opf directly.