Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 02:58 PM   #1
Siggy15
Junior Member
Siggy15 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2026
Device: Foliate/Linux
Post Italics in generated indexes

It would be useful to be able to specifify a bit of formatting for index entries. For example, scientific names are typically written in italics: Homo sapiens

This could be simple and backwards compatible like this:

sigil_index_marker
sigil_index_marker-i

likewise:

sigil_index_marker-b
sigil_index_marker-u

in fact, if you parse the flags after the dash, many things would be possible:

sigil_index_marker-ibu

but plain italics is the thing that is most needed
Siggy15 is offline   Reply With Quote
Old Yesterday, 03:37 PM   #2
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: 10,160
Karma: 7640000
Join Date: Nov 2009
Device: many
Simply add something unique to each entry itself and the use Sigil search and replace to add the proper css class.
KevinH is online now   Reply With Quote
Old Yesterday, 11:55 PM   #3
Siggy15
Junior Member
Siggy15 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2026
Device: Foliate/Linux
Quote:
Originally Posted by KevinH View Post
Simply add something unique to each entry itself and the use Sigil search and replace to add the proper css class.
That would self-destruct the first time you use it.

Can't use hidden html, Sigil strips that. Don't want to use something that will show. Even if you use title tags, it will still show.

At best, that is a clumsy solution that is really ugly for the user. What I proposed would be elegant and easy for the user, There is a better way of doing it, with separate classes:

sigil_index_i
sigil_index_b
sigil_index_u

that would be used together with sigil_index_marker:

<span class="sigil_index_marker sigil_index_i">Homo sapiens</span>

That would give the user a lot of control in a way that is simple and permanent. And it would be backward compatible with older books.
Siggy15 is offline   Reply With Quote
Old Today, 08:35 AM   #4
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: 10,160
Karma: 7640000
Join Date: Nov 2009
Device: many
Well then implement it yourself and generate a PR and if it looks good we may merge it in the future.

Sigil does not strip hidden html only illegal code just like browsers do.

The idea of adding placeholder text then using search and replace can be done now with no changes. Class attributes can have multiple values. So if you have a list of words you want to be italicized you could use Python Function Replace to add that class right now.

And fwiw our New feature Suggestion thread is closed now. Once I reopen the new feature suggestion thread feel free to add your suggestion there so everyone sees it and can comment and it does not get lost.

Last edited by KevinH; Today at 08:44 AM.
KevinH is online now   Reply With Quote
Old Today, 12:38 PM   #5
Siggy15
Junior Member
Siggy15 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2026
Device: Foliate/Linux
I have long since forgotten C++, and I have no desire to relearn it and then figure out your codebase. And I'm too old to learn Python. I don't even know what a "PR" is, and you needn't explain. I retired for a reason.

Open any biology or medicine book, and you'll see the index is full of scientific names and terms in italics. I'm really surprised Sigil is so developed but somehow missed this. This is a necessity for any serious publishing platform.

And Sigil does strip html from index entries, I just tested it again. Try CO<sub>2</sub>.

I will never see when you reopen feature requests, I will forget the whole thing by then. Keep up the good work, and I am not being sarcastic. Sigil does a very good job of editing ebooks, too bad it doesn't do websites as well.

Another stray thought: if Sigil had Prev and Next buttons to move between pages, it could be used pretty much in place of a reader. Those are all so bad, every programmer is Wile E Coyote, trying to outsmart the world and failing.
Siggy15 is offline   Reply With Quote
Old Today, 12:51 PM   #6
Siggy15
Junior Member
Siggy15 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2026
Device: Foliate/Linux
forum blocking replies?
Siggy15 is offline   Reply With Quote
Old Today, 05:45 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 55,510
Karma: 182544230
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
There was a discussion a few years back about indexing in Sigil.

Ahh,, found it. Indexing in SIGIL - How to add "See also...". There are also links to other message threads of interest.

For me, the index generated by Sigil has been a pure text starting point. Then I take the time to prettify it, add links etc.
DNSB is offline   Reply With Quote
Reply

Tags
index italics formatting


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with subject indexes Frometa Sigil 3 04-03-2023 10:17 PM
Creating indexes Frometa Plugins 4 02-28-2023 02:58 PM
Multiple indexes - is it possible? andyb Sigil 6 05-02-2017 04:46 PM
Indexes without page numbers? SigilBear ePub 46 02-20-2017 09:30 AM
Indexes whitearrow Amazon Kindle 11 05-23-2009 12:15 AM


All times are GMT -4. The time now is 07:04 PM.


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