From eef08108838f598353f0aabf1c4f583b8355752a Mon Sep 17 00:00:00 2001 From: Simon Branch Date: Fri, 31 Dec 2021 17:57:10 -0800 Subject: [PATCH] scdoc.5: fix capitalization of subsection headers In most manpages, section headers (.SH) are set in all caps while subsection headers (.SS) are simply capitalized. For example, on my system: $ zgrep -lE '^\.SS [A-Z][a-z ]+$' /usr/share/man/man1/*.1.gz | wc -l 154 $ zgrep -lE '^\.SS [A-Z ]+$' /usr/share/man/man1/*.1.gz | wc -l 31 (Also, from my perspective, the less SCREAMING CASE the better. It's fine when the text is outdented by 8 spaces (.SH), but becomes more irritating when it's outdented by 4.) --- scdoc.5.scd | 22 +++++++++++----------- diff --git a/scdoc.5.scd b/scdoc.5.scd index 7c7071b0e3f21824cdf01226f77c87e31f43fec7..84e456bb7b21eec7b0cf679851ff52f579762b99 100644 --- a/scdoc.5.scd +++ b/scdoc.5.scd @@ -8,7 +8,7 @@ # SYNTAX Input files must use the UTF-8 encoding. -## PREAMBLE +## Preamble Each scdoc file must begin with the following preamble: @@ -21,7 +21,7 @@ _left\_footer_ and _center\_header_ are optional arguments which set the text positioned at those locations in the generated man page, and *must* be surrounded with double quotes. -## SECTION HEADERS +## Section headers Each section of your man page should begin with something similar to the following: @@ -31,23 +31,23 @@ Subsection headers are also understood - use two hashes. Each header must have an empty line on either side. -## PARAGRAPHS +## Paragraphs Begin a new paragraph with an empty line. -## LINE BREAKS +## Line breaks Insert a line break by ending a line with \+\+. The result looks++ like this. -## FORMATTING +## Formatting Text can be made *bold* or _underlined_ with asterisks and underscores: \*bold\* or \_underlined\_. Underscores in the_middle_of_words will be disregarded. -## INDENTATION +## Indentation You may indent lines with tab characters (*\\t*) to indent them by 4 spaces in the output. Indented lines may not contain headers. @@ -59,7 +59,7 @@ Deindent to return to normal, or indent again to increase your indentation depth. -## LISTS +## Lists You may start bulleted lists with dashes (-), like so: @@ -96,7 +96,7 @@ - Item 2 is shorter - But its children can go on for a while -## NUMBERED LISTS +## Numbered lists Numbered lists are similar to normal lists, but begin with periods (.) instead of dashes (-), like so: @@ -113,7 +113,7 @@ . Item 2 . Item 3, with multiple lines -## TABLES +## Tables To begin a table, add an empty line followed by any number of rows. @@ -171,7 +171,7 @@ :< Expanded column | *Foo* : Bar -## LITERAL TEXT +## Literal text 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 @@ -190,7 +190,7 @@ 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. -## COMMENTS +## Comments Lines beginning with ; and a space are ignored. -- 2.48.1