bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @subentry, @seealso and @seenentry better formatted in HTML


From: Per Bothner
Subject: Re: @subentry, @seealso and @seenentry better formatted in HTML
Date: Sun, 20 Nov 2022 13:35:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

Looking at the latest checkins, I suggest replacing:

          /* Scan links that should be added to the index.  */
          var index_links = document.querySelectorAll
            ("td.printindex-index-entry a");

by:

          /* Scan links that should be added to the index.  */
          var index_links = document.querySelectorAll
            ("td.printindex-index-entry");

and passing the td elements to cache_index_links.

The latter can then do the apropriate logic to deal with entries and subentries:
(1) Keep tack of most recent level-0 and level-1 entries.
(2) If there is a child/grand-child <a> element, check to see if it is level-1 
or level-2 entry,
If so prepend the saved level-0 and level-2 text (followed by ", ") to the link 
text.
Then add the entry to the dictionary.

I can implement this once the output is stable.

Before I do that, I suggest cleaning up the generated html a bit, as discussed:
- Get rid of the dummy <td></td> table cells used for indentation.
- Get rid of the extra <span class="index-entry-level-1"> elements. Move the 
class="index-entry-level-1"
  to either the <td> element (preferably) or the <a> element.
- Consider getting rid of empty <td class="printindex-index-section"></td> 
elements, or
  at least removing the class attribute. (Whichever is preferable may depend on 
the line
  is styled, such as when table borders are added.)
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]