.\" Generated by mkdoc on July, 2016
.TH "MKTOC" "1" "July, 2016" "mktoc 1.0.8" "User Commands"
.de nl
.sp 0
..
.de hr
.sp 1
.nf
.ce
.in 4
\l’80’
.fi
..
.de h1
.RE
.sp 1
\fB\\$1\fR
.RS 4
..
.de h2
.RE
.sp 1
.in 4
\fB\\$1\fR
.RS 6
..
.de h3
.RE
.sp 1
.in 6
\fB\\$1\fR
.RS 8
..
.de h4
.RE
.sp 1
.in 8
\fB\\$1\fR
.RS 10
..
.de h5
.RE
.sp 1
.in 10
\fB\\$1\fR
.RS 12
..
.de h6
.RE
.sp 1
.in 12
\fB\\$1\fR
.RS 14
..
.h1 "NAME"
.P
mktoc \- generates a table of contents index
.nl
.h1 "SYNOPSIS"
.P
mktoc [\-Dosh] [\-\-disable] [\-\-ordered] [\-\-standalone] [\-\-help] [\-\-version]
.br
      [\-\-title=<title>] [\-\-level=<num>] [\-\-depth=<level>] [\-\-max=<level>]
.br
      [\-\-prefix=<val>] [\-\-base=<url>] [\-\-bullet=<char>] [\-\-delimiter=<char>]
.nl
.h1 "OPTIONS"
.TP
\fB\-t, \-\-title\fR=[\fITITLE\fR]
 Set initial heading
.nl
.TP
\fB\-l, \-\-level\fR=[\fINUM\fR]
 Set level for initial heading
.nl
.TP
\fB\-d, \-\-depth\fR=[\fILEVEL\fR]
 Ignore headings below LEVEL
.nl
.TP
\fB\-m, \-\-max\fR=[\fILEVEL\fR]
 Ignore headings above LEVEL
.nl
.TP
\fB\-p, \-\-prefix\fR=[\fIVAL\fR]
 Set link destination prefix to VAL
.nl
.TP
\fB\-b, \-\-base\fR=[\fIURL\fR]
 Base URL for absolute links
.nl
.TP
\fB\-B, \-\-bullet\fR=[\fICHAR\fR]
 Character for bullet lists
.nl
.TP
\fB\-E, \-\-delimiter\fR=[\fICHAR\fR]
 Delimiter for ordered lists
.nl
.TP
\fB\-D, \-\-disable\fR
 Disable automatic links
.nl
.TP
\fB\-o, \-\-ordered\fR
 Create an ordered list
.nl
.TP
\fB\-s, \-\-standalone\fR
 Standalone index, discards input
.nl
.TP
\fB\-h, \-\-help\fR
 Display help and exit
.nl
.TP
\fB\-\-version\fR
 Print the version and exit
.nl
.h1 "EXAMPLE"
.P
Create a standalone table of contents:
.nl
.PP
.in 12
mkcat README.md | mktoc \-s | mkout > TOC.md
.P
Inject the table of contents into a document containing the \fB<!\-\- @toc \-\->\fR marker:
.nl
.PP
.in 12
mkcat readme.md | mktoc | mkout > README.md
.P
Set an initial heading with the specified level:
.nl
.PP
.in 12
mkcat readme.md | mktoc \-\-title 'Table of Contents' \-\-level 2 | mkout > README.md
.P
Only include headings for levels 2\-4:
.nl
.PP
.in 12
mkcat readme.md | mktoc \-d 2 \-m 4 | mkout > README.md
.P
Create an ordered list and set the delimiter:
.nl
.PP
.in 12
mkcat readme.md | mktoc \-o \-E '.' | mkout > README.md