05-12-2018, 02:58 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2018
Device: epub
|
How to generate a TOC as a page in the eBook?
Hello,
I wish to create a table of content from headers h1 to h4 so that the headers cascade in an automatically generated html page. I know that there is the "Modify TOC" button, but I haven't found a way to actually generate a page and further more I wish to put this page in my ebook between two chapters. The resulting page might look as such Title1 ___Title11 ___Title12 Title2 ___Title21 ______Title 212 Thanks |
05-12-2018, 03:40 PM | #2 |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Once you have a NCX TOC (that is what you create with the TOC tool),
Select Tools:Table of contents: Insert Inline TOC That inserts the file TOC.xhtml near the front. Move it to where you want it |
Advert | |
|
05-13-2018, 10:42 AM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2018
Device: epub
|
Generates exactly what I was looking for.
But the issue is that toc.xhtml appears of the screen on a smartphone, with a padding-left about 1/3 of the screen. I tried .level1 { font-size: 170%; padding-left: -1em; padding-top: 3em; } .level2 { font-size: 60%; padding-left: 0em;} .level3 { font-size: 80%; } To no avail Last edited by alegriadelarte; 05-13-2018 at 05:10 PM. |
05-14-2018, 03:52 AM | #4 |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2018
Device: epub
|
the TOC has its own css on which the stylesheet.css does not apply (for example if one sets body{ background-color: red;} one sees that it does not apply on the TOC)
Where is the css of the TOC?? |
05-14-2018, 05:54 AM | #5 | |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Quote:
just change or add your css code inside the <style type="text/css"> element |
|
Advert | |
|
05-14-2018, 09:42 AM | #6 |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2018
Device: epub
|
>It's at the top of the TOC file itself in the <head> element.
I tried, but fails to work. The TOC file is really treated independly from the others |
05-14-2018, 03:04 PM | #7 |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
It works for me. Did you also change the style for the li element?
Your problem might also be that the <li> and <ul> element are rendered by default with a text indent. So if you don't want the text to be indented add: Code:
text-indent:0 |
05-22-2018, 10:40 AM | #8 | |
Junior Member
Posts: 9
Karma: 10
Join Date: May 2018
Device: epub
|
Not satisfied, behaviour is inconsistent according to reader.
Quote:
If I view under Android, with Eboox, Google Play or ReadEra, I have very different behaviour. Eboox does not at all take into accounts the above css. |
|
05-22-2018, 11:09 AM | #9 | |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
'We know better" (and will only do it our way) |
|
05-22-2018, 03:18 PM | #10 | |
Groupie
Posts: 161
Karma: 1842
Join Date: Jan 2016
Device: Kobo Glo HD
|
Quote:
You could try to add Code:
li, ul { list-style-type: none; text-indent: 0; margin: 0; padding:0; } |
|
05-23-2018, 01:54 AM | #11 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Why bother with an inline TOC page when all of the readers you cited have the ability to open the standard epub TOC?
|
05-23-2018, 09:16 AM | #12 | |
Well trained by Cats
Posts: 29,792
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
So it looks exactly like the dead tree version? (Gah! Years ago, I sent hours making a data entry form look EXACTLY like the paper version that they (the client) had used for decades. <surprised they didn't have quills and ink wells in the home office > |
|
Tags |
toc pages |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Generate TOC and linebreaks | AlanHK | Sigil | 24 | 09-25-2017 08:37 PM |
How to generate a physical TOC? | Books987 | Conversion | 2 | 01-24-2015 11:08 PM |
html does not generate TOC | iliakan | Conversion | 3 | 01-05-2015 01:56 PM |
Can't tell ebook-convert to NOT generate inline TOC for Mobi | EliW | Conversion | 17 | 05-10-2013 11:08 AM |
How to generate cover from the first page of an ebook? | purgatorios | Library Management | 2 | 11-17-2012 07:42 AM |