Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2011, 06:08 PM   #1
ccraig13
Junior Member
ccraig13 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: iPhone 3G
Question New Calibre isn't generating TOC

I've done this before ( About a month ago ) but ever since I upgraded Calibre ( A few days ago ) it doesn't work anymore. My chapters are coded as follows:
Code:
<p class="a-chap-title">
  <a class="calibre4" href="../Text/BOS_split_000.xhtml#toc" id="chaptertitle">
    Chapter Title
  </a>
</p>
I set the regex to look for p tags with a class value of "a-chap-title":
Code:
//h:p[re:test(@class, "a-chap-title", "i")]
I get nothin.
ccraig13 is offline   Reply With Quote
Old 09-30-2011, 02:29 PM   #2
therealjoeblow
Zealot
therealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfoldedtherealjoeblow reads XML... blindfolded
 
Posts: 106
Karma: 52102
Join Date: Jun 2010
Device: Samsung Android Tablet w/Moon+ Pro Reader
Quote:
Originally Posted by ccraig13 View Post
I've done this before ( About a month ago ) but ever since I upgraded Calibre ( A few days ago ) it doesn't work anymore. My chapters are coded as follows:
Code:
<p class="a-chap-title">
  <a class="calibre4" href="../Text/BOS_split_000.xhtml#toc" id="chaptertitle">
    Chapter Title
  </a>
</p>
I set the regex to look for p tags with a class value of "a-chap-title":
Code:
//h:p[re:test(@class, "a-chap-title", "i")]
I get nothin.
I'm no expert, but your <p> doesn't contain any text in it, it contains the anchor which contains the text.

Try using the anchor as the trigger instead:
Code:
//h:a[re:test(@class, "calibre4", "i")]
See if that works
The REAL Joe
therealjoeblow is offline   Reply With Quote
Advert
Old 10-07-2011, 09:58 AM   #3
ccraig13
Junior Member
ccraig13 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Sep 2011
Device: iPhone 3G
I thought that might be the case, but the "Structure Detection" works just fine with it so that's why I didn't pursue it. However, you're probably right.
ccraig13 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem generating TOC ronin712 Calibre 11 09-06-2015 11:53 PM
TOC - Kindle - Not Generating superted Conversion 2 05-15-2011 07:28 AM
Generating TOC entries for prelims / end matter in InDesign forlor ePub 7 07-07-2010 08:26 AM
Trouble generating a TOC foghat Calibre 2 05-07-2010 06:00 PM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 08:52 PM.


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