[Top][All Lists]

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

[groff] 39/51: groff_mdoc(7): Update example.

From: G. Branden Robinson
Subject: [groff] 39/51: groff_mdoc(7): Update example.
Date: Sun, 11 Sep 2022 08:15:55 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit e338223d742e85fd1d1554fc3016c35f19ada292
Author: G. Branden Robinson <>
AuthorDate: Thu Sep 8 00:02:45 2022 -0500

    groff_mdoc(7): Update example.
    The existing one was hard for me to comprehend; the method attempted for
    computing the width of the widest column failed due to problems explored
    at length recently on the groff mailing list.  Use tbl(1).  Simulate
    output more realistically.
    For a possibly exhaustive exploration of the underlying issues, see the

    This commit will provoke warnings when the groff_mdoc(7) page is
    rendered to the terminal.
    troff:./build/tmac/groff_mdoc.7:930: warning: cannot select font 'CR'
    This is because our mdoc implementation needs to remap these fonts as
    our man implementation does.
    This update does exhibit Savannah #62471.  That's a shame.  It's still
    perfectly readable, though.
 tmac/ | 45 +++++++++++++++++++--------------------------
 1 file changed, 19 insertions(+), 26 deletions(-)

diff --git a/tmac/ b/tmac/
index ac8ae17f8..dfe5670a0 100644
--- a/tmac/
+++ b/tmac/
@@ -912,34 +912,27 @@ the third parameter is used verbatim as the volume name.
-In the following examples,
-the left
-(which is identical to the right)
-and the middle part of the manual page header strings are shown.
+The effects of varying
+.Ql .Dt
+arguments on the page header content
+are shown below.
-Note how
-.Ql \e&
-prevents the digit\~7 from being a valid numeric expression.
+Observe how
+.Ql \[rs]&
+prevents the digit\~2 from being treated as a manual section number.
-.Bd -ragged
-.Bl -tag -width ".Li .Dt\ FOO\ 2\ i386" -compact -offset indent
-.It Li ".Dt FOO 7"
-.Ql FOO(7)
-.Ql \*[doc-volume-ds-7]
-.It Li ".Dt FOO 7 bar"
-.Ql FOO(7)
-.Ql \*[doc-volume-ds-7]
-.It Li ".Dt FOO \e&7 bar"
-.Ql FOO(7)
-.Ql bar
-.It Li ".Dt FOO 2 i386"
-.Ql FOO(2)
-.Ql \*[doc-volume-ds-2]
-.It Li ".Dt FOO \[dq]\[dq] bar"
-.Ql FOO
-.Ql bar
+.\" XXX: Figure out how to indent this.
+Lf(CR) | L C R.
+\&.Dt foo 2@foo(2)@System Calls Manual@foo(2)
+\&.Dt foo 2 m68k@foo(2)@m68k System Calls Manual@foo(2)
+\&.Dt foo 2 baz@foo(2)@System Calls Manual@foo(2)
+\&.Dt foo \[rs]&2 baz@foo(2)@baz@foo(2)
+\&.Dt foo \[dq]\[dq] baz@foo@baz@foo

reply via email to

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