The me
macros in groff
use the following font positions for various types of text:
- Normal text font
- (unused?)
- Title font and section font
The macros will switch to use the fonts loaded at these positions when setting the text for e.g. a section title, so the .ft
macro would be ineffective. You would still be able to use e.g.
.sh 1 "\f(HBSection title"
to switch to a bold sans-serif font for the section title, but the numbering of the section would still be using a serif font.
The me
macro file sets up a number of parameters that they use for things like fonts and point sizes etc., so much of the interesting stuff is quite easy to modify by just changing a few number registers and things like that, but this is unfortunately not covered by the groff_me(7)
manual. It's also well hidden in the e.tmac
macro file (due to the file having had comments stripped out of it). I had to read the original (un-stripped) e.tmac-u
file in the groff
source distribution to figure this out:
.\" *** PARAMETRIC INITIALIZATIONS ***
.
.
.rr x
.nr $v \n(.v00+\n(.sp-1/\n(.sp \" vs as % of ps for .sz request
.nr $V \n($v \" same for displays & footnotes
.nr hm 4v \" header margin
.nr tm 7v \" top margin
.nr bm 6v \" bottom margin
.nr fm 3v \" footer margin
.nr tf 3 \" title font: (real) Times Bold
.nr tp 10 \" title point size
.hy 6
.nr bi 4m \" indent for blocks
.nr pi 5n \" indent for paragraphs
.nr pf 1 \" normal text font
.nr pp 10 \" normal text point size
.nr qi 4n \" indent for quotes
.nr qp -1 \" down one point
.nr ii 5n \" indent for .ip's and .np's
.nr $m 1 \" max number of columns
.nr $s 4n \" column separation
.nr sf 3 \" section font -- Times Bold
.nr sp 10 \" section title pointsize
.nr ss 12p \" section prespacing
.nr si 0 \" section indent
To change the section and title font to a bold sans-serif font, use
.fp 3 HB
to load the HB
font into position 3. This would then be picked up by the .sh
macro and others.
Example:
.fp 3 HB
.bp
.sh 1 "Heading 1"
.lp
Text text.
.sh 2 "Heading 2"
.lp
Text text.
This would generate
