bug-groff
[Top][All Lists]
Advanced

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

[bug #60916] [mm] ms.cov asks for fonts by name, making man page dubious


From: G. Branden Robinson
Subject: [bug #60916] [mm] ms.cov asks for fonts by name, making man page dubious
Date: Wed, 14 Jul 2021 07:51:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?60916>

                 Summary: [mm] ms.cov asks for fonts by name, making man page
dubious
                 Project: GNU troff
            Submitted by: gbranden
            Submitted on: Wed 14 Jul 2021 11:51:40 AM UTC
                Category: Macro - mm
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Back in 2006, this change was made:


commit ba68c86474175c67c2b810960b9f39dc60fd575b
Author: Werner LEMBERG <wl@gnu.org>
Date:   Tue Mar 28 12:32:04 2006 +0000

    . Hardwire first four font positions with R, I, B, and BI -- the
      documentation explicitly refers to this feature (cf. the `HF'
      string register).
[...]  
    Patches for both problems have been contributed by Nick Stoughton
    <nick@usenix.org>.


The man page says this:


   Fonts
       In mm, the fonts (or rather, font styles) R (normal), I (italic), and
       B (bold) are hardwired to font positions 1, 2, and 3, respectively.
       Internally, font positions are used for backwards compatibility.  From
       a practical point of view it doesn’t make a big difference—a
different
       font family can still be selected by invoking groff’s fam request or
       using its -f command-line option.  On the other hand, if you want to
       replace just, for example, font I with Zapf Chancery medium italic,
you
       have to use the fp request, as in you have to replace the font at
posi‐
       tion 2 (with a call to “.fp 2 ...”).


However, not everything was tested because this happens:

Input:


.fp 2 ZCMI
.COVER
.TL
Manifesto
.AU "Beau L. Krapp"
.COVEND
.P
This is my
.I important
document.


Output:


troff: backtrace:
'/home/branden/src/GIT/groff/build/../contrib/mm/mm/ms.cov':53: while loop
troff: backtrace:
'/home/branden/src/GIT/groff/build/../contrib/mm/mm/ms.cov':61: macro
'cov@print-authors'
troff: backtrace:
'/home/branden/src/GIT/groff/build/../contrib/mm/mm/ms.cov':104: macro
'COVEND'
troff: backtrace: file 'EXPERIMENTS/fp.mm':6
troff: EXPERIMENTS/fp.mm:6: warning: can't find font 'I'


In the foregoing example, the document does render the word "important" in
ZCMI, but the author name, which should be in italics, is in roman instead,
hence the diagnostics.

The man page _also_ says:


              Font control of the heading

                     The font of each heading level is controlled by string
                     HF.  It contains a font number or font name for each
                     level.  Default value is

                            2 2 2 2 2 2 2 2 2 2 2 2 2 2

                     (all headings in italic).  This could also be written as

                            I I I I I I I I I I I I I I

                     Note that some other implementations use 3 3 2 2 2 2 2
as
                     the default value.  All omitted values are presumed to
                     have value 1.


Rather than porting ms.cov to use the antiquated feature of font positions, I
propose to move the rest of mm back to the named font mechanism, adapting HF
as conceived above.  People can use the `ftr` request to replace font (styles)
instead of `fp` (indeed the former feature was already in groff in 2006).

It appears that there are only a handful of places in m.tmac that need to
change to achieve this.

I'll try this out and see what happens.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60916>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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