![]() |
#1 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
inline ToC via XPath?
![]() For 'tricky' inline ToCs I could use XPath in calibre. Do that exist in sigil as well? May be with a plugin? I use sigil 9.5 (standard version in LINUX compositories) |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,499
Karma: 5703586
Join Date: Nov 2009
Device: many
|
You would need a plugin. Plugins allow full lxml support and that includes Xpath. Sigil's toc is built from heading tags and not via xpath expressions.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
That's the first big MINUS for sigil. As an epub-editor it should have at least the features from a none-explicit-epub-editor, like calibre.
Is that non-existance to create inline ToCs via XPath to rectify somehow? EDIT: Does such a plugin exist? Last edited by chaot; 03-19-2017 at 04:06 PM. Reason: add: explicit |
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,499
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Please explain why you need a xpath expression to create a basic toc. Have you tried to literally auto create the toc and then edit it? Are there no heading tags anyplace? If not, have you tried a regular expression search and replace to insert them so that software that deals with accessability issues can properly identify structure.
|
![]() |
![]() |
![]() |
#5 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Thanks that you still communicate. I didn' t expect that too much.
Just to use real-world-words: I am angry! We don' t speak about basics, as I mentioned in #1. Explanation will be provided in a new thread (invitation inclusive). Last edited by chaot; 03-19-2017 at 04:34 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,499
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I am really having a hard time understanding what you are trying to say ... ask
To reiterate: - there is no xpath creation for tocs in Sigil and none is planned. - most xpath expressions for search/tocs creation can be handled via regular expression search and replace to add in the proper heading tags so that readers with accessability software can properly detect the structure. - if you want to use xpath search/selection then you will need to do that in a plugin as you will then have access to lxml and other tools like cssselect and the like - I have no idea if any current plugins use xpaths to build tocs or select anything. If not, and if you wanted that feature you would have to create your own plugin. Hope this now makes things crystal clear. |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
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:
A Mini can't haul a basketball team. You choose a Bus, not complain to the maker that a Mini does not hold 7 foot tall players, let alone a TEAM of them. Sigil (automates) generates TOC based upon H# tags. That works as advertised. So I simply choose to change (using S&R) whatever is the chapter/part title to use H# tags and STYLE those to look exactly the same as they did. |
|
![]() |
![]() |
![]() |
#8 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Cristal clear! I go to bed now!
If everything would be 'christal clear' we wouldn't need that thread. Good Night! EDIT: @theducks: Nice to got you 'aboard' again. I will reply tomorrow. Last edited by chaot; 03-20-2017 at 12:32 PM. Reason: inside → 'with us' → 'aboard' |
![]() |
![]() |
![]() |
#9 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,639
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I know Kevin and DiapDealer don't like these sort of discussions but...
Quote:
Firstly, leaving aside the fact that the calibre editor can also edit AZW3 (KF8) files, the calibre editor is just as worthy of being designated as an 'explicit epub editor' as Sigil is. The Xpath capability found in the calibre editor Toc Editor was created as part of calibre's Conversion capabilities, which predate it's epub editing capabilities by a good number of years. One has to wonder if Kovid would have included the Xpath capability in the calibre editor had it not already existed. Suggestion #1: read my post 14 and ensuing comments in this thread ==>> italic at end of line... . Suggestion #2: why don't you ask Kovid where the XPath processing is located in the calibre source, download it, and massage it into a Sigil plugin. Suggestion #3: There is no reason why, with due care and forethought, you can't use both editors - as I do. BR |
|
![]() |
![]() |
![]() |
#10 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
@Better Red
Reply to suggestion n2: Why not make that to a comun interest? I start the thread, we all work together, at the end we will get a calibre originated XPath creator for sigil. Do you agree, Kovid? Last edited by chaot; 03-19-2017 at 06:40 PM. |
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,378
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() When someone wants to do something that Sigil can't and calibre can, I don't mind at all if someone points that out to someone. We're not in competition with calibre at all--love the program. Where I get cranky is when the same someone(s) tend to give calibre instructions/answers (in the Sigil forum) for every Sigil question that someone (especially a newbie) brings up. With no regard as to whether Sigil is capable of "answering the call" or not. In this case, I'd be perfectly OK with someone telling the OP how to use calibre to generate ToCs with XPath. 'Cause Sigil probably won't ever do that inherently. ![]() With Sigil, you can generate an NCX from Headings, or you can create an NCX (without headings if you like) with the ToC editor. Once that's to your liking, then the "inline" (or HTML ToC) can be automatically generated using the "Create HTML Table of Contents feature (and styled with a custom css template if you like). Last edited by DiapDealer; 03-19-2017 at 06:35 PM. |
|
![]() |
![]() |
![]() |
#12 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,639
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#13 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
@DiapDealer: I know enough about XPath to create an inline ToC - in calibre.
![]() Last edited by chaot; 03-19-2017 at 07:03 PM. |
![]() |
![]() |
![]() |
#14 |
Head of lunatic asylum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
@BetterRed:
As usual in calibre manual: it give you not the full info. A quick look up indicates under 'Miscellaneous tools': Tools aren't further explained. Last edited by chaot; 03-19-2017 at 07:29 PM. |
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,378
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TOC from XPath | Paulie_D | Editor | 5 | 05-26-2015 02:55 PM |
Nested TOC / Xpath question | halfgone | Conversion | 0 | 02-13-2012 07:46 PM |
Inline TOC from toc.ncx | elmago79 | Kindle Formats | 38 | 03-25-2011 12:56 PM |
Use Regex to Code an Inline TOC, from an External TOC's .ncx File | mostlynovels | ePub | 2 | 03-16-2011 12:15 PM |
Xpath TOC Expression | Agama | Calibre | 2 | 07-12-2010 02:24 AM |