groff-commit
[Top][All Lists]
Advanced

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

[groff] 28/38: [mdoc]: Add support for `MF` rendering option.


From: G. Branden Robinson
Subject: [groff] 28/38: [mdoc]: Add support for `MF` rendering option.
Date: Sun, 24 Mar 2024 16:59:59 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 6a11333f1cdc9dc5aeb1cd4761d513c8dfe81672
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Mar 23 11:49:14 2024 -0500

    [mdoc]: Add support for `MF` rendering option.
    
    ...in parallel with groff man(7), and working much like the `HF` string.
    
    * tmac/doc.tmac (initialization): If the user specifies no `MF` string
      definition, define it as `I`.
    * tmac/mdoc/doc-ditroff:
    * tmac/mdoc/doc-nroff: Default `doc-page-identifier-font` and
      `doc-Xr-font` to use the value of the `MF` string.
    
    * NEWS:
    * tmac/groff_mdoc.7.man (Options): Document it.
    
    Fixes <https://savannah.gnu.org/bugs/?65484>.
---
 ChangeLog             | 16 ++++++++++++++++
 NEWS                  |  4 ++--
 tmac/doc.tmac         |  4 +++-
 tmac/groff_mdoc.7.man | 19 +++++++++++++++++++
 tmac/mdoc/doc-ditroff |  4 ++--
 tmac/mdoc/doc-nroff   |  4 ++--
 6 files changed, 44 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f2d3348d..d684578d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-03-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [mdoc]: Add support for `MF` rendering option.  in parallel with
+       groff man(7), and working much like the `HF` string.
+
+       * tmac/doc.tmac (initialization): If the user specifies no `MF`
+       string definition, define it as `I`.
+       * tmac/mdoc/doc-ditroff:
+       * tmac/mdoc/doc-nroff: Default `doc-page-identifier-font` and
+       `doc-Xr-font` to use the value of the `MF` string.
+
+       * NEWS:
+       * tmac/groff_mdoc.7.man (Options): Document it.
+
+       Fixes <https://savannah.gnu.org/bugs/?65484>.
+
 2024-03-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/mdoc/doc-common ([initialization], Dt, Os, doc-header,
diff --git a/NEWS b/NEWS
index 2eb14d4e8..d2575537b 100644
--- a/NEWS
+++ b/NEWS
@@ -188,8 +188,8 @@ o The doc (mdoc) macro package's `Lk`, `Mt`, and `Xr` 
macros now produce
   hyperlinks on HTML, PDF, and terminal devices.  See above regarding
   hyperlink support being enabled by default.
 
-o The doc (mdoc) macro package now honors the `U` register as the an
-  (man) package does.
+o The doc (mdoc) macro package now honors the `U` register and `MF`
+  string as the an (man) package does.
 
 o The new macro file "koi8-r.tmac" supports the KOI8-R character
   encoding, which supports the new Russian locale for groff.
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 62aff7eaa..7b4f175fa 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -202,7 +202,9 @@
 .
 .\" LL and LT registers are handled by the doc-setup-page-layout macro.
 .
-.\" TODO: Implement MF string.
+.\" man page identifier font
+.if !d MF \
+.  ds MF I\"
 .
 .\" starting page number
 .\"
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 4b9f54747..e637f31a9 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -5124,6 +5124,25 @@ both registers default to 80n for terminal devices and 
6.5i otherwise.
 .
 .
 .Pp
+The
+.Ql MF
+string sets
+the font used for man page identifiers in document headers and footers
+and in the formatted output of the
+.Ql \&Xr
+macro.
+.
+The default is
+.Ql I
+(italic style of the default family).
+.
+Any valid argument to
+.Xr groff Ns 's
+.Ql ft
+request may be used.
+.
+.
+.Pp
 Setting the
 .Ql P
 register starts enumeration of pages at its value.
diff --git a/tmac/mdoc/doc-ditroff b/tmac/mdoc/doc-ditroff
index 8b8f5421d..0c95e6c2f 100644
--- a/tmac/mdoc/doc-ditroff
+++ b/tmac/mdoc/doc-ditroff
@@ -51,7 +51,7 @@
 .
 .\" the 'doc-xx-font' strings must not be empty!
 .
-.ds doc-page-identifier-font \f[I]
+.ds doc-page-identifier-font \f[\*[MF]]
 .ds doc-page-section-font \f[R]
 .ds doc-Ad-font \f[I]
 .ds doc-Ar-font \f[CI]
@@ -76,7 +76,7 @@
 .ds doc-Sy-font \f[B]
 .ds doc-Tn-font \f[R]
 .ds doc-Va-font \f[I]
-.ds doc-Xr-font \f[I]
+.ds doc-Xr-font \f[\*[MF]]
 .
 .ds doc-left-parenthesis \f[R](\f[]
 .ds doc-right-parenthesis \f[R])\f[]
diff --git a/tmac/mdoc/doc-nroff b/tmac/mdoc/doc-nroff
index bbb4d42d1..c4d02ee8b 100644
--- a/tmac/mdoc/doc-nroff
+++ b/tmac/mdoc/doc-nroff
@@ -43,7 +43,7 @@
 .
 .\" the 'doc-xx-font' strings must not be empty!
 .
-.ds doc-page-identifier-font \f[I]
+.ds doc-page-identifier-font \f[\*[MF]]
 .ds doc-page-section-font \f[R]
 .ds doc-Ad-font \f[I]
 .ds doc-Ar-font \f[I]
@@ -68,7 +68,7 @@
 .ds doc-Sy-font \f[B]
 .ds doc-Tn-font \f[R]
 .ds doc-Va-font \f[I]
-.ds doc-Xr-font \f[I]
+.ds doc-Xr-font \f[\*[MF]]
 .
 .ds doc-left-parenthesis \f[R](\f[]
 .ds doc-right-parenthesis \f[R])\f[]



reply via email to

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