groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] *.man: Break URIs at points specified by the Chicago Style


From: Alejandro Colomar
Subject: [PATCH] *.man: Break URIs at points specified by the Chicago Style
Date: Sun, 17 Oct 2021 21:33:24 +0200

Break URIs before a single slash, not after.

I found no GNU-specific (or any other at all) source that recommends
breaking long URIs after a slash.  So follow Chicago Style and
break them before single slashes.

Scripted fix:

$ find * -type f \
  | xargs grep -l '^\.UR.*[^/]/\\:' \
  | xargs sed -i '/^\.UR/s,\([^/]\)/\\:,\1\\:/,g';

$ find * -type f \
  | xargs grep -l 'UR.*[^/]/\\e:' \
  | xargs sed -i '/UR/s,\([^/]\)/\\e:,\1\\e:/,g';

These scripts miss 2 cases, which I fixed manually
(URIs that used 2 source lines).

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---

Hello,

I found some break points for URIs in groff_man.7 that didn't follow
the Chicago Style.  I don't know if you follow any guidelines for that,
but in case you don't (at least you were consistent in the rules) and
would consider this a better breaking point, here's a patch.

Regards,

Alex

---
 contrib/gpinyin/gpinyin.1.man        | 14 +++++++-------
 contrib/mm/groff_mm.7.man            |  2 +-
 contrib/mom/groff_mom.7.man          |  4 ++--
 contrib/pic2graph/pic2graph.1.man    |  2 +-
 doc/webpage.ms                       | 26 +++++++++++++-------------
 man/groff_char.7.man                 |  2 +-
 man/groff_tmac.5.man                 |  2 +-
 man/roff.7.man                       | 20 ++++++++++----------
 src/devices/grops/grops.1.man        |  2 +-
 src/devices/grotty/grotty.1.man      |  4 ++--
 src/devices/xditview/gxditview.1.man |  2 +-
 src/preproc/pic/pic.1.man            |  6 +++---
 src/roff/groff/groff.1.man           |  6 +++---
 src/utils/xtotroff/xtotroff.1.man    |  2 +-
 tmac/groff_man.7.man.in              |  2 +-
 15 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/contrib/gpinyin/gpinyin.1.man b/contrib/gpinyin/gpinyin.1.man
index 5d0477ca..bc40f7ee 100644
--- a/contrib/gpinyin/gpinyin.1.man
+++ b/contrib/gpinyin/gpinyin.1.man
@@ -278,7 +278,7 @@ Bernd Warken
 .
 Useful documents on the World Wide Web related to Pinyin include
 .RS 4n
-.UR http://\:www\:.foolsworkshop\:.com/\:ptou/\:index\:.html
+.UR http://\:www\:.foolsworkshop\:.com\:/ptou\:/index\:.html
 .I Pinyin to Unicode
 .UE ,
 .
@@ -288,19 +288,19 @@ Useful documents on the World Wide Web related to Pinyin 
include
 .UE ,
 .
 .br
-.UR http://\:www\:.pinyin\:.info/\:index\:.html
+.UR http://\:www\:.pinyin\:.info\:/index\:.html
 .I Pinyin.info: a guide to the writing of Mandarin Chinese in \
 romanization
 .UE ,
 .
 .br
-.UR http://\:www\:.pinyin\:.info/\:rules/\:where.html
+.UR http://\:www\:.pinyin\:.info\:/rules\:/where.html
 \[lq]Where do the tone marks go?\[rq]
 .UE ,
 .
 .br
-.UR http://\:git\:.savannah\:.gnu\:.org/\:gitweb/\:\
-?p=cjk\:.git\:;a=blob_plain\:;f=doc/\:pinyin\:.txt\:;hb=HEAD
+.UR http://\:git\:.savannah\:.gnu\:.org\:/gitweb\:/\
+?p=cjk\:.git\:;a=blob_plain\:;f=doc\:/pinyin\:.txt\:;hb=HEAD
 .I pinyin.txt
 from the CJK macro package for \*[TeX]
 .UE ,
@@ -310,8 +310,8 @@ and
 .RE
 .
 .br
-.UR http://\:git\:.savannah\:.gnu\:.org/\:gitweb/\:\
-?p=cjk\:.git\:;a=blob_plain\:;f=texinput/\:pinyin\:.sty\:;hb=HEAD
+.UR http://\:git\:.savannah\:.gnu\:.org\:/gitweb\:/\
+?p=cjk\:.git\:;a=blob_plain\:;f=texinput\:/pinyin\:.sty\:;hb=HEAD
 .I pinyin.sty
 from the CJK macro package for \*[TeX]
 .UE .
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 5b9a03cb..a4558de6 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -4343,7 +4343,7 @@ of Lund, Sweden.
 .SH "See also"
 .\" ====================================================================
 .
