Subsection Table of Contents

19 views
Skip to first unread message

Anthony van Groningen

unread,
Apr 17, 2023, 7:46:34 AM4/17/23
to PreTeXt support
Hi,

I'd like to have my web output include a list of subsections (and links) at the start of each section. So something like,

Section Title
    Introduction
    * Subsection Title 1
    * Subsection Title 2
    * Subsection Title 3
Subsection 1 Starts

Is there a way to generate this currently? I'm happy to insert something at the top of each section, so long as it's dynamically generated. Or will I need to create a custom output?

Thanks for your efforts on this great project. 

Cheers,
Anthony

David W. Farmer

unread,
Apr 17, 2023, 8:23:47 AM4/17/23
to PreTeXt support

At the top of each section, or pinned to the top in the
right margin?
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> pretext-suppo...@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/pretext-support/4aee21d3-4cf9-4ad4-a814-b12fe8895c74n%40googlegroups.com
> .
>
>

Anthony van Groningen

unread,
Apr 17, 2023, 10:44:10 AM4/17/23
to PreTeXt support
Is pinning it to the top an existing option I haven't seen? I'm willing to explore that. 

But I meant within the section's text. preferably after any <introduction>.

Cheers,
A.

Rob Beezer

unread,
May 1, 2023, 11:40:05 AM5/1/23
to pretext...@googlegroups.com
Mostly for David.

I believe that all the necessary information for this feature is in the HTML
already. There is the full Table of Contents (even if we only render it to some
depth), and the division that is the page itself has a particular class value on it.

So Javascript could mine the subtree of the ToC that is approriate for the given
page? And inject the necessary HTML into the page after the "introduction" (if
that placement makes sense?).

Just as easily, the XSL could manufacture a mini-ToC as part of each page.

Feels like a toss-up from were I sit, but maybe there are good arguments for one
or the other, especially in a future with React.

Rob
> visithttps://groups.google.com/d/msgid/pretext-support/4aee21d3-4cf9-4ad4-a814-b12fe8895c74n%40googlegroups.com <http://groups.google.com/d/msgid/pretext-support/4aee21d3-4cf9-4ad4-a814-b12fe8895c74n%40googlegroups.com>
> > .
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/b187c764-9d77-4153-9557-3c9cb46ed4ffn%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/b187c764-9d77-4153-9557-3c9cb46ed4ffn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages