Le 17/01/2026 à 11:31, Gavin Smith a écrit :
[...]
In some indices, entries are very far from the corresponding sections.
As cells don't have horizontal borders [1], it's easy to associate an
entry with a section that corresponds to its neighbor. To minimize this
possibility, I added a light-tan background to the rows upon hovering.
Looks good, although it doesn't work perfectly.
It does not work with the CSS classes for multi-level indices in the
development version:
[...]
The "printindex-index-entry" rows are highlighted but not the
"printindex-index-subentry-level-1" rows. "printindex-index-subentry-level-2"
is also possible. From style.css:
/* For indices. Make the rows stand out on hover to better visualize which
section corresponds to which entry. */
table[class*="printindex"] tr:hover td[class*="index-entry"],
table[class*="printindex"] tr:hover td[class*="index-section"] {
background:#f9f6ed;
}
It would probably be accommodated by adding in addition:
table[class*="printindex"] tr:hover td[class*="index-subentry"],
I added this line.
Less importantly, at
https://www.gnu.org/software/emacs/manual/html_node/elisp/Index.html#Index_fn_letter-A.,
you can see there is a small section that is not highlighted when you
hover over each index entry. This is due to a small cell <td> </td>.
You may decide this is a very minor problem and not worth trying to fix.
(It might not be possible to find those cells with CSS as they don't
have a class set.)
Those cells are siblings of td[class*="index-entry"] or
td[class*="index-subentry"], and so does td[class*="index-section"]. Now
the whole line is highlighted.
I added a left arrow before td[class*="index-subentry"] to differentiate
it from normal entries. The arrow can be replaced with another symbol if
you wish.
[...]