From cc61d00ed522f99c9f1a34fcc6add2d202942885 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 2 Oct 2018 14:56:47 +0000 Subject: Add an option -T html -O toc to add a brief table of contents near the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018. --- html.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'html.h') diff --git a/html.h b/html.h index 606dd76d..5f3c5ebe 100644 --- a/html.h +++ b/html.h @@ -1,4 +1,4 @@ -/* $Id: html.h,v 1.93 2018/10/02 12:33:37 schwarze Exp $ */ +/* $Id: html.h,v 1.94 2018/10/02 14:56:47 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2017, 2018 Ingo Schwarze @@ -93,6 +93,7 @@ struct html { #define HTML_SPLIT (1 << 8) /* break line before .An */ #define HTML_NONEWLINE (1 << 9) /* No line break in nofill mode. */ #define HTML_BUFFER (1 << 10) /* Collect a word to see if it fits. */ +#define HTML_TOCDONE (1 << 11) /* The TOC was already written. */ size_t indent; /* current output indentation level */ int noindent; /* indent disabled by
 */
 	size_t		  col; /* current output byte position */
@@ -110,6 +111,7 @@ struct	html {
 	enum htmlfont	  metac; /* current font mode */
 	int		  oflags; /* output options */
 #define	HTML_FRAGMENT	 (1 << 0) /* don't emit HTML/HEAD/BODY */
+#define	HTML_TOC	 (1 << 1) /* emit a table of contents */
 };
 
 
-- 
cgit v1.2.3-56-ge451