Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2015, 02:33 PM   #1
vmd108
Junior Member
vmd108 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2013
Device: KPW
Help with detecting chapters

Hello,
I am quite new with writing codes, but I would like to use option for detecting chapters (Structure Detecting) with Calibre.
My input us in docx file format.
Can someone please help
vmd108 is offline   Reply With Quote
Old 07-27-2015, 03:01 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The original, default in the distribution uses these keywords:

Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']
theducks is offline   Reply With Quote
Advert
Old 07-27-2015, 04:22 PM   #3
vmd108
Junior Member
vmd108 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2013
Device: KPW
What does it means?
vmd108 is offline   Reply With Quote
Old 07-27-2015, 05:33 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by vmd108 View Post
What does it means?
If you use that conversion detection setting?

Calibre will use the words Chapter, Book, Section, Part, prolog, prologue, epilogue if in a H1 or H2 Header as a marker to spllit and make a TOC entry
(ore if the HTML tag has class="chapter"
theducks is offline   Reply With Quote
Old 07-27-2015, 06:21 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It matches an XPath to identify as a chapter. See the calibre xpath tutorial: http://manual.calibre-ebook.com/xpath.html
eschwartz is offline   Reply With Quote
Advert
Old 07-30-2015, 02:40 AM   #6
vmd108
Junior Member
vmd108 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2013
Device: KPW
Quote:
Originally Posted by theducks View Post
The original, default in the distribution uses these keywords:

Code:
//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prologue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']
This does not work for me
vmd108 is offline   Reply With Quote
Old 07-30-2015, 02:42 AM   #7
vmd108
Junior Member
vmd108 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jul 2013
Device: KPW
Quote:
Originally Posted by eschwartz View Post
It matches an XPath to identify as a chapter. See the calibre xpath tutorial: http://manual.calibre-ebook.com/xpath.html
It is very confusing since I am not good with codes and programming
vmd108 is offline   Reply With Quote
Old 07-30-2015, 02:45 AM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
We can help you come up with the right XPath, but you need to tell us how the input document is formatted.

If Header styles were used in the DOCX, the default should work....
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura Kobo Aura - chapters detecting anthaet Kobo Reader 4 10-29-2014 03:41 PM
detecting chapters with --markdown p3aul Conversion 7 05-15-2011 11:01 AM
Detecting bookmarks as chapters on a PDF furius Conversion 3 04-13-2011 09:19 PM
azw to mobi: Not detecting chapters/page break at chapters and no TOC RachDvn Calibre 3 01-16-2011 09:53 AM
Detecting chapters Tibor Calibre 4 01-17-2009 01:25 PM


All times are GMT -4. The time now is 04:22 AM.


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