-.UR https://tkurtbond\:.github\:.io/\:troff/\:mm-all\:.pdf
+.UR https://tkurtbond\:.github\:.io\:/troff\:/mm-all\:.pdf
 .I MM \- A Macro Package for Generating Documents
 .UE ,
 the DWB\~3.3
diff --git a/contrib/mom/groff_mom.7.man b/contrib/mom/groff_mom.7.man
index 251be8b1..bfca5475 100644
--- a/contrib/mom/groff_mom.7.man
+++ b/contrib/mom/groff_mom.7.man
@@ -3373,13 +3373,13 @@ entry point to the HTML documentation
 .
 .
 .TP
-.UR http://\:www\:.schaffter\:.ca/\:mom/\:momdoc/\:toc\:.html
+.UR http://\:www\:.schaffter\:.ca\:/mom\:/momdoc\:/toc\:.html
 .UE
 HTML documentation online
 .
 .
 .TP
-.UR http://\:www\:.schaffter\:.ca/\:mom/
+.UR http://\:www\:.schaffter\:.ca\:/mom/
 .UE
 the
 .I mom
diff --git a/contrib/pic2graph/pic2graph.1.man 
b/contrib/pic2graph/pic2graph.1.man
index 1c47a57f..6ad25a1b 100644
--- a/contrib/pic2graph/pic2graph.1.man
+++ b/contrib/pic2graph/pic2graph.1.man
@@ -191,7 +191,7 @@ based on a recipe by W.\& Richard Stevens.
 .\" ====================================================================
 .
 W.\& Richard Stevens,
-.UR http://\:www\:.kohala\:.com/\:start/\:troff/\:pic2html\:.html
+.UR http://\:www\:.kohala\:.com\:/start\:/troff\:/pic2html\:.html
 .I Turning PIC into HTML
 .UE
 .
diff --git a/doc/webpage.ms b/doc/webpage.ms
index a4018566..16c0034f 100644
--- a/doc/webpage.ms
+++ b/doc/webpage.ms
@@ -77,25 +77,25 @@ while consuming only minimal system resources.
 
 The source code of the currently released versions of groff is
 available at the
-.URL "http://\:ftp.gnu.org/\:gnu/\:groff/"; "GNU host"
+.URL "http://\:ftp.gnu.org\:/gnu\:/groff/"; "GNU host"
 and its mirrors;
 the current development version is available from a
-.URL "https://\:savannah.gnu.org/\:git/\:?group=groff"; "git repository" .
+.URL "https://\:savannah.gnu.org\:/git\:/?group=groff"; "git repository" .
 .
 The current version is 1.23.0 (Autumn 2020).
 
 To view the git repository in your browser, use
-.URL "http://\:git.savannah.gnu.org/\:cgit/\:groff.git"; \
+.URL "http://\:git.savannah.gnu.org\:/cgit\:/groff.git"; \
      "Savannah's cgit interface" .
 .
 There you can also download snapshots;
 simply click on a commit entry line to get the URL.
 
 Additional contributions can be found
-.URL "http://\:groff.ffii.org/\:groff/\:contrib/"; here .
+.URL "http://\:groff.ffii.org\:/groff\:/contrib/"; here .
 
 For a special version of groff on the Microsoft operating systems, see
-.URL "https://\:sf.net/\:projects/\:ezwinports/\:files/"; \
+.URL "https://\:sf.net\:/projects\:/ezwinports\:/files/"; \
      "Groff for Windows"
 (version 1.21).
 
@@ -106,7 +106,7 @@ is now maintained by the team at
 .HR
 .
 \s[-2]\f[I]This document was produced using
-.URL http://\:www.gnu.org/\:software/\:groff groff\~\n[.x].\n[.y].\n[.Y] .
+.URL http://\:www.gnu.org\:/software\:/groff groff\~\n[.x].\n[.y].\n[.Y] .
 .br
 The image at the top has been contributed by Imogen Mulley,
 based on a similar picture found on the
@@ -117,9 +117,9 @@ based on a similar picture found on the
 License
 .LP
 GNU troff is released under the
-.URL http://\:www.gnu.org/\:copyleft/\:gpl.html "GNU Copyright License" .
+.URL http://\:www.gnu.org\:/copyleft\:/gpl.html "GNU Copyright License" .
 The documentation is released under the
-.URL http://\:www.gnu.org/\:copyleft/\:fdl.html "Free Documentation License" .
+.URL http://\:www.gnu.org\:/copyleft\:/fdl.html "Free Documentation License" .
 .
 .
 .SH
