View Single Post
Old 04-01-2010, 08:13 PM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Let me preface this by saying I have never attempted this before.
Quote:
Originally Posted by kovidgoyal View Post
//*[name()='h1' or name()='h2' or name()='h3']
I took your Test Case text file, followed Kovid's suggestion as quoted above. To avoid confusion I attached an image of the settings I used.

Quote:
Originally Posted by p3aul View Post
This is what I had in mind:

Title rendered by h1 or #
Part one as h2 or ##
Chapter one as h3 or ###
Chapter Two as h3 or ###
Chapter Three as h3 or ###
Part Two as h2 or ##
Chapter One as h3 or ###
Chapter Two as h3 or ###
This seemed to create the TOC structure you want. It shows the h2 and h3 items. I might be missing something, check out the attached image of the TOC.

I also attached the ePub it created. Isn't this what you asked for?
Attached Thumbnails
Click image for larger version

Name:	Test Case.png
Views:	371
Size:	72.3 KB
ID:	49029   Click image for larger version

Name:	Structure_detection.png
Views:	344
Size:	5.8 KB
ID:	49030  
Attached Files
File Type: epub Test Case - Unknown.epub (137.5 KB, 296 views)

Last edited by DoctorOhh; 04-01-2010 at 08:16 PM.
DoctorOhh is offline   Reply With Quote