linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] uri.7: ffix
@ 2023-04-30  0:26 Alejandro Colomar
  2023-04-30 12:21 ` G. Branden Robinson
  0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Colomar @ 2023-04-30  0:26 UTC (permalink / raw)
  To: linux-man, G. Branden Robinson; +Cc: Alejandro Colomar

Reported-by: groff(1) (`make build-catman-troff`)
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---

This time, it's a bit more properly formatted, with I and B where
appropriate.

 man7/uri.7 | 83 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 63 insertions(+), 20 deletions(-)

diff --git a/man7/uri.7 b/man7/uri.7
index 19fe70f2f..068fd7124 100644
--- a/man7/uri.7
+++ b/man7/uri.7
@@ -29,25 +29,68 @@
 .SH NAME
 uri, url, urn \- uniform resource identifier (URI), including a URL or URN
 .SH SYNOPSIS
-.nf
-.HP 0.2i
-URI = [ absoluteURI | relativeURI ] [ "#" fragment ]
-.HP
-absoluteURI = scheme ":" ( hierarchical_part | opaque_part )
-.HP
-relativeURI = ( net_path | absolute_path | relative_path ) [ "?" query ]
-.HP
-scheme = "http" | "ftp" | "gopher" | "mailto" | "news" | "telnet" |
-         "file" | "man" | "info" | "whatis" | "ldap" | "wais" | \&...
-.HP
-hierarchical_part = ( net_path | absolute_path ) [ "?" query ]
-.HP
-net_path = "//" authority [ absolute_path ]
-.HP
-absolute_path = "/"  path_segments
-.HP
-relative_path = relative_segment [ absolute_path ]
-.fi
+.SY "\fIURI\fP \fR=\fP"
+.RI "[ " absoluteURI " | " relativeURI " ]"
+.RI "[ \[dq]\fB#\fP\[dq] " fragment " ]"
+.YS
+.PP
+.SY "\fIabsoluteURI\fP \fR=\fP"
+.IR scheme " \[dq]\fB:\fP\[dq]"
+.RI "( " hierarchical_part " | " opaque_part " )"
+.YS
+.PP
+.SY "\fIrelativeURI\fP \fR=\fP"
+.RI "( " net_path " | " absolute_path " | " relative_path " )"
+.RI "[ \[dq]\fB?\fP\[dq] " query " ]"
+.YS
+.PP
+.SY "\fIscheme\fP \fR=\fP"
+.RB \[dq] http \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] gopher \[dq]
+|
+.RB \[dq] mailto \[dq]
+|
+.RB \[dq] news \[dq]
+|
+.RB \[dq] telnet \[dq]
+|
+.RB \[dq] file \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] man \[dq]
+|
+.RB \[dq] info \[dq]
+|
+.RB \[dq] whatis \[dq]
+|
+.RB \[dq] ldap \[dq]
+|
+.RB \[dq] wais \[dq]
+| \&...
+.YS
+.PP
+.SY "\fIhierarchical_part\fP \fR=\fP"
+.RI "( " net_path " | " absolute_path " )"
+.RI "[ \[dq]\fB?\fP\[dq] " query " ]"
+.YS
+.PP
+.SY "\fInet_path\fP \fR=\fP"
+.RI "\[dq]\fB//\fP\[dq] " authority
+.RI "[ " absolute_path " ]"
+.YS
+.PP
+.SY "\fIabsolute_path\fP \fR=\fP"
+.RI "\[dq]\fB/\fP\[dq] " path_segments
+.YS
+.PP
+.SY "\fIrelative_path\fP \fR=\fP"
+.I relative_segment
+.RI "[ " absolute_path " ]"
+.YS
 .SH DESCRIPTION
 A Uniform Resource Identifier (URI) is a short string of characters
 identifying an abstract or physical resource (for example, a web page).
@@ -96,7 +139,7 @@ .SS Usage
 permit the authority to be the following format, called here an
 .I ip_server
 (square brackets show what's optional):
-.HP
+.PP
 .IR "ip_server = " [ user " [ : " password " ] @ ] " host " [ : " port ]
 .PP
 This format allows you to optionally insert a username,
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] uri.7: ffix
  2023-04-30  0:26 [PATCH v2] uri.7: ffix Alejandro Colomar
@ 2023-04-30 12:21 ` G. Branden Robinson
  2023-04-30 14:00   ` [PATCH v3b] " Alejandro Colomar
  0 siblings, 1 reply; 3+ messages in thread
From: G. Branden Robinson @ 2023-04-30 12:21 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man, Alejandro Colomar

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

Hi Alex,

At 2023-04-30T02:26:39+0200, Alejandro Colomar wrote:
> +.SY "\fIURI\fP \fR=\fP"
> +.RI "[ " absoluteURI " | " relativeURI " ]"
> +.RI "[ \[dq]\fB#\fP\[dq] " fragment " ]"

It's not _necessary_ to bust into font selection escape sequences in the
`RI` line here and similar ones later, not quoted, whereas it is for the
`SY` argument.  You can use the `\c` output line continuation escape
sequence to chain several font selection requests together without
intervening space.

.RB "[ \[dq]" # \[dq]\~c
.IR fragment \~]

But if you think the source is more readable the way you have it, keep
it.

Regards,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v3b] uri.7: ffix
  2023-04-30 12:21 ` G. Branden Robinson
