From 4a245906ace97dce0804e12a5f2a1e89ffd2736f Mon Sep 17 00:00:00 2001 From: Alhadis Date: Thu, 21 Jul 2016 22:12:16 +1000 Subject: [PATCH 1/6] doc: Clean up roff source in manpage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The header's comments were written incorrectly. A comment line in Roff starts with a .\" sequence, whereas .\ is attempting to call a command whose name starts with a space. Because Roff interpreters will discard unrecognised control lines, the malformed "comments" were just noops. * Repeating font macros have been used to format the synopsis instead of escape sequences (\fB…\fR). This makes for admittedly more sustainable source code for an editor who lacks knowledge of Roff. * A basic macro has been added to insert highlighted URLs with less line noise. To insert a bold and underlined URL on a new line, one only has to write ".ur http://…" --- doc/node.1 | 66 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index cec87222b54d11..c8408adc2d9f71 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -1,10 +1,26 @@ .TH NODE 1 2016 Node.js Node.js -.\ This is a man page comment. -.\ Man page syntax (actually troff syntax) is somewhat obscure, but the -.\ important part is is that . specifies 's syntax for that -.\ line, and \f specifies it for the characters that follow. -.\ See http://liw.fi/manpages/ for more info. +.\" This is a man page comment. +. +.\" Man page syntax (actually troff syntax) is somewhat obscure, but the +.\" important part is is that . specifies 's syntax for that +.\" line, and \f specifies it for the characters that follow. +. +.\" .B Bold line +.\" .I Italic line (Rendered as underlined text in terminals) +.\" .BI Alternating bold/italics without spaces between arguments. +.\" Use `\ ` to include an "unpaddable" (literal) space in the output. +.\" .RI Alternating roman/italic +. +.\" See http://liw.fi/manpages/ for an overview, or http://www.troff.org/54.pdf +.\" for detailed language reference. +.de ur +.nr CF \\n(.f +.ft 4 +\\$1 +.ft \\n(CF +.. + .SH NAME @@ -12,17 +28,27 @@ node \- Server-side JavaScript runtime .SH SYNOPSIS - +.fi +. .B node -[\fIoptions\fR] [\fIv8 options\fR] -[\fIscript.js\fR | \fB\-e \fR"\fIscript\fR"] -[\fIarguments\fR] +.RI [ options ] +.RI [ v8\ options ] +.RI [ script.js \ | +.B -e +.RI \&" script \&"] +.RI [ arguments ] .br +. .B node debug -[\fIscript.js\fR | \fB\-e \fR"\fIscript\fR" | \fI:\fR] \fI... +.RI [ script.js " | " +.B \-e +.RI \&" script \&"\ | +.IR : ] +.I ... .br +. .B node -[\fB\-\-v8-options\fR] +.RB [ \-\-v8-options ] Execute without arguments to start the REPL. @@ -172,14 +198,20 @@ value to an empty string ("" or " ") disables persistent REPL history. .SH RESOURCES AND DOCUMENTATION -Website: \fBhttps://nodejs.org/\fR +Website: +.ur https://nodejs.org/ -Documentation: \fBhttps://nodejs.org/api/\fR +Documentation: +.ur https://nodejs.org/api/ -GitHub repository & Issue Tracker: \fBhttps://github.com/nodejs/node\fR +GitHub repository & Issue Tracker: +.ur https://github.com/nodejs/node -Mailing list: \fBhttp://groups.google.com/group/nodejs\fR +Mailing list: +.ur http://groups.google.com/group/nodejs -IRC (general questions): \fBchat.freenode.net #node.js\fR +IRC (general questions): +.ur "chat.freenode.net #node.js" -IRC (node core development): \fBchat.freenode.net #node-dev\fR +IRC (node core development): +.ur "chat.freenode.net #node-dev" From 82a2cde468e8217be04083242b1a62170630fdff Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 22 Jul 2016 01:46:44 +1000 Subject: [PATCH 2/6] Strip trailing whitespace --- doc/node.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/node.1 b/doc/node.1 index c8408adc2d9f71..433e3794e4ddb1 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -34,7 +34,7 @@ node \- Server-side JavaScript runtime .RI [ options ] .RI [ v8\ options ] .RI [ script.js \ | -.B -e +.B -e .RI \&" script \&"] .RI [ arguments ] .br From ae90a7292dd1d7081d7ffd1e9cc092d62c2f720d Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 22 Jul 2016 03:14:15 +1000 Subject: [PATCH 3/6] Add brief description for URL-formatting macro --- doc/node.1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/node.1 b/doc/node.1 index 433e3794e4ddb1..ad1661932686fa 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -14,6 +14,8 @@ . .\" See http://liw.fi/manpages/ for an overview, or http://www.troff.org/54.pdf .\" for detailed language reference. +. +.\" Macro to display an underlined URL in bold .de ur .nr CF \\n(.f .ft 4 From 450043291cdb0681485e027734515c4000e19e49 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 22 Jul 2016 03:15:22 +1000 Subject: [PATCH 4/6] Delete redundant .fi request --- doc/node.1 | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/node.1 b/doc/node.1 index ad1661932686fa..da59eb9030bf75 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -30,7 +30,6 @@ node \- Server-side JavaScript runtime .SH SYNOPSIS -.fi . .B node .RI [ options ] From 57e48cb1a734f2106a061f7e03b7d2605f9b0ac3 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Fri, 22 Jul 2016 03:39:31 +1000 Subject: [PATCH 5/6] Use correct name for Roff typesetting language --- doc/node.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/node.1 b/doc/node.1 index da59eb9030bf75..3eeea8f9ac5c08 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -2,7 +2,7 @@ .\" This is a man page comment. . -.\" Man page syntax (actually troff syntax) is somewhat obscure, but the +.\" Man page syntax (actually roff syntax) is somewhat obscure, but the .\" important part is is that . specifies 's syntax for that .\" line, and \f specifies it for the characters that follow. . From 3a301324555ead038e4a556686542445d021bae8 Mon Sep 17 00:00:00 2001 From: Alhadis Date: Wed, 3 Aug 2016 21:59:25 +1000 Subject: [PATCH 6/6] Delete empty lines --- doc/node.1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/doc/node.1 b/doc/node.1 index 3eeea8f9ac5c08..bdc2c8ad008ae8 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -1,20 +1,20 @@ .TH NODE 1 2016 Node.js Node.js .\" This is a man page comment. -. + .\" Man page syntax (actually roff syntax) is somewhat obscure, but the .\" important part is is that . specifies 's syntax for that .\" line, and \f specifies it for the characters that follow. -. + .\" .B Bold line .\" .I Italic line (Rendered as underlined text in terminals) .\" .BI Alternating bold/italics without spaces between arguments. .\" Use `\ ` to include an "unpaddable" (literal) space in the output. .\" .RI Alternating roman/italic -. + .\" See http://liw.fi/manpages/ for an overview, or http://www.troff.org/54.pdf .\" for detailed language reference. -. + .\" Macro to display an underlined URL in bold .de ur .nr CF \\n(.f @@ -30,7 +30,7 @@ node \- Server-side JavaScript runtime .SH SYNOPSIS -. + .B node .RI [ options ] .RI [ v8\ options ] @@ -39,7 +39,6 @@ node \- Server-side JavaScript runtime .RI \&" script \&"] .RI [ arguments ] .br -. .B node debug .RI [ script.js " | " .B \-e @@ -47,7 +46,6 @@ node \- Server-side JavaScript runtime .IR : ] .I ... .br -. .B node .RB [ \-\-v8-options ]