@@ -160,13 +160,13 @@ The file `MORE.STUFF' contains information about add-on 
packages useful for
 Repository and FTP access
 .LP
 The most recent released version of `groff' is always available by
-.URL "ftp://\:ftp.gnu.org/\:gnu/\:groff"; "anonymous ftp" .
+.URL "ftp://\:ftp.gnu.org\:/gnu\:/groff"; "anonymous ftp" .
 
 The current development version of `groff' is available from a
-.URL http://\:savannah.gnu.org/\:git/\:?group=groff "git repository" .
+.URL http://\:savannah.gnu.org\:/git\:/?group=groff "git repository" .
 
 To view the git repository in your browser, go to its
-.URL http://\:git.savannah.gnu.org/\:cgit/\:groff.git "browser interface" .
+.URL http://\:git.savannah.gnu.org\:/cgit\:/groff.git "browser interface" .
 There you can also download snapshots; simply click on a commit entry
 line to get the URL.
 .
@@ -218,7 +218,7 @@ In Debian, the developer packages are `libxaw7\-dev' and 
`libxmu\-dev'.
 Bug reports
 .LP
 Please report bugs using the project's
-.URL https://\:savannah.gnu.org/\:projects/\:groff "bug tracker" .
+.URL https://\:savannah.gnu.org\:/projects\:/groff "bug tracker" .
 
 You may use the form in the file `BUG\-REPORT'; the idea of this is to
 make sure that FSF has all the information it needs to fix the bug.
@@ -1494,7 +1494,7 @@ Out of the box, the groff package supports \%latin-9 only 
for \-Tps,
 .LI
 Composite glyphs are now supported.
 To do this, a subset of the Adobe Glyph List (AGL) Algorithm as described in
-.URL 
http://\:partners.adobe.com/\:public/\:developer/\:opentype/\:index_glyph.html \
+.URL 
http://\:partners.adobe.com\:/public\:/developer\:/opentype\:/index_glyph.html \
      
http://\:partners.adobe.com/\:public/\:developer/\:opentype/\:index_glyph.html
 is used to construct glyph names based on Unicode character codes.
 The existing groff glyph names are frozen; no glyph names which can't be
diff --git a/man/groff_char.7.man b/man/groff_char.7.man
index b503b322..3a432c88 100644
--- a/man/groff_char.7.man
+++ b/man/groff_char.7.man
@@ -1788,7 +1788,7 @@ The Unicode Standard
 .
 .
 .P
-.UR https://\:www\:.aivosto\:.com/\:articles/\:charsets\-7bit\:.html
+.UR https://\:www\:.aivosto\:.com\:/articles\:/charsets\-7bit\:.html
 \[lq]7-bit Character Sets\[rq]
 .UE
 by Tuomas Salste documents the inherent ambiguity and configurability
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 7cca6f76..9216b530 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -1254,7 +1254,7 @@ You can browse it interactively with \[lq]info groff\[rq].
 .
 .LP
 The
-.UR https://\:wiki\:.linuxfoundation\:.org/\:lsb/\:fhs
+.UR https://\:wiki\:.linuxfoundation\:.org\:/lsb\:/fhs
 Filesystem Hierarchy Standard
 .UE
 is maintained by the Linux Foundation.
diff --git a/man/roff.7.man b/man/roff.7.man
index dd5b0c5b..1bc7f597 100644
--- a/man/roff.7.man
+++ b/man/roff.7.man
@@ -149,7 +149,7 @@ the latter came to overwhelm the former in popular usage 
and later
 derivatives of the program.
 .
 A sample of control words from a
-.UR http://\:web\:.mit\:.edu/\:Saltzer/\:www/\:publications/\:ctss/\:AH\
+.UR http://\:web\:.mit\:.edu\:/Saltzer\:/www\:/publications\:/ctss\:/AH\
 \:.9\:.01\:.html
 .I RUNOFF
 manual of December 1966
@@ -596,7 +596,7 @@ the GNU implementation of
 .IR troff ,
 developed from scratch by James Clark starting in 1989 and distributed
 under
-.UR http://\:www\:.gnu\:.org/\:copyleft
+.UR http://\:www\:.gnu\:.org\:/copyleft
 copyleft
 .UE
 licenses,
@@ -648,7 +648,7 @@ standard today.
 .\" XXX GBR leaves off here.
 .
 An alternative is
-.UR https://\:github\:.com/\:n\-t\-roff/\:heirloom\-doctools
+.UR https://\:github\:.com\:/n\-t\-roff\:/heirloom\-doctools
 .I Gunnar Ritter's Heirloom roff project
 .UE
 project, started in 2005, which provides enhanced versions of the