@ 2023-04-30 14:00   ` Alejandro Colomar
  0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Colomar @ 2023-04-30 14:00 UTC (permalink / raw)
  To: linux-man; +Cc: Alejandro Colomar, G. Branden Robinson

Reported-by: groff(1) (`make build-catman-troff`)
Cowritten-by: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---

Hi Branden,

On 4/30/23 14:21, G. Branden Robinson wrote:
> It's not _necessary_ to bust into font selection escape sequences in the
> `RI` line here and similar ones later, not quoted, whereas it is for the
> `SY` argument.  You can use the `\c` output line continuation escape
> sequence to chain several font selection requests together without
> intervening space.
> 
> .RB "[ \[dq]" # \[dq]\~c
> .IR fragment \~]
> 
> But if you think the source is more readable the way you have it, keep
> it.

I initially thought it would be less readable, but after seeing it in
your email, I reconsidered.  With that, and help of \~, I can remove all
quotes (except in SY).  And now, unbreakable spaces make the formatting
even better.

Cheers,
Alex

 man7/uri.7 | 99 +++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 79 insertions(+), 20 deletions(-)

diff --git a/man7/uri.7 b/man7/uri.7
index 19fe70f2f..ab4a2a2e1 100644
--- a/man7/uri.7
+++ b/man7/uri.7
@@ -29,25 +29,84 @@
 .SH NAME
 uri, url, urn \- uniform resource identifier (URI), including a URL or URN
 .SH SYNOPSIS
-.nf
-.HP 0.2i
-URI = [ absoluteURI | relativeURI ] [ "#" fragment ]
-.HP
-absoluteURI = scheme ":" ( hierarchical_part | opaque_part )
-.HP
-relativeURI = ( net_path | absolute_path | relative_path ) [ "?" query ]
-.HP
-scheme = "http" | "ftp" | "gopher" | "mailto" | "news" | "telnet" |
-         "file" | "man" | "info" | "whatis" | "ldap" | "wais" | \&...
-.HP
-hierarchical_part = ( net_path | absolute_path ) [ "?" query ]
-.HP
-net_path = "//" authority [ absolute_path ]
-.HP
-absolute_path = "/"  path_segments
-.HP
-relative_path = relative_segment [ absolute_path ]
-.fi
+.SY "\fIURI\fP \fR=\fP"
+.RI [\~ absoluteURI
+|
+.IR relativeURI \~]
+.RB [\~\[dq] # \[dq]\~\c
+.IR fragment \~]
+.YS
+.PP
+.SY "\fIabsoluteURI\fP \fR=\fP"
+.I scheme\~\c
+.RB \[dq] : \[dq]
+.RI (\~ hierarchical_part
+|
+.IR opaque_part \~)
+.YS
+.PP
+.SY "\fIrelativeURI\fP \fR=\fP"
+.RI (\~ net_path
+|
+.I absolute_path
+|
+.IR relative_path \~)
+.RB [\~\[dq] ? \[dq]\~\c
+.IR query \~]
+.YS
+.PP
+.SY "\fIscheme\fP \fR=\fP"
+.RB \[dq] http \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] gopher \[dq]
+|
+.RB \[dq] mailto \[dq]
+|
+.RB \[dq] news \[dq]
+|
+.RB \[dq] telnet \[dq]
+|
+.RB \[dq] file \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] man \[dq]
+|
+.RB \[dq] info \[dq]
+|
+.RB \[dq] whatis \[dq]
+|
+.RB \[dq] ldap \[dq]
+|
+.RB \[dq] wais \[dq]
+| \&...
+.YS
+.PP
+.SY "\fIhierarchical_part\fP \fR=\fP"
+.RI (\~ net_path
+|
+.IR absolute_path \~)
+.RB [\~\[dq] ? \[dq]\~\c
+.IR query \~]
+.YS
+.PP
+.SY "\fInet_path\fP \fR=\fP"
+.RB \[dq] // \[dq]\~\c
+.I authority
+.RI [\~ absolute_path \~]
+.YS
+.PP
+.SY "\fIabsolute_path\fP \fR=\fP"
+.RB \[dq] / \[dq]\~\c
+.I path_segments
+.YS
+.PP
+.SY "\fIrelative_path\fP \fR=\fP"
+.I relative_segment
+.RI [\~ absolute_path \~]
+.YS
 .SH DESCRIPTION
 A Uniform Resource Identifier (URI) is a short string of characters
 identifying an abstract or physical resource (for example, a web page).
@@ -96,7 +155,7 @@ .SS Usage
 permit the authority to be the following format, called here an
 .I ip_server
 (square brackets show what's optional):
-.HP
+.PP
 .IR "ip_server = " [ user " [ : " password " ] @ ] " host " [ : " port ]
 .PP
 This format allows you to optionally insert a username,
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-30 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30  0:26 [PATCH v2] uri.7: ffix Alejandro Colomar
2023-04-30 12:21 ` G. Branden Robinson
2023-04-30 14:00   ` [PATCH v3b] " Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).