.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "scdoc" "5" "2022-01-01" .P .SH NAME .P scdoc - document format for writing manual pages .P .SH SYNTAX .P Input files must use the UTF-8 encoding.\& .P .SS PREAMBLE .P Each scdoc file must begin with the following preamble: .P .RS 4 \fBname\fR(\fIsection\fR) ["left_footer" ["center_header"]] .P .RE \fBname\fR is the name of the man page you are writing, and \fIsection\fR is the section you'\&re writing for (see \fBman\fR(1) for information on manual sections).\& .P \fIleft_footer\fR and \fIcenter_header\fR are optional arguments which set the text positioned at those locations in the generated man page, and \fBmust\fR be surrounded with double quotes.\& .P .SS SECTION HEADERS .P Each section of your man page should begin with something similar to the following: .P .RS 4 # HEADER NAME .P .RE Subsection headers are also understood - use two hashes.\& Each header must have an empty line on either side.\& .P .SS PARAGRAPHS .P Begin a new paragraph with an empty line.\& .P .SS LINE BREAKS .P Insert a line break by ending a line with ++.\& .P The result looks .br like this.\& .P .SS FORMATTING .P Text can be made \fBbold\fR or \fIunderlined\fR with asterisks and underscores: *bold* or _underlined_.\& Underscores in the_middle_of_words will be disregarded.\& .P .SS INDENTATION .P You may indent lines with tab characters (\fB\\t\fR) to indent them by 4 spaces in the output.\& Indented lines may not contain headers.\& .P .RS 4 The result looks something like this.\& .P You may use multiple lines and most \fIformatting\fR.\& .P .RE Deindent to return to normal, or indent again to increase your indentation depth.\& .P .SS LISTS .P You may start bulleted lists with dashes (-), like so: .P .nf .RS 4 - Item 1 - Item 2 - Subitem 1 - Subitem 2 - Item 3 .fi .RE .P The result looks like this: .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Item 1 .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Item 2 .RS 4 .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Subitem 1 .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Subitem 2 .RE .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Item 3 .RE .P You may also extend long entries onto another line by giving it the same indent level, plus two spaces.\& They will be rendered as a single list entry.\& .P .nf .RS 4 - Item 1 is pretty long so let\&'s break it up onto two lines - Item 2 is shorter - But its children can go on for a while .fi .RE .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Item 1 is pretty long so let'\&s break it up onto two lines .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} Item 2 is shorter .RS 4 .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} But its children can go on for a while .RE .P .RE .SS NUMBERED LISTS .P Numbered lists are similar to normal lists, but begin with periods (.\&) instead of dashes (-), like so: .P .nf .RS 4 \&. Item 1 \&. Item 2 \&. Item 3, with multiple lines .fi .RE .P .RS 4 .ie n \{\ \h'-04'1.\h'+03'\c .\} .el \{\ .IP 1. 4 .\} Item 1 .RE .RS 4 .ie n \{\ \h'-04'2.\h'+03'\c .\} .el \{\ .IP 2. 4 .\} Item 2 .RE .RS 4 .ie n \{\ \h'-04'3.\h'+03'\c .\} .el \{\ .IP 3. 4 .\} Item 3, with multiple lines .RE .P .SS TABLES .P To begin a table, add an empty line followed by any number of rows.\& .P Each line of a table should start with | or : to start a new row or column respectively (or space to continue the previous cell on multiple lines), followed by [ or - or ] to align the contents to the left, center, or right, followed by a space and the contents of that cell.\& You may use a space instead of an alignment specifier to inherit the alignment of the same column in the previous row.\& Each row must have the same number of columns; empty columns are permitted.\& .P The first character of the first row is not limited to | and has special meaning.\& [ will produce a table with borders around each cell.\& | will produce a table with no borders.\& ] will produce a table with one border around the whole table.\& .P To conclude your table, add an empty line after the last row.\& .P .nf .RS 4 [[ *Foo* :- _Bar_ :- | *Row 1* : Hello :] world! | *Row 2* : こんにちは : 世界 ! .fi .RE .P .TS allbox;l c c l c r l c r. T{ \fBFoo\fR T} T{ \fIBar\fR T} T{ T} T{ \fBRow 1\fR T} T{ Hello T} T{ world!\& T} T{ \fBRow 2\fR T} T{ こんにちは T} T{ 世界 !\& T} .TE .sp 1 You may also cause columns to expand to fill the available space with < (left align), = (center align), and > (right align), like so: .P .nf .RS 4 [[ *Normal column* :< Expanded column | *Foo* : Bar .fi .RE .P .TS allbox;l lx l lx. T{ \fBNormal column\fR T} T{ Expanded column T} T{ \fBFoo\fR T} T{ Bar T} .TE .sp 1 .SS LITERAL TEXT .P You may turn off scdoc formatting and output literal text with escape codes and literal blocks.\& Inserting a \\ into your source will cause the subsequent symbol to be treated as a literal and copied directly to the output.\& You may also make blocks of literal syntax like so: .P .nf .RS 4 ``` _This formatting_ will *not* be interpreted by scdoc\&. ``` .fi .RE .P These blocks will be indented one level.\& Note that literal text is shown literally in the man viewer - that is, it'\&s not a means for inserting your own roff macros into the output.\& Note that \\ is still interpreted within literal blocks, which for example can be useful to output ``` inside of a literal block.\& .P .SS COMMENTS .P Lines beginning with ; and a space are ignored.\& .P .nf .RS 4 ; This is a comment .fi .RE .P .SH CONVENTIONS .P By convention, all scdoc documents should be hard wrapped at 80 columns.\& .P .SH SEE ALSO .P \fBscdoc\fR(1) .P .SH AUTHORS .P Maintained by Drew DeVault .\& Up-to-date sources can be found at https://git.\&sr.\&ht/~sircmpwn/scdoc and bugs/patches can be submitted by email to ~sircmpwn/public-inbox@lists.\&sr.\&ht.\&