NOWEB(1)
β¨ NAME β¨
okay bestie, so this little cutie is htmltoc β it adds a table of contents to an HTML document π and yes it lives in the noweb(1) family, so you're in the right place π«Ά
πΈ SYNOPSIS πΈ
htmltoc [-2345] [file]
π DESCRIPTION π
So here's the vibe: htmltoc adds a table of contents to the HTML document β either the one you name on the command line, or the one you pipe in as standard input. Either way, she's got you π
Where does the table of contents go, you ask? It gets inserted between <tableofcontents> and </tableofcontents>, and those two markers must appear on lines by themselves, fr fr. No sneaky sharing a line with other stuff π
And listen β any text sitting between those two markers? Yeah, it's discarded. Gone. Thrown away. Deleted. Periodt π
Also good to know: those markers get inserted automatically by the sl2h(1) filter, so you usually don't have to do that part yourself β¨
By default the table of contents only includes headers at levels 2, 3, 4, and 5. But you can change that with a command-line option β for example, -123456789P to include all possible headers π
π OPTIONS π
-2345β the default header levels that get pulled into the table of contents: 2, 3, 4, and 5. Change it up by passing different digits, like-123456789Pto include all possible headers π
ngl the option syntax is "just put the level digits together" energy, so -123456789P really do be the whole flex π₯
π BUGS π
okay so here's the one thing that gives her trouble: htmltoc can't cope with a header that is split across multiple lines, even though that's totally legal HTML. Not her fault, but like, it is her fault. iykyk π
π¦ SEE ALSO π¦
β VERSION β
This man page is from noweb version 2.12 π
π AUTHOR π
Norman Ramsey, Tufts University. Internet address Norman.Ramsey@tufts.edu.
Noweb home page at http://www.cs.tufts.edu/~nr/noweb.
And shoutout to Stephen Parker, who provided a preliminary version π«Ά iconic behaviour tbh
okay that's the whole page bestie, slay π
this one's from the local build, dated 10/40/2008, and it's part of NOWEB(1) β mwah, go forth and table-of-contents responsibly πΈπβ¨
π¦ where this page comes from
- debian bookworm: noweb 2.12-4 Β· noweb OR BSD-2-Clause
- debian trixie: noweb 2.13-2 Β· noweb OR BSD-2-Clause
- nixos 26.05: noweb 2.13
- nixpkgs unstable: noweb 2.13
- ubuntu jammy: noweb 2.12-1 Β· noweb OR BSD-2-Clause
- ubuntu noble: noweb 2.12-4 Β· noweb OR BSD-2-Clause
- ubuntu questing: noweb 2.13-2
- ubuntu resolute: noweb 2.13-2build1 Β· noweb OR BSD-2-Clause
- ubuntu stonking: noweb 2.13-2build1 Β· noweb OR BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms