Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 02-18-2022, 12:26 PM   #31
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by democrite View Post
Would you consider some way to id some set of tags hierarchically?
Somehow, I fail to see the benefit of hierarchical ids. What exactly would you use them for?

Last edited by Doitsu; 02-19-2022 at 02:24 AM.
Doitsu is offline   Reply With Quote
Old 02-18-2022, 04:19 PM   #32
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Main use at the moment is I would like to create the XHTML TOC such that the link for sections is merely the number like 1, 1.1, etc. with text not as part of the anchor tag. For very long works with many sections, I can then add annotations or highlights for important sections. Helps keep track of important sections of interest in long works.
democrite is offline   Reply With Quote
Old 02-18-2022, 06:30 PM   #33
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You're not talking about the anchor tag's id attributes being only numbers are you?
DiapDealer is offline   Reply With Quote
Old 02-19-2022, 04:03 PM   #34
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
If ids were as sec1, sec1.1, sec1.1a etc. where I could specify a range of header tags to process e.g. H2 to H4 then after generating the XHTML TOC I could use regex to style sections like:

Code:
<a href=“./file.xhtml#sec1.1”>1.1</a> Section title</a>
I often tend to study academic or scientific works where there could be 50-100+ sections and coding as such would more easily allow annotations or highlights within the toc so I can keep track of notable sections.
democrite is offline   Reply With Quote
Old 02-19-2022, 04:16 PM   #35
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
Perhaps you could do that with CSS counters. They aren't universally supported AFAIK, but I don't guess that matters so long as they're supported by whatever device you're using.
phillipgessert is offline   Reply With Quote
Old 02-19-2022, 05:11 PM   #36
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by democrite View Post
If ids were as sec1, sec1.1, sec1.1a etc. where I could specify a range of header tags to process e.g. H2 to H4 then after generating the XHTML [...]
Since you can enter any id prefix that you want, you could simply process all h2-h4 tags and enter sec1, sec1. etc. as the id prefix.
Doitsu is offline   Reply With Quote
Old 02-20-2022, 05:00 PM   #37
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Incremental IDs plugin

Maybe I’m missing something but not sure how that’d work. E.g. H3+ after the first H2 numbered sec1.1 1.2 1.2.1 1.2.1 1.3 etc. then next set after second H2 sec 2.1 2.1.1 etc.

I’m ok with CSS counters but not sure how I’d code the links such that they’d include the number and header text would be outside. Maybe possible but haven’t found it yet.
democrite is offline   Reply With Quote
Old 02-20-2022, 05:57 PM   #38
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
I would try first pulling the title text out of the <a> tags via regex, leaving you with static text following an unlabeled link, then add the counter via a::before.

Code:
<a href='#target'></a>My Informative Title


Code:
a::before {
  content: counter(heading) '.' counter(subheading)  ': ';
}
Might be a start, anyway.

Last edited by phillipgessert; 02-21-2022 at 01:20 PM. Reason: added ::before pseudo element, I don't think it'd work the way I originally had it.
phillipgessert is offline   Reply With Quote
Old 02-21-2022, 02:00 PM   #39
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by democrite View Post
Maybe I’m missing something but not sure how that’d work. E.g. H3+ after the first H2 numbered sec1.1 1.2 1.2.1 1.2.1 1.3 etc. then next set after second H2 sec 2.1 2.1.1 etc.
You're right, you couldn't do this with the Incremental IDs plugin. You'll have to modify the plugin yourself to add that functionality.

Quote:
Originally Posted by phillipgessert View Post
I would try first pulling the title text out of the <a> tags via regex, leaving you with static text following an unlabeled link, then add the counter via a::before.
Unfortunately, many e-readers and epub apps don't support CSS counters.
I've created a proof-of-concept epub3 book with CSS counters based on a StackOverflow post that you could use for testing.
(CSS counters work in KF8 and KFX books, however, according to the Amazon Kindle Publishing Guidelines, you can't use them in Kindle books.)
Attached Files
File Type: epub css_counters.epub (2.4 KB, 130 views)
Doitsu is offline   Reply With Quote
Old 07-10-2022, 12:16 PM   #40
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
I used this plugin to interlink between sections of two xhtml files in an epub, then I split the files with sigil's split marker, and it didn't update the links to the new names of the xhtml files. Don't know whether this is an issue with Sigil or with the Plugin. I'm using an old version of sigil, the last one with "book view".

Anyway awesome job
1v4n0 is offline   Reply With Quote
Old 07-10-2022, 01:16 PM   #41
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,637
Karma: 5433388
Join Date: Nov 2009
Device: many
Working links are updated (href, src, etc) but ids are not changed as they must be unique strings in any one file so splitting them will not impact that uniqueness.

Last edited by KevinH; 07-10-2022 at 01:18 PM.
KevinH is offline   Reply With Quote
Old 07-11-2022, 12:59 AM   #42
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by 1v4n0 View Post
I used this plugin to interlink between sections of two xhtml files in an epub, then I split the files with sigil's split marker, and it didn't update the links to the new names of the xhtml files.
As KevinH has already pointed out, Split at Markers will only update working links.
Please validate your epub book with my EpubCheck plugin before and after using the AddIDs plugin. (You can also check links in your book with Tools > Reports > Links.)
If either tool reports broken links after using the AddIDs plugin, you most likely didn't use the plugin correctly.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The new PaperWhite snuck out! Incremental update mewmartigan News 192 09-13-2013 07:28 AM
search and replace with incremental number pimpoum General Discussions 4 07-08-2011 02:41 PM
Developers, please implement an incremental update feature usedtowork Calibre 7 03-21-2011 06:58 PM
Can we at least have an incremental firmware upgrade? mwlcarter Kobo Reader 2 05-23-2010 02:35 PM


All times are GMT -4. The time now is 11:57 PM.


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