07-26-2010, 07:04 PM | #1 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jul 2010
Device: iPhone
|
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? |
07-26-2010, 08:17 PM | #2 | |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
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'] //*[name()='h1' or name()='h2' or name()='h3'] 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')] //h:p[re:test(., '^chapter ', 'i')] Code:
//*[@class = 'calibre1'] //*[@class = 'calibre1' and re:test(., 'chapter|book|section|part\s+|0|1|2|3|4|5|6|7|8|9', 'i')] //*[@class = 'calibre1' and re:test(., '^[^a-z]+$')] Last edited by wallcraft; 07-26-2010 at 08:20 PM. |
|
Advert | |
|
07-26-2010, 09:10 PM | #3 |
Grand Sorcerer
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
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. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents | peterinnes | Sigil | 1 | 09-29-2010 03:03 AM |
Question Regarding Table of Contents | Guns4Hire | Sigil | 2 | 01-12-2010 11:15 PM |
Table of contents and time question | lizzielou | Sony Reader | 2 | 11-29-2009 04:48 AM |
How to: table of contents | wizzofoz | Sigil | 1 | 10-08-2009 08:22 AM |
Question: converting lit to imp and keeping table of contents links etc | askyn | IMP | 11 | 10-04-2008 01:04 AM |