diff options
author | 2018-10-02 14:56:47 +0000 | |
---|---|---|
committer | 2018-10-02 14:56:47 +0000 | |
commit | cc61d00ed522f99c9f1a34fcc6add2d202942885 (patch) | |
tree | bd523708468309e4a2f716485ca75294c2822d66 /html.h | |
parent | dfc72caad2158b1226363fe39e7bfa995ef68f78 (diff) | |
download | mandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.tar.gz mandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.tar.zst mandoc-cc61d00ed522f99c9f1a34fcc6add2d202942885.zip |
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.
Diffstat (limited to 'html.h')
-rw-r--r-- | html.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> @@ -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 <pre> */ 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 */ }; |