ron 0.2 → 0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +133 -0
- data/Rakefile +23 -9
- data/bin/ron +15 -8
- data/lib/ron.rb +1 -1
- data/lib/ron/document.rb +2 -2
- data/lib/ron/layout.html +14 -9
- data/lib/ron/roff.rb +28 -16
- data/man/markdown.5 +1614 -0
- data/man/ron.1 +226 -0
- data/man/ron.1.ron +59 -60
- data/man/ron.5 +210 -0
- data/man/ron.5.ron +35 -33
- data/man/ron.7 +201 -0
- data/man/ron.7.ron +99 -115
- data/ron.gemspec +8 -4
- data/test/ron_test.rb +10 -5
- metadata +7 -4
- data/README +0 -149
data/man/ron.1
ADDED
@@ -0,0 +1,226 @@
|
|
1
|
+
.\" generated with Ron/v0.2
|
2
|
+
.\" http://github.com/rtomayko/ron/
|
3
|
+
.
|
4
|
+
.TH "RON" "1" "December 2009" "Ryan Tomayko" "Ron Manual"
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBron\fR \-\- build markdown\-based man pages
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
\fBron\fR [ \fIOPTIONS\fR ] \fIFILE\fR ...
|
11
|
+
.
|
12
|
+
.br
|
13
|
+
\fBron\fR \-\-build \fIFILE\fR ...
|
14
|
+
.
|
15
|
+
.br
|
16
|
+
\fBron\fR \-\-install \fIFILE\fR ...
|
17
|
+
.
|
18
|
+
.br
|
19
|
+
\fBron\fR \-\-man \fIFILE\fR
|
20
|
+
.
|
21
|
+
.SH "DESCRIPTION"
|
22
|
+
Ron is a humane text format and toolchain for authoring man pages, and
|
23
|
+
things that appear as man pages from a distance. Use it to build and
|
24
|
+
install standard UNIX / roff(7) formatted man pages and to generate
|
25
|
+
nicely formatted HTML manual pages.
|
26
|
+
.
|
27
|
+
.P
|
28
|
+
The \fBron\fR command converts one or more named input \fIFILE\fRs (or standard
|
29
|
+
input when no files are named or the file name \fB\-\fR is given) from humane
|
30
|
+
man page markup to one or more destination output formats. If no output
|
31
|
+
format is selected explicitly, \fBron\fR writes output in roff format.
|
32
|
+
.
|
33
|
+
.SH "FILES"
|
34
|
+
The \fBron\fR command expects input to be formatted as ron(5) text. Source
|
35
|
+
files are typically named '\fINAME\fR.\fISECTION\fR.ron' (e.g., \fBhello.1.ron\fR).
|
36
|
+
The \fINAME\fR and \fISECTION\fR should match the name and section defined in \fIFILE\fR's heading.
|
37
|
+
.
|
38
|
+
.P
|
39
|
+
When building roff and/or HTML output files with the \fB\-\-build\fR argument,
|
40
|
+
destination filenames are determined by taking the basename of the input \fIFILE\fR and adding the appropriate file extension (or removing the file
|
41
|
+
extension in the case of roff output).
|
42
|
+
.
|
43
|
+
.P
|
44
|
+
For example, the command \fBron \-b \-\-html \-\-roff hello.1.ron\fR generates a \fBhello.1\fR file with roff output and a \fBhello.1.html\fR file with HTML
|
45
|
+
output.
|
46
|
+
.
|
47
|
+
.SH "OPTIONS"
|
48
|
+
\fBron\fR's default mode of operation is to read a single document from
|
49
|
+
standard input and to write the result to standard output. The following
|
50
|
+
arguments change this behavior:
|
51
|
+
.
|
52
|
+
.TP
|
53
|
+
\fB\-b\fR, \fB\-\-build\fR
|
54
|
+
Write output directly to files instead of standard output. When the\fB\-\-roff\fR option is provided, writes roff output to \fIfile\fR.\fIsection\fR.
|
55
|
+
When the \fB\-\-html\fR option is provided, writes output to
|
56
|
+
'\fIfile\fR.\fIsection\fR.html'.
|
57
|
+
.
|
58
|
+
.TP
|
59
|
+
\fB\-i\fR, \fB\-\-install\fR
|
60
|
+
Install the roff formatted man page to the local system such that it
|
61
|
+
can be displayed by man(1). The \fBMANHOME\fR environment variable is
|
62
|
+
used to determine the prefix where man pages should be installed
|
63
|
+
when defined.
|
64
|
+
.
|
65
|
+
.IP
|
66
|
+
If \fBMANHOME\fR is not defined, \fBron\fR installs man pages to \fI/usr/local/man\fR.
|
67
|
+
.
|
68
|
+
.TP
|
69
|
+
\fB\-m\fR, \fB\-\-man\fR
|
70
|
+
Display \fIFILE\fRs as if man(1) were invoked on the roff output file.
|
71
|
+
This simulates default man behavior by piping the roff output
|
72
|
+
through groff(1) and the paging program specified by the \fBMANPAGER\fR
|
73
|
+
environment variable.
|
74
|
+
.
|
75
|
+
.P
|
76
|
+
These options control the format used in generated output:
|
77
|
+
.
|
78
|
+
.TP
|
79
|
+
\fB\-r\fR, \fB\-\-roff\fR
|
80
|
+
Generate roff output. This is the default behavior when no other
|
81
|
+
format argument is provided.
|
82
|
+
.
|
83
|
+
.TP
|
84
|
+
\fB\-5\fR, \fB\-\-html\fR
|
85
|
+
Generate output in HTML format.
|
86
|
+
.
|
87
|
+
.TP
|
88
|
+
\fB\-f\fR, \fB\-\-fragment\fR
|
89
|
+
Generate output in HTML format but only the document fragment, not
|
90
|
+
the header, title, or footer.
|
91
|
+
.
|
92
|
+
.P
|
93
|
+
All document attributes displayed in the header and footer areas of
|
94
|
+
generated content can be specified with these options:
|
95
|
+
.
|
96
|
+
.TP
|
97
|
+
\fB\-\-manual\fR=\fIMANUAL\fR
|
98
|
+
The name of the manual this man page belongs to; \fIMANUAL\fR is
|
99
|
+
prominently displayed top\-center in the header area.
|
100
|
+
.
|
101
|
+
.TP
|
102
|
+
\fB\-\-organization\fR=\fINAME\fR
|
103
|
+
The name of the group, organization, or individual responsible for
|
104
|
+
publishing the document; \fINAME\fR is displayed in the bottom\-left
|
105
|
+
footer area.
|
106
|
+
.
|
107
|
+
.TP
|
108
|
+
\fB\-\-date\fR=\fIDATE\fR
|
109
|
+
The document's published date; \fIDATE\fR must be formatted \fBYYYY\-MM\-DD\fR
|
110
|
+
and is displayed in the bottom\-center footer area. The \fIFILE\fR mtime
|
111
|
+
is used when no \fIDATE\fR is given, or the current time when no \fIFILE\fR
|
112
|
+
is available.
|
113
|
+
.
|
114
|
+
.SH "EXAMPLES"
|
115
|
+
Generate \fBroff(7)\fR output on stdout:
|
116
|
+
.
|
117
|
+
.IP "" 4
|
118
|
+
.
|
119
|
+
.nf
|
120
|
+
|
121
|
+
$ ron < hello.1.ron
|
122
|
+
.
|
123
|
+
.fi
|
124
|
+
.
|
125
|
+
.IP "" 0
|
126
|
+
.
|
127
|
+
.P
|
128
|
+
Build a roff file based on the input filename:
|
129
|
+
.
|
130
|
+
.IP "" 4
|
131
|
+
.
|
132
|
+
.nf
|
133
|
+
|
134
|
+
$ ron \-b hello.1.ron
|
135
|
+
building: hello.1
|
136
|
+
$ man hello.1
|
137
|
+
.
|
138
|
+
.fi
|
139
|
+
.
|
140
|
+
.IP "" 0
|
141
|
+
.
|
142
|
+
.P
|
143
|
+
Build and open a standalone HTML file based on the input filename:
|
144
|
+
.
|
145
|
+
.IP "" 4
|
146
|
+
.
|
147
|
+
.nf
|
148
|
+
|
149
|
+
$ ron \-b \-\-html test.1.ron
|
150
|
+
$ open test.1.html
|
151
|
+
.
|
152
|
+
.fi
|
153
|
+
.
|
154
|
+
.IP "" 0
|
155
|
+
.
|
156
|
+
.P
|
157
|
+
Build roff and HTML versions of all \fB.ron\fR files in the current
|
158
|
+
directory:
|
159
|
+
.
|
160
|
+
.IP "" 4
|
161
|
+
.
|
162
|
+
.nf
|
163
|
+
|
164
|
+
$ ron \-b \-\-roff \-\-html *.ron
|
165
|
+
building: hello.1
|
166
|
+
building: hello.1.html
|
167
|
+
building: world.1
|
168
|
+
building: world.1.html
|
169
|
+
.
|
170
|
+
.fi
|
171
|
+
.
|
172
|
+
.IP "" 0
|
173
|
+
.
|
174
|
+
.P
|
175
|
+
View a ron file in the same way as man(1) without building a roff file:
|
176
|
+
.
|
177
|
+
.IP "" 4
|
178
|
+
.
|
179
|
+
.nf
|
180
|
+
|
181
|
+
$ ron \-m hello.1.ron
|
182
|
+
.
|
183
|
+
.fi
|
184
|
+
.
|
185
|
+
.IP "" 0
|
186
|
+
.
|
187
|
+
.P
|
188
|
+
Install the roff man page for a ron file:
|
189
|
+
.
|
190
|
+
.IP "" 4
|
191
|
+
.
|
192
|
+
.nf
|
193
|
+
|
194
|
+
$ ron \-i hello.1.ron
|
195
|
+
.
|
196
|
+
.fi
|
197
|
+
.
|
198
|
+
.IP "" 0
|
199
|
+
.
|
200
|
+
.SH "ENVIRONMENT"
|
201
|
+
.
|
202
|
+
.TP
|
203
|
+
\fBMANHOME\fR
|
204
|
+
Location where roff formatted man pages are installed. Relevant
|
205
|
+
only when the \fB\-\-install\fR argument is provided. \fIPATH\fR is to the
|
206
|
+
base of a man file hierarchy. e.g., \fB/usr/local/share/man\fR, \fB/home/rtomayko/man\fR.
|
207
|
+
.
|
208
|
+
.TP
|
209
|
+
\fBMANPAGER\fR
|
210
|
+
The paging program used for man pages. This is typically set to
|
211
|
+
something like 'less \-is'.
|
212
|
+
.
|
213
|
+
.TP
|
214
|
+
\fBPAGER\fR
|
215
|
+
Used instead of \fBMANPAGER\fR when \fBMANPAGER\fR is not defined.
|
216
|
+
.
|
217
|
+
.SH "BUGS"
|
218
|
+
Ron is written in Ruby and depends on nokogiri and rdiscount, native
|
219
|
+
extension libraries that are non\-trivial to install on some systems. A
|
220
|
+
more portable version of this program would be welcome.
|
221
|
+
.
|
222
|
+
.SH "COPYRIGHT"
|
223
|
+
Ron is Copyright (C) 2009 Ryan Tomayko <tomayko.com/about>
|
224
|
+
.
|
225
|
+
.SH "SEE ALSO"
|
226
|
+
ron(5), markdown(5), manpages(5), man(1), roff(7), groff(1)
|
data/man/ron.1.ron
CHANGED
@@ -3,97 +3,96 @@ ron(1) -- build markdown-based man pages
|
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`ron` [ <OPTIONS> ]
|
6
|
+
`ron` [ <OPTIONS> ] <FILE> ...
|
7
7
|
`ron` --build <FILE> ...
|
8
8
|
`ron` --install <FILE> ...
|
9
9
|
`ron` --man <FILE>
|
10
10
|
|
11
11
|
## DESCRIPTION
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
Ron is a humane text format and toolchain for authoring man pages, and
|
14
|
+
things that appear as man pages from a distance. Use it to build and
|
15
|
+
install standard UNIX / roff(7) formatted man pages and to generate
|
16
|
+
nicely formatted HTML manual pages.
|
17
17
|
|
18
|
-
The `ron` command converts one or more named input <FILE>s
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
writes output in roff format.
|
18
|
+
The `ron` command converts one or more named input <FILE>s (or standard
|
19
|
+
input when no files are named or the file name `-` is given) from humane
|
20
|
+
man page markup to one or more destination output formats. If no output
|
21
|
+
format is selected explicitly, `ron` writes output in roff format.
|
23
22
|
|
24
23
|
## FILES
|
25
24
|
|
26
|
-
The `ron` command expects input to be formatted as ron(5) text.
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
The `ron` command expects input to be formatted as ron(5) text. Source
|
26
|
+
files are typically named '<NAME>.<SECTION>.ron' (e.g., `hello.1.ron`).
|
27
|
+
The <NAME> and <SECTION> should match the name and section defined in
|
28
|
+
<FILE>'s heading.
|
30
29
|
|
31
|
-
When building roff and/or HTML output files with the `--build`
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
When building roff and/or HTML output files with the `--build` argument,
|
31
|
+
destination filenames are determined by taking the basename of the input
|
32
|
+
<FILE> and adding the appropriate file extension (or removing the file
|
33
|
+
extension in the case of roff output).
|
35
34
|
|
36
|
-
For example, the command `ron -b --html --roff hello.1.ron`
|
37
|
-
|
38
|
-
|
35
|
+
For example, the command `ron -b --html --roff hello.1.ron` generates a
|
36
|
+
`hello.1` file with roff output and a `hello.1.html` file with HTML
|
37
|
+
output.
|
39
38
|
|
40
39
|
## OPTIONS
|
41
40
|
|
42
|
-
`
|
43
|
-
standard input and to write the
|
44
|
-
|
41
|
+
`ron`'s default mode of operation is to read a single document from
|
42
|
+
standard input and to write the result to standard output. The following
|
43
|
+
arguments change this behavior:
|
45
44
|
|
46
45
|
* `-b`, `--build`:
|
47
|
-
Write output directly to files instead of standard output. When
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
Write output directly to files instead of standard output. When the
|
47
|
+
`--roff` option is provided, writes roff output to <file>.<section>.
|
48
|
+
When the `--html` option is provided, writes output to
|
49
|
+
'<file>.<section>.html'.
|
51
50
|
|
52
51
|
* `-i`, `--install`:
|
53
|
-
Install the roff formatted man page to the local system such
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
Install the roff formatted man page to the local system such that it
|
53
|
+
can be displayed by man(1). The `MANHOME` environment variable is
|
54
|
+
used to determine the prefix where man pages should be installed
|
55
|
+
when defined.
|
57
56
|
|
58
57
|
If `MANHOME` is not defined, `ron` installs man pages to
|
59
58
|
_/usr/local/man_.
|
60
59
|
|
61
60
|
* `-m`, `--man`:
|
62
|
-
Display <FILE>s as if man(1) were invoked on the roff output
|
63
|
-
|
64
|
-
|
65
|
-
|
61
|
+
Display <FILE>s as if man(1) were invoked on the roff output file.
|
62
|
+
This simulates default man behavior by piping the roff output
|
63
|
+
through groff(1) and the paging program specified by the `MANPAGER`
|
64
|
+
environment variable.
|
66
65
|
|
67
66
|
These options control the format used in generated output:
|
68
67
|
|
69
68
|
* `-r`, `--roff`:
|
70
|
-
Generate roff output. This is the default behavior when no
|
71
|
-
|
69
|
+
Generate roff output. This is the default behavior when no other
|
70
|
+
format argument is provided.
|
72
71
|
|
73
72
|
* `-5`, `--html`:
|
74
73
|
Generate output in HTML format.
|
75
74
|
|
76
75
|
* `-f`, `--fragment`:
|
77
|
-
Generate output in HTML format but only the document
|
78
|
-
|
76
|
+
Generate output in HTML format but only the document fragment, not
|
77
|
+
the header, title, or footer.
|
79
78
|
|
80
|
-
All document attributes displayed in the header and footer areas
|
81
|
-
|
79
|
+
All document attributes displayed in the header and footer areas of
|
80
|
+
generated content can be specified with these options:
|
82
81
|
|
83
82
|
* `--manual`=<MANUAL>:
|
84
83
|
The name of the manual this man page belongs to; <MANUAL> is
|
85
84
|
prominently displayed top-center in the header area.
|
86
85
|
|
87
86
|
* `--organization`=<NAME>:
|
88
|
-
The name of the group, organization, or individual
|
89
|
-
|
90
|
-
|
87
|
+
The name of the group, organization, or individual responsible for
|
88
|
+
publishing the document; <NAME> is displayed in the bottom-left
|
89
|
+
footer area.
|
91
90
|
|
92
91
|
* `--date`=<DATE>:
|
93
|
-
The document's published date; <DATE> must be formatted
|
94
|
-
|
95
|
-
|
96
|
-
|
92
|
+
The document's published date; <DATE> must be formatted `YYYY-MM-DD`
|
93
|
+
and is displayed in the bottom-center footer area. The <FILE> mtime
|
94
|
+
is used when no <DATE> is given, or the current time when no <FILE>
|
95
|
+
is available.
|
97
96
|
|
98
97
|
## EXAMPLES
|
99
98
|
|
@@ -121,8 +120,7 @@ directory:
|
|
121
120
|
building: world.1
|
122
121
|
building: world.1.html
|
123
122
|
|
124
|
-
View a ron file in the same way as man(1) without building a roff
|
125
|
-
file:
|
123
|
+
View a ron file in the same way as man(1) without building a roff file:
|
126
124
|
|
127
125
|
$ ron -m hello.1.ron
|
128
126
|
|
@@ -133,26 +131,27 @@ Install the roff man page for a ron file:
|
|
133
131
|
## ENVIRONMENT
|
134
132
|
|
135
133
|
* `MANHOME`:
|
136
|
-
Location where roff formatted man pages
|
137
|
-
|
138
|
-
|
139
|
-
`/
|
134
|
+
Location where roff formatted man pages are installed. Relevant
|
135
|
+
only when the `--install` argument is provided. <PATH> is to the
|
136
|
+
base of a man file hierarchy. e.g., `/usr/local/share/man`,
|
137
|
+
`/home/rtomayko/man`.
|
140
138
|
|
141
139
|
* `MANPAGER`:
|
142
|
-
The paging program used for man pages. This is typically set
|
143
|
-
|
140
|
+
The paging program used for man pages. This is typically set to
|
141
|
+
something like 'less -is'.
|
144
142
|
|
145
143
|
* `PAGER`:
|
146
144
|
Used instead of `MANPAGER` when `MANPAGER` is not defined.
|
147
145
|
|
148
146
|
## BUGS
|
149
147
|
|
150
|
-
Ron is written in Ruby
|
151
|
-
|
148
|
+
Ron is written in Ruby and depends on nokogiri and rdiscount, native
|
149
|
+
extension libraries that are non-trivial to install on some systems. A
|
150
|
+
more portable version of this program would be welcome.
|
152
151
|
|
153
152
|
## COPYRIGHT
|
154
153
|
|
155
|
-
|
154
|
+
Ron is Copyright (C) 2009 Ryan Tomayko <tomayko.com/about>
|
156
155
|
|
157
156
|
## SEE ALSO
|
158
157
|
|
data/man/ron.5
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
.\" generated with Ron/v0.2
|
2
|
+
.\" http://github.com/rtomayko/ron/
|
3
|
+
.
|
4
|
+
.TH "RON" "5" "December 2009" "Ryan Tomayko" "Ron Manual"
|
5
|
+
.
|
6
|
+
.SH "NAME"
|
7
|
+
\fBron\fR \-\- humane manual page authoring format
|
8
|
+
.
|
9
|
+
.SH "SYNOPSIS"
|
10
|
+
A basic manual page in Ron:
|
11
|
+
.
|
12
|
+
.IP "" 4
|
13
|
+
.
|
14
|
+
.nf
|
15
|
+
|
16
|
+
name(1) \-\- one sentence description
|
17
|
+
===================================
|
18
|
+
## SECTION HEADING
|
19
|
+
|
20
|
+
A normal paragraph. This can span multiple lines and is
|
21
|
+
terminated with two or more line endings \-\- just like
|
22
|
+
Markdown.
|
23
|
+
|
24
|
+
## INLINE MARKUP
|
25
|
+
|
26
|
+
Inline markup is used for `code` and `user input` (displayed
|
27
|
+
in boldface), and also <variables> or _emphasis_.
|
28
|
+
|
29
|
+
Manual page references like sh(1), markdown(5), roff(7), etc.
|
30
|
+
are displayed in boldface and hyperlinked in HTML output.
|
31
|
+
|
32
|
+
## DEFINITION LISTS
|
33
|
+
|
34
|
+
Definition lists are used to define options, arguments,
|
35
|
+
variables, and other type of terms:
|
36
|
+
|
37
|
+
* `\-a`, `\-\-arg1`=[_OPTION_]:
|
38
|
+
One or more paragraphs describing the argument.
|
39
|
+
* `\-b`, `\-\-arg2`:
|
40
|
+
Any number of these may be specified and may
|
41
|
+
be nested.
|
42
|
+
.
|
43
|
+
.fi
|
44
|
+
.
|
45
|
+
.IP "" 0
|
46
|
+
.
|
47
|
+
.SH "DESCRIPTION"
|
48
|
+
Ron files are simple ascii texts that document things in the
|
49
|
+
style of UNIX man pages but with a syntax and feature\-set less
|
50
|
+
insane than that of roff(7). Ron files are piped through ron(1)
|
51
|
+
to build and install traditional roff(7) man pages or to generate
|
52
|
+
hyperlinked HTML documentation.
|
53
|
+
.
|
54
|
+
.P
|
55
|
+
All ron formatted files must conform to a simple subset of
|
56
|
+
markdown(5), a humane text markup designed for writing on the
|
57
|
+
web. It is neither possible nor desirable to express many of
|
58
|
+
roff(7)'s complex typesetting features in ron.
|
59
|
+
.
|
60
|
+
.SH "MANPAGE TITLE"
|
61
|
+
All man pages have a \fIname\fR, belong to a \fIsection\fR, and have a
|
62
|
+
single sentence \fItagline\fR (useless but witty, preferably). Ron
|
63
|
+
files must begin with a first\-level heading that includes all of
|
64
|
+
this information. For example, this very man page begins:
|
65
|
+
.
|
66
|
+
.IP "" 4
|
67
|
+
.
|
68
|
+
.nf
|
69
|
+
|
70
|
+
ron(5) \-\- humane manual page authoring format
|
71
|
+
=============================================
|
72
|
+
.
|
73
|
+
.fi
|
74
|
+
.
|
75
|
+
.IP "" 0
|
76
|
+
.
|
77
|
+
.P
|
78
|
+
Here, we're saying that the man page documents a thing named\fBron\fR in manual section \fB5\fR (the "file formats" section; see
|
79
|
+
manpages(5) for full section list) and that's quickly described
|
80
|
+
as a "humane manual page authoring format".
|
81
|
+
.
|
82
|
+
.P
|
83
|
+
These bits of information are used to fill in the document
|
84
|
+
header, to create the \fBNAME\fR section, and also to establish
|
85
|
+
output filenames when processed with ron(1).
|
86
|
+
.
|
87
|
+
.SH "SECTION HEADINGS"
|
88
|
+
Man section headings are expressed with markdown level two
|
89
|
+
headings. markdown(5) provides two syntaxes for level two
|
90
|
+
headings. A hash prefix syntax:
|
91
|
+
.
|
92
|
+
.IP "" 4
|
93
|
+
.
|
94
|
+
.nf
|
95
|
+
|
96
|
+
## HEADING TEXT
|
97
|
+
.
|
98
|
+
.fi
|
99
|
+
.
|
100
|
+
.IP "" 0
|
101
|
+
.
|
102
|
+
.P
|
103
|
+
Or, a dash underline syntax:
|
104
|
+
.
|
105
|
+
.IP "" 4
|
106
|
+
.
|
107
|
+
.nf
|
108
|
+
|
109
|
+
HEADING TEXT
|
110
|
+
\-\-\-\-\-\-\-\-\-\-\-\-
|
111
|
+
.
|
112
|
+
.fi
|
113
|
+
.
|
114
|
+
.IP "" 0
|
115
|
+
.
|
116
|
+
.P
|
117
|
+
Section headings should be in all uppercase and may not contain
|
118
|
+
other inline markup.
|
119
|
+
.
|
120
|
+
.P
|
121
|
+
Most manual pages include at least one of the \fBSYNOPSIS\fR, \fBDESCRIPTION\fR, and/or \fBOPTIONS\fR sections. Additional sections
|
122
|
+
commonly included are \fBSYNTAX\fR, \fBENVIRONMENT\fR, \fBHISTORY\fR, \fBRETURN
|
123
|
+
VALUES\fR, \fBBUGS\fR, \fBSECURITY CONSIDERATIONS\fR, \fBSTANDARDS\fR / \fBCONFORMING TO\fR, \fBAUTHOR\fR, and \fBCOPYRIGHT\fR. Finally, most man
|
124
|
+
pages end with a \fBSEE ALSO\fR section that references other manual
|
125
|
+
pages and external documents.
|
126
|
+
.
|
127
|
+
.SH "INLINE MARKUP"
|
128
|
+
Man pages have a limited set of text formatting capabilities at
|
129
|
+
their disposal. There's basically \fBboldface\fR and \fIitalics\fR (often displayed using \fIunderline\fR). Ron uses
|
130
|
+
the following bits of markdown(5) to accomplish this:
|
131
|
+
.
|
132
|
+
.TP
|
133
|
+
\fB`backticks`\fR
|
134
|
+
Code, flags, commands, and noun\-like things; typically
|
135
|
+
displayed in in \fBboldface\fR. Note that all text included
|
136
|
+
within \fBbackticks\fR is displayed literally; other inline markup
|
137
|
+
is not processed.
|
138
|
+
.
|
139
|
+
.TP
|
140
|
+
\fB**double\-stars**\fR
|
141
|
+
Like \fBbackticks\fR but inline markup is processed.
|
142
|
+
.
|
143
|
+
.TP
|
144
|
+
\fB_\fR\fIunderbars\fR\fB_\fR
|
145
|
+
User\-specified arguments, variables, or user input; typically
|
146
|
+
displayed with \fIunderline\fR.
|
147
|
+
.
|
148
|
+
.TP
|
149
|
+
\fB<angle\-quotes>\fR
|
150
|
+
Same as \fIunderbars\fR. This is not compatible with Markdown.
|
151
|
+
.
|
152
|
+
.P
|
153
|
+
Here is grep(1)'s DESCRIPTION section represented in \fBron\fR:
|
154
|
+
.
|
155
|
+
.IP "" 4
|
156
|
+
.
|
157
|
+
.nf
|
158
|
+
|
159
|
+
`Grep` searches the named input _FILE_ (or standard input if
|
160
|
+
no files are named, or the file name `\-` is given) for lines
|
161
|
+
containing a match to the given _PATTERN_. By default, `grep`
|
162
|
+
prints the matching lines.
|
163
|
+
.
|
164
|
+
.fi
|
165
|
+
.
|
166
|
+
.IP "" 0
|
167
|
+
.
|
168
|
+
.SH "DEFINITION LISTS"
|
169
|
+
Because definition lists are so often used in manual pages to
|
170
|
+
describe arguments, options, and variables, the basic markdown(5)
|
171
|
+
list syntax has been extended to support a definition list
|
172
|
+
syntax.
|
173
|
+
.
|
174
|
+
.P
|
175
|
+
Definition list syntax is exactly the same as markdown(5)'s
|
176
|
+
unordered list syntax but requires that the first line of each
|
177
|
+
list item be terminated with a colon "\fB:\fR". The first line (minus
|
178
|
+
the colon) is the \fIterm\fR; subsequent lines may be comprised of
|
179
|
+
multiple paragraphs, code blocks, standard lists, and nested
|
180
|
+
definition lists.
|
181
|
+
.
|
182
|
+
.P
|
183
|
+
An example definition list, taken from BSD test(1)'s\fBDESCRIPTION\fR section:
|
184
|
+
.
|
185
|
+
.IP "" 4
|
186
|
+
.
|
187
|
+
.nf
|
188
|
+
|
189
|
+
The following primaries are used to construct expressions:
|
190
|
+
* `\-b` _file_:
|
191
|
+
True if _file_ exists and is a block special file.
|
192
|
+
|
193
|
+
* `\-c` _file_:
|
194
|
+
True if _file_ exists and is a character special file.
|
195
|
+
|
196
|
+
* `\-d` _file_:
|
197
|
+
True if file exists and is a directory.
|
198
|
+
.
|
199
|
+
.fi
|
200
|
+
.
|
201
|
+
.IP "" 0
|
202
|
+
.
|
203
|
+
.P
|
204
|
+
The definition list syntax is intentionally backward compatible
|
205
|
+
with markdown(5)'s list syntax. This allows \fBron\fR documents to be
|
206
|
+
piped through normal markdown processors with minor degradation
|
207
|
+
in output formatting.
|
208
|
+
.
|
209
|
+
.SH "SEE ALSO"
|
210
|
+
ron(1), markdown(5), manpages(5)
|