![]() |
Table Of Contents Question
I have two issues.
I have read quite a few threads before posting but they do not help me. I am trying to create a table of contents with my books. Can someone how to explain this is in layman's terms. I went to the Xpath tutorial and I don't understand all that stuff. Can anyone clarify in the simplest way to get table of contents in my books? Also , I downloaded a few books in PDF and the font was so small that is was illegible. This was only with one book although I downloaded that book from several locations. Anyone know why? |
Quote:
Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\s+', 'i')) or @class = 'chapter']If you are editing the ebooks, then just put the chapter headings in h1 or h2 tags with Chapter (say) in the heading and/or make the class 'chapter'. Or see below for other XPATH settings you might use. When generating a TOC for purchased ebooks, I have found that you need different XPATH values for different ebooks. Versions that select all <h1> and <h2> (and <h3>) tags: Code:
//*[name()='h1' or name()='h2']Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\s+|0|1|2|3|4|5|6|7|8|9', 'i')) or @class = 'chapter']Code:
//*[((name()='h1' or name()='h2') and re:test(., '^[^a-z]+$')) or @class = 'chapter']Code:
//*[re:test(., '^chapter ', 'i')]Code:
//*[@class = 'calibre1'] |
Welcome to the forum. Those are are 2 pretty big issues for your first post :)
If you are new to ebooks all this probably feels a bit daunting but if you persevere and keep asking questions here you will gradually get there. It will be easier for people here to help you if you can be specific about a problem you are having and can attach a sample portion of your input file. |
| All times are GMT -4. The time now is 10:53 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.