Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2019, 02:30 AM   #1
coneheadZombie
Member
coneheadZombie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2019
Device: Moon+Reader (Android)
Exclamation Help with TOC and Toc entries.

So guys im making an ebook of my an light novel called Overlord from scratch and im having a small problem with the TOC entries.

All the chapters are divided into parts like Part 1, Part 2 etc as shown below:
Here is a screenshot of the pdf.
Spoiler:




These Parts are supposed to show up below the Chapter title but once i add both Chapter title and Part 1,Part 2 to TOC, they show up on different pages on the ebook reader. Like this :
Spoiler:


and



So is there any way i can make both the titles and Parts appear on the same page and yet have them on TOC.
coneheadZombie is offline   Reply With Quote
Old 01-25-2019, 08:55 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by coneheadZombie View Post
So is there any way i can make both the titles and Parts appear on the same page and yet have them on TOC.
The short answer is Yes. But only if they are both part of the same html file. If the Title is in one html file and the Part in another, then no. You can't do anything that would make a reading application or device "join" them.

As far as the ToC goes; you don't mention whether it's an html toc or the structural ncx type, but it shouldn't matter. As long as you give the Part heading an id, you can make the link in the ToC point to a "fragment":

Title
Code:
href="../Text/myhtmlfile.xhtml
and Part
Code:
href="../Text/myhtmlfile.xhtml#part1_id"
Also make sure there's no css being applied to either the Title or the Part (or their containing divs if they have any) that would trigger such a page break. Something like:

page-break-before="always" or page-break-after="always"

- will trigger a page-break even if both are part of the same html file.
DiapDealer is offline   Reply With Quote
Advert
Old 01-25-2019, 09:32 AM   #3
coneheadZombie
Member
coneheadZombie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2019
Device: Moon+Reader (Android)
Thanks for the reply.

Well , both the Chapter and Part are in the same .xhtml file.
The only css im using is span(drop cap) no page-break is being applied.
Im using .ncx toc.

This is what the Chapter2.xhtml file looks like right now :
Spoiler:
Code:
<body>
<div id="header">

  <h3>
  <span class="dc">O</span>VERLORD 
  <span class="dc">V</span>OLUME 
  <span class="dc">2</span>
  </h3>
  <hr id="bottomline"/>
  
  <h3>CHAPTER 2</h3>
  <h3>JOURNEY</h3>
</div>

<div>

<h4 id="toc_1">Part 1</h4>

some <p>'s
</div
</body>


and the Toc.ncx is :
Spoiler:
Code:
 <navPoint id="num_10" playOrder="10">
      <navLabel>
        <text>CHAPTER 2 - Journey</text>
      </navLabel>
      <content src="Chapter2.xhtml"/>
      <navPoint id="num_11" playOrder="11">
        <navLabel>
          <text>Part 1</text>
        </navLabel>
        <content src="Chapter2.xhtml#toc_2"/>
      </navPoint>
    </navPoint>


So the problem might because of the dropcap span ?
but is there any way i can use css with these ?
coneheadZombie is offline   Reply With Quote
Old 01-25-2019, 10:45 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If there's no css specifying a page-break and everything is a part of the same html file, then the only explanation I have, is that it's an artifact of the particular app/device you're using to preview it. Have you tested it on anything else?
DiapDealer is offline   Reply With Quote
Old 01-27-2019, 11:47 PM   #5
coneheadZombie
Member
coneheadZombie began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jan 2019
Device: Moon+Reader (Android)
Quote:
Originally Posted by DiapDealer View Post
If there's no css specifying a page-break and everything is a part of the same html file, then the only explanation I have, is that it's an artifact of the particular app/device you're using to preview it. Have you tested it on anything else?
So i finally got some time to test it on other apps, it is as you said.
I didn't find this problem on any of the desktop readers.

Thanks for the help.
coneheadZombie is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove TOC entries in bulk ?. leftright Library Management 4 09-13-2015 05:06 PM
TOC Entries from PDF HamsterRage Calibre 2 07-12-2010 11:57 AM
Redundant/Invalid TOC entries Stinger Kobo Reader 4 06-26-2010 09:02 PM
Best way to do a TOC for large numbers of entries? HarryT Workshop 5 01-18-2009 07:02 AM


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


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