08-24-2024, 06:35 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2024
Device: All
|
What did I just do?
I'm a CSS/Sigil newbie. I've been working on an epub that originated in Adobe Indesign. Today I added a new html file inside the epub for a second title page. Long story short, when I copied and pasted contents from the original title page into the new file, it caused the table of contents to appear on ebook pages. I recreated the issue so I know that's what it was.
I'm starting over with a fresh epub from indesign but I'd like to learn from this novice mistake. What caused the table of contents to become content in the ebook? Attached is the new page I created (unedited)? |
08-24-2024, 08:36 PM | #2 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
There already was a Table of Contents toc.xhtml file. You can see it listed in the BookBrowser window.
So I am not sure what you mean by "it caused a the table of contents to appear on ebook pages". All I see is a Table ofContents Window in the right hand side Dock position. If you click on the tab that says "Preview" in the lower right side of the screen, you can make the Preview Window appear, and hide the Table Of Contents. Last edited by KevinH; 08-24-2024 at 11:49 PM. |
Advert | |
|
08-24-2024, 08:58 PM | #3 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The Preview tab being behind the Table of Contents tab was the only thing I could think of, too. Just switch back to Preview.
There's some pretty good stuff on hiding/moving/stacking/tabbing--and even floating those various Sigil widgets in the User Interface section of the user guide. Last edited by DiapDealer; 08-24-2024 at 09:06 PM. |
08-25-2024, 11:42 AM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2024
Device: All
|
Kevin, what I mean is the TOC normally shows up as a navigation menu. By inserting an identical file (a second title page), it caused a separate TOC that consists of 100 untitled chapter links to display on the e-reader pages. So if you were to open the book in a Kindle or Kobo, pages 2-5 are links to the unnamed chapters. It looks bad.
|
08-25-2024, 12:05 PM | #5 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
I can not duplicate that at all with Sigil. And your image does not show any toc info on your new empty second title page.
My guess is you had a toc.xhtml file that was not listed in the OPF spine at all and so when you inserted a new file it rebuilt the spine and properly included it. Since this is an epub3, is your toc.xhtml your NAV document? Or is it a user html table of contents you want people to actually see just like any other content? What manifest properties are listed for that file in the OPF Manifest? Does it have the "nav" property? And how it that file listed in the OPF Spine? Is it linear="no"? If after all editing is done and your have rebuilt the nav to reflect any new headings and things, if you do not want the nav to appear you can remove it from the OPF spine. But it must have the nav property set in the opf manifest on it to pass epubcheck. Last edited by KevinH; 08-25-2024 at 12:26 PM. |
Advert | |
|
08-25-2024, 12:43 PM | #6 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2024
Device: All
|
I don't see any "linear" definitions. In the toc.xhtml file this appears directly before the sections that appear (as I want) in the navigation toc: <nav id="toc" epub:type="toc" role="doc-toc"> <h2>Contents</h2><ol>
In the content.opf spine toc="ncx"> Maybe I'm going about this all wrong. Instead of wondering how my file went haywire, I should simply never do that again and learn how to properly build a second title page. |
08-25-2024, 12:52 PM | #7 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
You need to look in your content.opf for the spine tag. It will have itemref child tags. Each one points to a manifest id for that entry and each one allows a linear= attribute.
So take a screen shot of the opf spine. Then look in the opf manifest to find which file that refers to. To make things simpler, you can pm me directly for privacy reasons with screenshots of the opf spine (entire thing not just the opening tag) and screenshots of the opf manifest (again entire thing), I can point out what to do. Similarly you could just pm me the content.opf file instead. It is a minor change. You have done nothing wrong, Many epub devs add a user oriented table of contents xhtml independent of the nav itself. Mainly at the end. And Sigil supports that by default. |