Not sure how it works for PDF documents, but for HTML it's probably this https://www.w3schools.com/howto/howto_js_collapsible.asp
I actually don't see a ToC anywhere in the link you gave me so I'm 100% sure what you are referring to. -Ben On Wednesday, September 25th, 2024 at 8:14 AM, Richard Owlett <rowl...@access.net> wrote: > On 09/25/2024 10:10 AM, Richard Owlett wrote: > > > I want a multi-level TOC which allows expanding/collapsing an entry. I > > vaguely recall having accomplished that in the past. > > > > I want to accomplish what PDF routinely does, expand/collapse TOC > > display by clicking on a caret to left of the section heading. > > > > For example, I was recently referred to > > "The beginner’s handbook / Debian without headaches". > > HTML at https://debian-beginners-handbook.tuxfamily.org/bookworm- > > en/the_beginners_handbook.html > > > It should have been [ > https://debian-beginners-handbook.tuxfamily.org/bookworm-en/the_beginners_handbook.html > ] > > > PDF at > > https://download.tuxfamily.org/debianbegin/the_beginners_handbook.pdf > > > > The PDF's index can be collapsed to 14 lines. > > The HTML index is over 25 times as long at 460 single spaced lines. > > Understand why ability to collapse a TOC/Index is attractive? > > > > I have background in neither CSS nor JavaScript. I'll need examples. > > TIA > >