@@ -665,7 +665,7 @@ You can get this package with the shell command:
 .
 .P
 Moreover, one finds there the
-.UR https://\:github\:.com/\:n\-t\-roff/\:DWB3.3
+.UR https://\:github\:.com\:/n\-t\-roff\:/DWB3.3
 .I Original Documenter's Workbench Release 3.3
 .UE .
 .
@@ -1530,7 +1530,7 @@ are documented in great detail.
 .\" ====================================================================
 .
 .P
-.UR https://\:github\:.com/\:larrykollar/\:Unix\-Text\-Processing
+.UR https://\:github\:.com\:/larrykollar\:/Unix\-Text\-Processing
 .I Unix Text Processing
 .UE ,
 by Dale Dougherty and Tim O'Reilly,
@@ -1549,7 +1549,7 @@ contributors and enthusiasts.
 .
 .
 .P
-.UR http://\:manpages\:.bsd\:.lv/\:history\:.html
+.UR http://\:manpages\:.bsd\:.lv\:/history\:.html
 \[lq]History of Unix Manpages\[rq]
 .UE ,
 an online article maintained by the mdocml project,
@@ -1587,7 +1587,7 @@ historical documents.
 .
 .
 .P
-.UR http://\:www\:.tuhs\:.org/\:Archive/
+.UR http://\:www\:.tuhs\:.org\:/Archive/
 The Unix Archive
 .UE ,
 curated by the Unix Heritage Society,
@@ -1599,7 +1599,7 @@ contributed by their copyright holders.
 .
 .
 .P
-.UR http://\:web\:.mit\:.edu/\:Saltzer/\:www/\:publications/\
+.UR http://\:web\:.mit\:.edu\:/Saltzer\:/www\:/publications/\
 \:pubs\:.html
 Jerry Saltzer's home page
 .UE
@@ -1609,7 +1609,7 @@ formatting language.
 .
 .
 .P
-.UR http://\:www\:.gnu\:.org/\:software/\:groff
+.UR http://\:www\:.gnu\:.org\:/software\:/groff
 .I groff
 .UE ,
 GNU
@@ -1664,7 +1664,7 @@ Revised March 1982.
 .
 .P
 You can obtain many relevant Bell Labs papers in PDF from
-.UR https://\:github\:.com/\:bwarken/\:roff_classical\:.git
+.UR https://\:github\:.com\:/bwarken\:/roff_classical\:.git
 Bernd Warken's
 \[lq]roff classical\[rq]
 GitHub repository
diff --git a/src/devices/grops/grops.1.man b/src/devices/grops/grops.1.man
index 8b9982ba..79961b38 100644
--- a/src/devices/grops/grops.1.man
+++ b/src/devices/grops/grops.1.man
@@ -1562,7 +1562,7 @@ for details on the location of temporary files.
 .SH "See also"
 .\" ====================================================================
 .
-.UR http://\:partners\:.adobe\:.com/\:public/\:developer/\:en/\:ps/\
+.UR http://\:partners\:.adobe\:.com\:/public\:/developer\:/en\:/ps/\
 \:5001\:.DSC_Spec\:.pdf
 PostScript Language Document Structuring Conventions Specification
 .UE
diff --git a/src/devices/grotty/grotty.1.man b/src/devices/grotty/grotty.1.man
index 4a3aa7cd..4dc3505d 100644
--- a/src/devices/grotty/grotty.1.man
+++ b/src/devices/grotty/grotty.1.man
@@ -740,13 +740,13 @@ A gratis version of ISO\~6429,
 this document includes a normative description of SGR escape sequences.
 .
 Available at
-.UR http://\:www\:.ecma\-international\:.org/\:publications/\:files/\:\
+.UR http://\:www\:.ecma\-international\:.org\:/publications\:/files\:/\
 ECMA\-ST/\:Ecma\-048\:.pdf
 .UE .
 .
 .
 .P
-.UR https://\:gist\:.github\:.com/\:egmontkob/\:\
+.UR https://\:gist\:.github\:.com\:/egmontkob\:/\
 eb114294efbcd5adb1944c9f3cb5feda
 \[lq]Hyperlinks in Terminal Emulators\[rq]
 .UE ,
diff --git a/src/devices/xditview/gxditview.1.man 
b/src/devices/xditview/gxditview.1.man
index 8aa83b70..b6003dd3 100644
--- a/src/devices/xditview/gxditview.1.man
+++ b/src/devices/xditview/gxditview.1.man
@@ -659,7 +659,7 @@ which was derived from
 .SH "See also"
 .\" ====================================================================
 .
