[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing header/footer font in mm
From: |
G. Branden Robinson |
Subject: |
Re: Changing header/footer font in mm |
Date: |
Sun, 21 Apr 2024 23:52:48 -0500 |
Hi Jan,
At 2024-04-19T04:13:11+0200, Jan Eden wrote:
> On 2024-04-18 14:47, G. Branden Robinson wrote:
> > 1. If the _layout_ of the headers and footers is fine, and you
> > desire only to change the font they use, that is easily done with
> > the mm macros `PH` and `PF`. For example:
> >
> > .PH "'\F[P]Smith'page %'April 2024'"
> > .PF "'\F[P]draft'\n[year]-\n[mo]-\n[dy]'groff \n[.x].\n[.y].\n[.Y]'"
> > .H 1 Introduction
> > Sed ut perspiciatis, unde omnis iste natus error sit voluptatem
> > accusantium doloremque laudantium, totam rem aperiam eaque ipsa,
> > quae ab illo inventore veritatis et quasi architecto beatae vitae
> > dicta sunt, explicabo.
> >
> > In the foregoing, I lazily neglected resetting the family back to
> > its previous value (with `\F[]`) because in this context it simply
> > isn't necessary.
>
> Thank you – this is what I had expected as a last resort if my
> assumption of a simple solution had proven false.
>
> But Thomas' earlier suggestion to just move the font family to the
> first position (.fp 1 HR) is what I was looking for, even though the
> solution might not be portable
There _isn't_ a completely portable way to specify fonts in *roff
because AT&T troff never established a standard set of them. And
couldn't do so, because they were at the mercy of the output devices.
> and the behavior of fp with respect to the different environments is
> "odd", according to Damian.
The list of font mounting positions is not environment-specific, but
global to the formatter.
For mm, what I would do is set up the mounting positions to replace
Times with Helvetica.
.fp 1 HR
.fp 2 HI
.fp 3 HB
.fp 4 HBI
...though if I recall correctly, mm internally never explicitly uses
mounting position 4 for any reason. And quick grepping suggests to me
that neither DWB 3.3 mm nor groff mm do so. The availability of a
bold-italic face was relatively late-breaking in *roff historical
development.
Here's a task for an interested contributor.
Port the following to mm(7):
commit 90e85401af4749809469a1b47e7504b0364fe6f8
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Wed Apr 21 04:28:52 2021 +1000
tmac/s.tmac: Make FAM string work more sensibly.
* tmac/s.tmac: Make the FAM string work more sensibly; it now applies to
headers, footers, and footnotes only if set before the first call of a
sectioning, paragraphing, or (non-date) document description macro.
(PT, BT): Set the font family to that saved for titles.
(fn*do-FS): Set the font family to that saved for footnotes.
(par@init): Copy the document font family to independent strings for
titles and footnotes.
(par@reset): If in a footnote environment, set the font family to that
saved for footnotes; otherwise use \*[FAM].
* tmac/groff_ms.7.man (Differences from troff ms/Text settings):
Describe placement-dependent effect of FAM string setting.
* doc/groff.texi (Highlighting in ms):
* doc/ms.ms (Highlighting): As above, and suggest different occasions in
which ".ds FAM C" and "CW" are convenient.
Fixes <https://savannah.gnu.org/bugs/?60422>.
> In any case, I am very grateful for the detailed explanation
> (extending to headers/footers for recto/verso pages) which will come
> in handy when a more complex configuration is needed.
No worries. I appreciate your patience with my tendency to overexplain
things.
Regards,
Branden
signature.asc
Description: PGP signature