ronn 0.5 → 0.6.0
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/AUTHORS +7 -0
- data/CHANGES +128 -0
- data/README.md +64 -79
- data/Rakefile +81 -28
- data/bin/ronn +124 -65
- data/config.ru +15 -0
- data/lib/ronn.rb +13 -5
- data/lib/ronn/document.rb +87 -13
- data/lib/ronn/roff.rb +43 -18
- data/lib/ronn/server.rb +70 -0
- data/lib/ronn/template.rb +157 -0
- data/lib/ronn/template/80c.css +6 -0
- data/lib/ronn/template/dark.css +21 -0
- data/lib/ronn/template/darktoc.css +17 -0
- data/lib/ronn/template/default.html +43 -0
- data/lib/ronn/template/man.css +100 -0
- data/lib/ronn/template/print.css +5 -0
- data/lib/ronn/template/screen.css +105 -0
- data/lib/ronn/template/toc.css +27 -0
- data/man/ronn.1 +160 -93
- data/man/ronn.1.ronn +206 -89
- data/man/ronn.5 +94 -96
- data/man/ronn.5.ronn +96 -91
- data/man/ronn.7 +50 -84
- data/man/ronn.7.ronn +64 -79
- data/ronn.gemspec +26 -11
- data/test/angle_bracket_syntax.html +4 -1
- data/test/basic_document.html +4 -1
- data/test/contest.rb +68 -0
- data/test/custom_title_document.html +4 -1
- data/test/definition_list_syntax.html +4 -1
- data/test/definition_list_syntax.roff +26 -0
- data/test/document_test.rb +51 -4
- data/test/entity_encoding_test.html +4 -1
- data/test/entity_encoding_test.roff +1 -1
- data/test/markdown_syntax.html +955 -0
- data/test/markdown_syntax.roff +1467 -0
- data/{man/markdown.5.ronn → test/markdown_syntax.ronn} +0 -0
- data/test/middle_paragraph.html +5 -2
- data/test/middle_paragraph.roff +2 -2
- data/test/ronn_test.rb +19 -4
- data/test/section_reference_links.html +15 -0
- data/test/section_reference_links.roff +10 -0
- data/test/section_reference_links.ronn +12 -0
- data/test/titleless_document.html +3 -0
- metadata +34 -13
- data/lib/ronn/layout.html +0 -75
- data/man/markdown.5 +0 -1639
data/man/ronn.1.ronn
CHANGED
@@ -1,140 +1,257 @@
|
|
1
|
-
ronn(1) --
|
2
|
-
|
1
|
+
ronn(1) -- convert markdown files to manpages
|
2
|
+
=============================================
|
3
3
|
|
4
4
|
## SYNOPSIS
|
5
5
|
|
6
|
-
`ronn` [
|
7
|
-
`ronn`
|
8
|
-
`ronn`
|
9
|
-
`ronn`
|
6
|
+
`ronn` [<options>] <file>...<br>
|
7
|
+
`ronn` `-m`|`--man` <file>...<br>
|
8
|
+
`ronn` `-S`|`--server` <file>...<br>
|
9
|
+
`ronn` `--pipe` <file><br>
|
10
|
+
`ronn` < <file>
|
10
11
|
|
11
12
|
## DESCRIPTION
|
12
13
|
|
13
|
-
Ronn
|
14
|
-
|
15
|
-
|
16
|
-
nicely formatted HTML manual pages.
|
14
|
+
**Ronn** converts Markdown input to standard roff-formatted UNIX manpages or
|
15
|
+
manpage styled HTML. The ronn(5) source format is based on markdown(7) but
|
16
|
+
includes additional rules and syntax geared toward authoring manuals.
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
In its default mode, `ronn` converts one or more input <file>s to HTML or UNIX
|
19
|
+
roff output files. The `--roff`, `--html`, and `--fragment` options dictate
|
20
|
+
which output files are generated. Multiple format arguments may be specified to
|
21
|
+
generate multiple output files. Output files are named after and written to the
|
22
|
+
same directory as input <file>s.
|
23
|
+
|
24
|
+
The `--server` and `--man` options change the output behavior from output file
|
25
|
+
generation to serving dynamically generated HTML manpages or viewing <file> as
|
26
|
+
with man(1).
|
27
|
+
|
28
|
+
With no <file> arguments, `ronn` acts as simple filter. Ronn source text is read
|
29
|
+
from standard input and roff output is written to standard output. The `--html`
|
30
|
+
and `--fragment` options can be used to generate that format output instead of
|
31
|
+
roff.
|
22
32
|
|
23
33
|
## FILES
|
24
34
|
|
25
35
|
The `ronn` command expects input to be formatted as ronn(5) text. Source
|
26
|
-
files are typically named '<
|
27
|
-
The <
|
28
|
-
<
|
29
|
-
|
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).
|
36
|
+
files are typically named '<name>.<section>.ronn' (e.g., `example.1.ronn`).
|
37
|
+
The <name> and <section> should match the name and section defined in the
|
38
|
+
<file>'s heading.
|
34
39
|
|
35
|
-
|
36
|
-
|
37
|
-
output.
|
40
|
+
When building roff or HTML output files, destination filenames are determined by
|
41
|
+
taking the basename of the input <file> and adding the appropriate file
|
42
|
+
extension (or removing the file extension in the case of roff output). For
|
43
|
+
example, executing `ronn example.1.ronn` generates `example.1` with roff output
|
44
|
+
and `example.1.html` with HTML output.
|
38
45
|
|
39
46
|
## OPTIONS
|
40
47
|
|
41
|
-
|
42
|
-
|
43
|
-
arguments change this behavior:
|
44
|
-
|
45
|
-
* `-b`, `--build`:
|
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'.
|
50
|
-
|
51
|
-
* `-i`, `--install`:
|
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.
|
56
|
-
|
57
|
-
If `MANHOME` is not defined, `ronn` installs man pages to
|
58
|
-
_/usr/local/man_.
|
48
|
+
These options control whether output is written to files, standard output, or
|
49
|
+
directly to a man pager.
|
59
50
|
|
60
51
|
* `-m`, `--man`:
|
61
|
-
|
62
|
-
This simulates default man behavior by piping the roff output
|
52
|
+
Don't generate files, display <file>s as if man(1) were invoked on the roff
|
53
|
+
output file. This simulates default man behavior by piping the roff output
|
63
54
|
through groff(1) and the paging program specified by the `MANPAGER`
|
64
55
|
environment variable.
|
65
56
|
|
66
|
-
|
57
|
+
* `-S`, `--server`:
|
58
|
+
Don't generate files, start an HTTP server at <http://localhost:1207/> and
|
59
|
+
serve dynamically generated HTML for the set of input <file>s. A file named
|
60
|
+
*example.2.ronn* is served as */example.2.html*. There's also an index page
|
61
|
+
at the root with links to each <file>.
|
62
|
+
|
63
|
+
The server respects the `--style` and document attribute options
|
64
|
+
(`--manual`, `--date`, etc.). These same options can be varied at request
|
65
|
+
time by giving them as query parameters: `?manual=FOO&style=dark,toc`
|
66
|
+
|
67
|
+
*NOTE: The builtin server is designed to assist in the process of writing
|
68
|
+
and styling manuals. It is in no way recommended as a general purpose web
|
69
|
+
server.*
|
70
|
+
|
71
|
+
* `--pipe`:
|
72
|
+
Don't generate files, write generated output to standard output. This is the
|
73
|
+
default behavior when ronn source text is piped in on standard input and no
|
74
|
+
<file> arguments are provided.
|
75
|
+
|
76
|
+
Format options control the files `ronn` generates, or the output format when the
|
77
|
+
`--pipe` argument is specified. When no format options are given, both `--roff`
|
78
|
+
and `--html` are assumed.
|
67
79
|
|
68
80
|
* `-r`, `--roff`:
|
69
|
-
Generate roff output. This is the default behavior when no
|
70
|
-
|
81
|
+
Generate roff output. This is the default behavior when no <file>s are given
|
82
|
+
and ronn source text is read from standard input.
|
71
83
|
|
72
84
|
* `-5`, `--html`:
|
73
85
|
Generate output in HTML format.
|
74
86
|
|
75
87
|
* `-f`, `--fragment`:
|
76
|
-
Generate output in HTML format but only the document fragment, not
|
77
|
-
|
88
|
+
Generate output in HTML format but only the document fragment, not the
|
89
|
+
header, title, or footer.
|
78
90
|
|
79
|
-
|
80
|
-
|
91
|
+
Document attributes displayed in the header and footer areas of generated
|
92
|
+
content are specified with these options. (These values may also be set via
|
93
|
+
the [ENVIRONMENT][].)
|
81
94
|
|
82
|
-
* `--manual`=<
|
83
|
-
The name of the manual this man page belongs to; <
|
84
|
-
|
95
|
+
* `--manual`=<manual>:
|
96
|
+
The name of the manual this man page belongs to; <manual> is prominently
|
97
|
+
displayed top-center in the header area.
|
85
98
|
|
86
|
-
* `--organization`=<
|
99
|
+
* `--organization`=<name>:
|
87
100
|
The name of the group, organization, or individual responsible for
|
88
|
-
publishing the document; <
|
89
|
-
|
101
|
+
publishing the document; <name> is displayed in the bottom-left footer area.
|
102
|
+
|
103
|
+
* `--date`=<date>:
|
104
|
+
The document's published date; <date> must be formatted `YYYY-MM-DD` and is
|
105
|
+
displayed in the bottom-center footer area. The <file> mtime is used when no
|
106
|
+
<date> is given, or the current time when no <file> is available.
|
107
|
+
|
108
|
+
HTML output can be customized variously:
|
109
|
+
|
110
|
+
* `--style`=<module>[,<module>]...:
|
111
|
+
The list of CSS stylesheets to apply to the document. Multiple <module>
|
112
|
+
arguments may be specified, but must be separated by commas or spaces.
|
113
|
+
|
114
|
+
When <module> is a simple word, search for files named <module>`.css` in all
|
115
|
+
directories listed in the [`RONN_STYLE`](#ENVIRONMENT) environment variable,
|
116
|
+
and then search internal styles.
|
117
|
+
|
118
|
+
When <module> includes a _/_ character, use it as the full path to a
|
119
|
+
stylesheet file.
|
120
|
+
|
121
|
+
Internal styles are _man_ (included by default), _toc_, and _80c_. See
|
122
|
+
[STYLES][] for descriptions of features added by each module.
|
123
|
+
|
124
|
+
Miscellaneous options:
|
125
|
+
|
126
|
+
* `-w`, `--warnings`:
|
127
|
+
Show troff warnings on standard error when performing roff conversion.
|
128
|
+
Warnings are most often the result of a bug in ronn's HTML to roff conversion
|
129
|
+
logic.
|
130
|
+
|
131
|
+
* `-W`:
|
132
|
+
Disable troff warnings. Warnings are disabled by default. This option can be
|
133
|
+
used to revert the effect of a previous `-w` argument.
|
134
|
+
|
135
|
+
## STYLES
|
90
136
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
137
|
+
The `--style` option selects a list of CSS stylesheets to include in the
|
138
|
+
generated HTML. Styles are applied in the order defined, so each can use the
|
139
|
+
cascade to override previously defined styles.
|
140
|
+
|
141
|
+
### Internal Stylesheets
|
142
|
+
|
143
|
+
These styles are included with the distribution:
|
144
|
+
|
145
|
+
* `man`:
|
146
|
+
Basic manpage styles: typography, definition lists, indentation. This is
|
147
|
+
always included regardless of `--style` argument. It is however possible to
|
148
|
+
replace the default `man` module with a custom one by placing a `man.css`
|
149
|
+
file on the `RONN_STYLE` path.
|
150
|
+
|
151
|
+
* `print`:
|
152
|
+
Basic print stylesheet. The generated `<style>` tag includes a
|
153
|
+
`media=print` attribute.
|
154
|
+
|
155
|
+
* `toc`:
|
156
|
+
Enables the Table of Contents navigation. The TOC markup is included in
|
157
|
+
generated HTML by default but hidden with an inline `display:none` style
|
158
|
+
rule; the `toc` module turns it on and applies basic TOC styles.
|
159
|
+
|
160
|
+
* `dark`:
|
161
|
+
Light text on a dark background.
|
162
|
+
|
163
|
+
* `80c`:
|
164
|
+
Changes the display width to mimic the display of a classic 80 character
|
165
|
+
terminal. The default display width causes lines to wrap at a gratuitous
|
166
|
+
100 characters.
|
167
|
+
|
168
|
+
### Custom Stylesheets
|
169
|
+
|
170
|
+
Writing custom stylesheets is straight-forward. The following core selectors
|
171
|
+
allow targeting all generated elements:
|
172
|
+
|
173
|
+
* `.mp`:
|
174
|
+
The manual page container element. Present on full documents and document
|
175
|
+
fragments.
|
176
|
+
|
177
|
+
* `body#manpage`:
|
178
|
+
Signifies that the page was fully-generated by Ronn and contains a single
|
179
|
+
manual page (`.mp` element).
|
180
|
+
|
181
|
+
* `.man-decor`:
|
182
|
+
The three-item heading and footing elements both have this class.
|
183
|
+
|
184
|
+
* `.man-head`, `.man-foot`:
|
185
|
+
The heading and footing, respectively.
|
186
|
+
|
187
|
+
* `.man-title`:
|
188
|
+
The main `<h1>` element. Hidden by default unless the manual has no <name>
|
189
|
+
or <section> attributes.
|
190
|
+
|
191
|
+
See the [internal style sources][internal] for examples.
|
192
|
+
|
193
|
+
[internal]: http://github.com/rtomayko/ronn/tree/master/lib/ronn/template
|
194
|
+
"internal stylesheet sources"
|
96
195
|
|
97
196
|
## EXAMPLES
|
98
197
|
|
99
|
-
|
198
|
+
Build roff and HTML output files and view the roff manpage using man(1):
|
100
199
|
|
101
|
-
$ ronn
|
200
|
+
$ ronn some-great-program.1.ronn
|
201
|
+
roff: some-great-program.1
|
202
|
+
html: some-great-program.1.html
|
203
|
+
$ man ./some-great-program.1
|
102
204
|
|
103
|
-
Build
|
205
|
+
Build only the roff manpage for all `.ronn` files in the current directory:
|
104
206
|
|
105
|
-
$ ronn
|
106
|
-
|
107
|
-
|
207
|
+
$ ronn --roff *.ronn
|
208
|
+
roff: mv.1
|
209
|
+
roff: ls.1
|
210
|
+
roff: cd.1
|
211
|
+
roff: sh.1
|
108
212
|
|
109
|
-
Build
|
213
|
+
Build only the HTML manpage for a few files and apply the `dark` and `toc`
|
214
|
+
stylesheets:
|
110
215
|
|
111
|
-
$ ronn
|
112
|
-
|
216
|
+
$ ronn --html --style=dark,toc mv.1.ronn ls.1.ronn
|
217
|
+
html: mv.1.html
|
218
|
+
html: ls.1.html
|
113
219
|
|
114
|
-
|
115
|
-
directory:
|
220
|
+
Generate roff output on standard output and write to file:
|
116
221
|
|
117
|
-
$ ronn
|
118
|
-
building: hello.1
|
119
|
-
building: hello.1.html
|
120
|
-
building: world.1
|
121
|
-
building: world.1.html
|
222
|
+
$ ronn <hello.1.ronn >hello.1
|
122
223
|
|
123
224
|
View a ronn file in the same way as man(1) without building a roff file:
|
124
225
|
|
125
|
-
$ ronn
|
226
|
+
$ ronn --man hello.1.ronn
|
227
|
+
|
228
|
+
Serve HTML manpages at <http://localhost:1207/> for all `*.ronn` files
|
229
|
+
under a `man/` directory:
|
126
230
|
|
127
|
-
|
231
|
+
$ ronn --server man/*.ronn
|
232
|
+
$ open http://localhost:1207/
|
128
233
|
|
129
|
-
$ ronn -i hello.1.ronn
|
130
234
|
|
131
235
|
## ENVIRONMENT
|
132
236
|
|
133
|
-
* `
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
237
|
+
* `RONN_MANUAL`:
|
238
|
+
A default manual name to be displayed in the top-center header area.
|
239
|
+
The `--manual` option takes precedence over this value.
|
240
|
+
|
241
|
+
* `RONN_ORGANIZATION`:
|
242
|
+
The default manual publishing group, organization, or individual to be
|
243
|
+
displayed in the bottom-left footer area. The `--organization` option takes
|
244
|
+
precedence over this value.
|
245
|
+
|
246
|
+
* `RONN_DATE`:
|
247
|
+
The default manual date in `YYYY-MM-DD` format. Displayed in the
|
248
|
+
bottom-center footer area. The `--date` option takes precedence over this
|
249
|
+
value.
|
250
|
+
|
251
|
+
* `RONN_STYLE`:
|
252
|
+
A `PATH`-style list of directories to check for stylesheets given to the
|
253
|
+
`--style` option. Directories are separated by a _:_; blank entries are
|
254
|
+
ignored. Use _._ to include the current working directory.
|
138
255
|
|
139
256
|
* `MANPAGER`:
|
140
257
|
The paging program used for man pages. This is typically set to
|
@@ -145,7 +262,7 @@ Install the roff man page for a ronn file:
|
|
145
262
|
|
146
263
|
## BUGS
|
147
264
|
|
148
|
-
Ronn is written in Ruby and depends on hpricot and rdiscount, extension
|
265
|
+
**Ronn** is written in Ruby and depends on hpricot and rdiscount, extension
|
149
266
|
libraries that are non-trivial to install on some systems. A more portable
|
150
267
|
version of this program would be welcome.
|
151
268
|
|
@@ -155,4 +272,4 @@ Ronn is Copyright (C) 2009 Ryan Tomayko <tomayko.com/about>
|
|
155
272
|
|
156
273
|
## SEE ALSO
|
157
274
|
|
158
|
-
ronn(5),
|
275
|
+
ronn(5), (7), manpages(5), man(1), roff(7), groff(1), markdown(7)
|
data/man/ronn.5
CHANGED
@@ -1,89 +1,93 @@
|
|
1
|
-
.\" generated with Ronn/v0.
|
1
|
+
.\" generated with Ronn/v0.6.0
|
2
2
|
.\" http://github.com/rtomayko/ronn/
|
3
3
|
.
|
4
|
-
.TH "RONN" "5" "
|
4
|
+
.TH "RONN" "5" "June 2010" "0.6.0" "Ronn 0.6.0"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
|
-
\fBronn\fR
|
7
|
+
\fBronn\fR \- markdown\-based text format for authoring manpages
|
8
8
|
.
|
9
9
|
.SH "SYNOPSIS"
|
10
10
|
.
|
11
11
|
.nf
|
12
12
|
|
13
|
-
name(1) \-\-
|
14
|
-
|
13
|
+
name(1) \-\- short, single\-sentence description
|
14
|
+
=============================================
|
15
|
+
|
16
|
+
## SYNOPSIS
|
17
|
+
|
18
|
+
`name` [<optional>\.\.\.] <flags>
|
19
|
+
|
20
|
+
## DESCRIPTION
|
15
21
|
|
16
|
-
|
22
|
+
A normal paragraph\. This can span multiple lines and is terminated with two
|
23
|
+
or more line endings \-\- just like Markdown\.
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
|
25
|
+
Inline markup for `code`, `user input`, and **strong** are displayed
|
26
|
+
boldface; <variable>, _emphasis_, *emphasis*, are displayed in italics or
|
27
|
+
underline\.
|
21
28
|
|
22
|
-
|
29
|
+
Manual references like sh(1), markdown(7), roff(7), etc\. are displayed in
|
30
|
+
boldface and hyperlinked in HTML output\.
|
23
31
|
|
24
|
-
|
25
|
-
|
32
|
+
Link to other sections like [STANDARDS][], [SEE ALSO][], or
|
33
|
+
[WITH A DIFFERENT LINK TEXT][#SEE\-ALSO]\.
|
26
34
|
|
27
|
-
|
28
|
-
are displayed in boldface and hyperlinked in HTML output.
|
35
|
+
Definition lists:
|
29
36
|
|
30
|
-
|
37
|
+
* `\-a`, `\-\-argument`=[<value>]:
|
38
|
+
One or more paragraphs describing the argument\.
|
39
|
+
* You can put whatever you *want* here, really:
|
40
|
+
Nesting and paragraph spacing are respected\.
|
31
41
|
|
32
|
-
|
33
|
-
variables, and other type of terms:
|
42
|
+
Markdown ordered and unordered lists too\.
|
34
43
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
44
|
+
Frequently used sections:
|
45
|
+
|
46
|
+
## OPTIONS
|
47
|
+
## SYNTAX
|
48
|
+
## ENVIRONMENT
|
49
|
+
## RETURN VALUES
|
50
|
+
## STANDARDS
|
51
|
+
## SECURITY CONSIDERATIONS
|
52
|
+
## BUGS
|
53
|
+
## HISTORY
|
54
|
+
## AUTHOR
|
55
|
+
## COPYRIGHT
|
56
|
+
## SEE ALSO
|
40
57
|
.
|
41
58
|
.fi
|
42
59
|
.
|
43
60
|
.SH "DESCRIPTION"
|
44
|
-
Ronn
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
hyperlinked HTML documentation.
|
61
|
+
Ronn is a source format for authoring UNIX manpages\. The syntax includes all Markdown formatting features, plus conventions for expressing the structure and various notations present in standard UNIX manpages\.
|
62
|
+
.
|
63
|
+
.P
|
64
|
+
Ronn files can be converted to traditional roff\-formatted manpages or to HTML using the ronn(1) command\.
|
49
65
|
.
|
50
66
|
.P
|
51
|
-
|
52
|
-
markdown(5), a humane text markup designed for writing on the
|
53
|
-
web. It is neither possible nor desirable to express many of
|
54
|
-
roff(7)'s complex typesetting features in ronn.
|
67
|
+
Not all roff(7) typesetting features can be expressed using ronn syntax\.
|
55
68
|
.
|
56
69
|
.SH "MANPAGE TITLE"
|
57
|
-
|
58
|
-
single sentence \fItagline\fR (useless but witty, preferably). Ronn
|
59
|
-
files must begin with a first\-level heading that includes all of
|
60
|
-
this information. For example, this very man page begins:
|
70
|
+
Manpages have a \fIname\fR, \fIsection\fR number, and one\-line \fIdescription\fR\. Ronn files must start with a level one heading defining these attributes:
|
61
71
|
.
|
62
72
|
.IP "" 4
|
63
73
|
.
|
64
74
|
.nf
|
65
75
|
|
66
|
-
|
67
|
-
|
76
|
+
ls(1) \-\- list directory contents
|
77
|
+
================================
|
68
78
|
.
|
69
79
|
.fi
|
70
80
|
.
|
71
81
|
.IP "" 0
|
72
82
|
.
|
73
83
|
.P
|
74
|
-
|
75
|
-
manpages(5) for full section list) and that's quickly described
|
76
|
-
as a "humane manual page authoring format".
|
77
|
-
.
|
78
|
-
.P
|
79
|
-
These bits of information are used to fill in the document
|
80
|
-
header, to create the \fBNAME\fR section, and also to establish
|
81
|
-
output filenames when processed with ronn(1).
|
84
|
+
Indicates that the manpage is named \fBls\fR in manual section \fB1\fR (\"user commands\")\.
|
82
85
|
.
|
83
86
|
.SH "SECTION HEADINGS"
|
84
|
-
Man section headings are expressed with markdown level two
|
85
|
-
|
86
|
-
|
87
|
+
Man section headings are expressed with markdown level two headings\. There are two syntaxes for level two headings\.
|
88
|
+
.
|
89
|
+
.P
|
90
|
+
Hash prefix syntax:
|
87
91
|
.
|
88
92
|
.IP "" 4
|
89
93
|
.
|
@@ -96,7 +100,7 @@ headings. A hash prefix syntax:
|
|
96
100
|
.IP "" 0
|
97
101
|
.
|
98
102
|
.P
|
99
|
-
|
103
|
+
Dash underline syntax:
|
100
104
|
.
|
101
105
|
.IP "" 4
|
102
106
|
.
|
@@ -110,98 +114,92 @@ HEADING TEXT
|
|
110
114
|
.IP "" 0
|
111
115
|
.
|
112
116
|
.P
|
113
|
-
Section headings should be
|
114
|
-
other inline markup.
|
115
|
-
.
|
116
|
-
.P
|
117
|
-
Most manual pages include at least one of the \fBSYNOPSIS\fR, \fBDESCRIPTION\fR, and/or \fBOPTIONS\fR sections. Additional sections
|
118
|
-
commonly included are \fBSYNTAX\fR, \fBENVIRONMENT\fR, \fBHISTORY\fR, \fBRETURN
|
119
|
-
VALUES\fR, \fBBUGS\fR, \fBSECURITY CONSIDERATIONS\fR, \fBSTANDARDS\fR / \fBCONFORMING TO\fR, \fBAUTHOR\fR, and \fBCOPYRIGHT\fR. Finally, most man
|
120
|
-
pages end with a \fBSEE ALSO\fR section that references other manual
|
121
|
-
pages and external documents.
|
117
|
+
Section headings should be all uppercase and may not contain inline markup\.
|
122
118
|
.
|
123
119
|
.SH "INLINE MARKUP"
|
124
|
-
|
125
|
-
their disposal. There's basically \fBboldface\fR and \fIitalics\fR (often displayed using \fIunderline\fR). Ronn uses
|
126
|
-
the following bits of markdown(5) to accomplish this:
|
120
|
+
Manpages have a limited set of text formatting capabilities\. There\'s basically \fBboldface\fR and \fIitalics\fR (often displayed using \fIunderline\fR)\. Ronn uses the following bits of markdown(7) to accomplish this:
|
127
121
|
.
|
128
122
|
.TP
|
129
123
|
\fB`backticks`\fR
|
130
|
-
Code, flags, commands, and noun\-like things; typically
|
131
|
-
displayed in in \fBboldface\fR. Note that all text included
|
132
|
-
within \fBbackticks\fR is displayed literally; other inline markup
|
133
|
-
is not processed.
|
124
|
+
Code, flags, commands, and noun\-like things; typically displayed in in \fBboldface\fR\. Note that all text included within \fBbackticks\fR is displayed literally; other inline markup is not processed\.
|
134
125
|
.
|
135
126
|
.TP
|
136
127
|
\fB**double\-stars**\fR
|
137
|
-
Like \fBbackticks\fR but inline markup is processed
|
128
|
+
Like \fBbackticks\fR but inline markup is processed\.
|
138
129
|
.
|
139
130
|
.TP
|
140
131
|
\fB_\fR\fIunderbars\fR\fB_\fR
|
141
|
-
User\-specified arguments, variables, or user input; typically
|
142
|
-
displayed with \fIunderline\fR.
|
132
|
+
User\-specified arguments, variables, or user input; typically displayed with \fIunderline\fR\.
|
143
133
|
.
|
144
134
|
.TP
|
145
135
|
\fB<angle\-quotes>\fR
|
146
|
-
Same as \fIunderbars\fR
|
136
|
+
Same as \fIunderbars\fR\. This is not compatible with Markdown\.
|
147
137
|
.
|
148
138
|
.P
|
149
|
-
Here is grep(1)'s DESCRIPTION section represented in \fBronn\fR:
|
139
|
+
Here is grep(1)\'s DESCRIPTION section represented in \fBronn\fR:
|
150
140
|
.
|
151
141
|
.IP "" 4
|
152
142
|
.
|
153
143
|
.nf
|
154
144
|
|
155
|
-
`Grep` searches the named input
|
145
|
+
`Grep` searches the named input <FILE> (or standard input if
|
156
146
|
no files are named, or the file name `\-` is given) for lines
|
157
|
-
containing a match to the given
|
158
|
-
prints the matching lines
|
147
|
+
containing a match to the given <PATTERN>\. By default, `grep`
|
148
|
+
prints the matching lines\.
|
159
149
|
.
|
160
150
|
.fi
|
161
151
|
.
|
162
152
|
.IP "" 0
|
163
153
|
.
|
164
154
|
.SH "DEFINITION LISTS"
|
165
|
-
|
166
|
-
describe arguments, options, and variables, the basic markdown(5)
|
167
|
-
list syntax has been extended to support a definition list
|
168
|
-
syntax.
|
155
|
+
The definition list syntax is exactly the same as markdown\'s unordered list syntax but requires that the first line of each list item be terminated with a colon \"\fB:\fR\" character\. The contents of the first line (without the colon) is the \fIterm\fR; subsequent lines may be comprised of multiple paragraphs, code blocks, standard lists, and nested definition lists\.
|
169
156
|
.
|
170
157
|
.P
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
158
|
+
An example definition list, taken from BSD test(1)\'s \fIDESCRIPTION\fR section:
|
159
|
+
.
|
160
|
+
.IP "" 4
|
161
|
+
.
|
162
|
+
.nf
|
163
|
+
|
164
|
+
The following primaries are used to construct expressions:
|
165
|
+
|
166
|
+
* `\-b` <file>:
|
167
|
+
True if <file> exists and is a block special file\.
|
168
|
+
|
169
|
+
* `\-c` <file>:
|
170
|
+
True if _file_ exists and is a character special file\.
|
171
|
+
|
172
|
+
* `\-d` <file>:
|
173
|
+
True if file exists and is a directory\.
|
174
|
+
.
|
175
|
+
.fi
|
176
|
+
.
|
177
|
+
.IP "" 0
|
177
178
|
.
|
178
179
|
.P
|
179
|
-
|
180
|
+
The definition list syntax is intentionally backward compatible with markdown(7)\'s list syntax\. This allows \fBronn\fR documents to be piped through normal markdown processors with minor degradation in output formatting\.
|
181
|
+
.
|
182
|
+
.SH "LINKS"
|
183
|
+
Ronn supports all markdown(7) linking features\. Additionally, section headings can be linked using reference\-style links:
|
180
184
|
.
|
181
185
|
.IP "" 4
|
182
186
|
.
|
183
187
|
.nf
|
184
188
|
|
185
|
-
|
189
|
+
## SECTION 1
|
186
190
|
|
187
|
-
|
188
|
-
True if _file_ exists and is a block special file.
|
191
|
+
See the following section\.
|
189
192
|
|
190
|
-
|
191
|
-
True if _file_ exists and is a character special file.
|
193
|
+
## SECTION 2
|
192
194
|
|
193
|
-
|
194
|
-
True if file exists and is a directory.
|
195
|
+
See [SECTION 1][] or [to put it another way][SECTION 1]\.
|
195
196
|
.
|
196
197
|
.fi
|
197
198
|
.
|
198
199
|
.IP "" 0
|
199
200
|
.
|
200
201
|
.P
|
201
|
-
The
|
202
|
-
with markdown(5)'s list syntax. This allows \fBronn\fR documents to be
|
203
|
-
piped through normal markdown processors with minor degradation
|
204
|
-
in output formatting.
|
202
|
+
The anchor name would be \fB#SECTION\-1\fR and \fB#SECTION\-2\fR\. All non\-word characters are removed and spaces are replaced by dashes\.
|
205
203
|
.
|
206
204
|
.SH "SEE ALSO"
|
207
|
-
ronn(1), markdown(
|
205
|
+
ronn(1), markdown(7), roff(7)
|