-.UR https://\:www\:.x\:.org/\:releases/\:X11R7.6/\:doc/\:xorg\-docs/\
+.UR https://\:www\:.x\:.org\:/releases\:/X11R7.6\:/doc\:/xorg\-docs/\
 \:specs/\:XLFD/xlfd\:.html
 \[lq]X Logical Font Description Conventions\[rq]
 .UE ,
diff --git a/src/preproc/pic/pic.1.man b/src/preproc/pic/pic.1.man
index 4f56ea3e..e50c6550 100644
--- a/src/preproc/pic/pic.1.man
+++ b/src/preproc/pic/pic.1.man
@@ -1502,20 +1502,20 @@ AT&T Bell Laboratories Computing Science Technical 
Report No.\& 116
 .LP
 .B ps2eps
 is available from CTAN mirrors, e.g.,
-.UR ftp://\:ftp\:.dante\:.de/\:tex\-archive/\:support/\:ps2eps/
+.UR ftp://\:ftp\:.dante\:.de\:/tex\-archive\:/support\:/ps2eps/
 .UE
 .
 .
 .LP
 W.\& Richard Stevens,
-.UR http://\:www\:.kohala\:.com/\:start/\:troff/\:pic2html\:.html
+.UR http://\:www\:.kohala\:.com\:/start\:/troff\:/pic2html\:.html
 .I Turning PIC into HTML
 .UE
 .
 .
 .LP
 W.\& Richard Stevens,
-.UR http://\:www\:.kohala\:.com/\:start/\:troff/\:pic\:.examples\:.ps
+.UR http://\:www\:.kohala\:.com\:/start\:/troff\:/pic\:.examples\:.ps
 .IR "Examples of " pic " Macros"
 .UE
 .
diff --git a/src/roff/groff/groff.1.man b/src/roff/groff/groff.1.man
index 9bcf9621..d1cb7c13 100644
--- a/src/roff/groff/groff.1.man
+++ b/src/roff/groff/groff.1.man
@@ -1105,7 +1105,7 @@ is a modern package written by Peter Schaffter 
specifically for GNU
 .IR roff .
 .
 Consult the
-.UR file://\:\%@HTMLDOCDIR@/\:mom/\:toc\:.html
+.UR file://\:\%@HTMLDOCDIR@\:/mom\:/toc\:.html
 .I mom
 HTML manual
 .UE
@@ -2041,7 +2041,7 @@ see
 Information on how to get
 .I groff
 and related information is available at the
-.UR http://\:www\:.gnu\:.org/\:software/\:groff
+.UR http://\:www\:.gnu\:.org\:/software\:/groff
 groff page of the GNU website
 .UE .
 .
@@ -2091,7 +2091,7 @@ written by
 Ted Faber
 .ME ,
 can be found at the
-.UR http://\:www\:.lunabase\:.org/\:\[ti]faber/\:Vault/\:software/\
+.UR http://\:www\:.lunabase\:.org\:/\[ti]faber\:/Vault\:/software/\
 \:grap/
 grap website
 .UE .
diff --git a/src/utils/xtotroff/xtotroff.1.man 
b/src/utils/xtotroff/xtotroff.1.man
index e6499e88..350cc1ff 100644
--- a/src/utils/xtotroff/xtotroff.1.man
+++ b/src/utils/xtotroff/xtotroff.1.man
@@ -166,7 +166,7 @@ The only supported font encodings are \[lq]iso8859\-1\[rq] 
and
 .SH "See also"
 .\" ====================================================================
 .
-.UR https://\:www\:.x\:.org/\:releases/\:X11R7.6/\:doc/\:xorg\-docs/\
+.UR https://\:www\:.x\:.org\:/releases\:/X11R7.6\:/doc\:/xorg\-docs/\
 \:specs/\:XLFD/xlfd\:.html
 \[lq]X Logical Font Description Conventions\[rq]
 .UE ,
diff --git a/tmac/groff_man.7.man.in b/tmac/groff_man.7.man.in
index 31a2f4e1..f6617565 100644
--- a/tmac/groff_man.7.man.in
+++ b/tmac/groff_man.7.man.in
@@ -1317,7 +1317,7 @@ to a PostScript device,
 .EX
 The GNU Project of the Free Software Foundation
 hosts the
-\&.UR https://\e:www\e:.gnu\e:.org/\e:software/\e:groff/
+\&.UR https://\e:www\e:.gnu\e:.org\e:/software\e:/groff/
 \&.I groff
 home page
 \&.UE .
-- 
2.33.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]