summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-21 14:42:06 -0600
committerG. Branden Robinson <g.branden.robinson@gmail.com>2023-02-22 03:26:37 -0600
commita9767ace3dd6a4a500c02ff3658e6832fabc78ab (patch)
tree8d0863891ee8c99cd46e0e02f1c2b3a6f2d1e892 /man
parent2cf398e7f52eee9ecf5b8978f22bf252a7652e3d (diff)
downloadgroff-git-a9767ace3dd6a4a500c02ff3658e6832fabc78ab.tar.gz
[man pages]: Define page-local `MR` fallback.
[man pages]: Provide page-local fallback definition of new `MR` macro. I didn't think I was going to have to do this, but the premier site on the web for viewing Linux man pages, Michael Kerrisk's man7.org, has been pulling snapshots of the pages themselves without upgrading the underlying macros, and so man page cross references set with `MR` are getting lost in its presentations. (I acknowledge: Ingo Schwarze warned me something like this could happen.) This definition is intended as a stopgap measure only. I want to revert this after groff 1.23 is released and has spread to some reasonable degree. * contrib/chem/chem.1.man: * contrib/eqn2graph/eqn2graph.1.man: * contrib/gdiffmk/gdiffmk.1.man: * contrib/glilypond/glilypond.1.man: * contrib/gperl/gperl.1.man: * contrib/gpinyin/gpinyin.1.man: * contrib/grap2graph/grap2graph.1.man: * contrib/hdtbl/groff_hdtbl.7.man: * contrib/mm/groff_mm.7.man: * contrib/mm/groff_mmse.7.man: * contrib/mm/mmroff.1.man: * contrib/mom/groff_mom.7.man: * contrib/pdfmark/pdfroff.1.man: * contrib/pic2graph/pic2graph.1.man: * contrib/rfc1345/groff_rfc1345.7.man: * man/groff.7.man: * man/groff_char.7.man: * man/groff_diff.7.man: * man/groff_font.5.man: * man/groff_out.5.man: * man/groff_tmac.5.man: * man/roff.7.man: * src/devices/grodvi/grodvi.1.man: * src/devices/grohtml/grohtml.1.man: * src/devices/grolbp/grolbp.1.man: * src/devices/grolj4/grolj4.1.man: * src/devices/gropdf/gropdf.1.man: * src/devices/gropdf/pdfmom.1.man: * src/devices/grops/grops.1.man: * src/devices/grotty/grotty.1.man: * src/devices/xditview/gxditview.1.man: * src/preproc/eqn/eqn.1.man: * src/preproc/eqn/neqn.1.man: * src/preproc/grn/grn.1.man: * src/preproc/pic/pic.1.man: * src/preproc/preconv/preconv.1.man: * src/preproc/refer/refer.1.man: * src/preproc/soelim/soelim.1.man: * src/preproc/tbl/tbl.1.man: * src/roff/groff/groff.1.man: * src/roff/nroff/nroff.1.man: * src/roff/troff/troff.1.man: * src/utils/addftinfo/addftinfo.1.man: * src/utils/afmtodit/afmtodit.1.man: * src/utils/grog/grog.1.man: * src/utils/hpftodit/hpftodit.1.man: * src/utils/indxbib/indxbib.1.man: * src/utils/lkbib/lkbib.1.man: * src/utils/lookbib/lookbib.1.man: * src/utils/pfbtops/pfbtops.1.man: * src/utils/tfmtodit/tfmtodit.1.man: * src/utils/xtotroff/xtotroff.1.man: * tmac/groff_man.7.man.in: * tmac/groff_me.7.man: * tmac/groff_ms.7.man: * tmac/groff_trace.7.man: * tmac/groff_www.7.man: Do it. Fixes <https://savannah.gnu.org/bugs/?63825>. Thanks greatly to Alexis for identifying an issue with mandoc(1)'s handling of an earlier iteration of this fallback, and to John Gardner for identifying a method of detecting mandoc as the renderer at formatting time. Tested with groff 1.22.4, mandoc 1.14.5, and groff Git HEAD (of course). The sed script I used follows. /^\.cp 0/a\ .\ .\\" Define fallback for groff 1.23's MR macro if the system lacks it.\ .nr do-fallback 0\ .if !\\n(.f .nr do-fallback 1 \\" mandoc\ .if \\n(.g .if !d MR .nr do-fallback 1 \\" older groff\ .if !\\n(.g .nr do-fallback 1 \\" non-groff *roff\ .if \\n[do-fallback] \\{\\\ . de MR\ . ie \\\\n(.$=1 \\\ . I \\%\\\\$1\ . el \\\ . IR \\%\\\\$1 (\\\\$2)\\\\$3\ . .\ .\\}\ .rr do-fallback ANNOUNCE: Update bug counts. Credit Alexis with assistance.
Diffstat (limited to 'man')
-rw-r--r--man/groff.7.man15
-rw-r--r--man/groff_char.7.man15
-rw-r--r--man/groff_diff.7.man15
-rw-r--r--man/groff_font.5.man15
-rw-r--r--man/groff_out.5.man15
-rw-r--r--man/groff_tmac.5.man15
-rw-r--r--man/roff.7.man15
7 files changed, 105 insertions, 0 deletions
diff --git a/man/groff.7.man b/man/groff.7.man
index 0391e5b8a..0d0539a98 100644
--- a/man/groff.7.man
+++ b/man/groff.7.man
@@ -28,6 +28,21 @@ language reference
.do nr *groff_groff_7_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.\" Setup
diff --git a/man/groff_char.7.man b/man/groff_char.7.man
index 188fb80d3..14aeeaaee 100644
--- a/man/groff_char.7.man
+++ b/man/groff_char.7.man
@@ -30,6 +30,21 @@ special character and glyph repertoire
.do nr *groff_groff_char_7_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.SH Description
diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index f27dcc281..1e0ecd8a4 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -29,6 +29,21 @@ and AT&T
.do nr *groff_groff_diff_7_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.\" Local definitions
diff --git a/man/groff_font.5.man b/man/groff_font.5.man
index a26003ed9..0ee1d9aa1 100644
--- a/man/groff_font.5.man
+++ b/man/groff_font.5.man
@@ -28,6 +28,21 @@ device and font description files
.do nr *groff_groff_font_5_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.SH Description
diff --git a/man/groff_out.5.man b/man/groff_out.5.man
index 65386de45..320315b08 100644
--- a/man/groff_out.5.man
+++ b/man/groff_out.5.man
@@ -28,6 +28,21 @@ intermediate output format
.do nr *groff_groff_out_5_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.\" Setup
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 20d1953d0..8126e594f 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -27,6 +27,21 @@ typesetting system
.do nr *groff_groff_tmac_5_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" TODO: Consider parallelizing with our Texinfo node "Macro Packages".
.\" ====================================================================
diff --git a/man/roff.7.man b/man/roff.7.man
index 153d2d336..e0058e808 100644
--- a/man/roff.7.man
+++ b/man/roff.7.man
@@ -31,6 +31,21 @@ typesetting
.do nr *groff_roff_7_man_C \n[.cp]
.cp 0
.
+.\" Define fallback for groff 1.23's MR macro if the system lacks it.
+.nr do-fallback 0
+.if !\n(.f .nr do-fallback 1 \" mandoc
+.if \n(.g .if !d MR .nr do-fallback 1 \" older groff
+.if !\n(.g .nr do-fallback 1 \" non-groff *roff
+.if \n[do-fallback] \{\
+. de MR
+. ie \\n(.$=1 \
+. I \%\\$1
+. el \
+. IR \%\\$1 (\\$2)\\$3
+. .
+.\}
+.rr do-fallback
+.
.
.\" ====================================================================
.SH Description