Hi Ihor, At 2025-01-01T09:38:37+0000, Ihor Radchenko wrote: > "onf" writes: > > >> Also, what if we leave \fC and add \f[CR]/.EX on top? > >> AFAIU, the worst case scenario for \fC is that it does nothing. By > >> leaving it there, we thus retain old working exports working while also > >> adding appropriate format when \f[CR] is supported. > > > > The \f escape sets current font. \fP restores previous font. > > What this means is that doing \fC\f[CR]Lorem\fP: > > (1) sets the text Lorem in Courier if font name C or CR exists > > (2) restores previous font if neither font C nor CR exists > > (3) sets font to Courier if both font name C and CR exist > > What about \fC\f[CR]Lorem\fP\fP? Unreliable. As onf pointed out, not only is the font selection not backed up by a stack, but it the identity of "the previous font" is not well-defined if you attempt to select a non-existent font (as either or both of `C` and `CR` may be). https://lists.gnu.org/archive/html/groff/2022-11/msg00162.html There simply is no portable way to change the font family (serif, sans serif, monospaced) inline in the man(7) macro language. And even if there were, such a change would not show up on terminals. > >> Do I understand correctly that blank line is sometimes interpreted > >> as vertical spacing and sometimes ignored? > > > > A blank input line is equivalent to .sp unless the .blm request was > > called to change this behavior. .blm is groff's invention (see > > groff_diff(7)). > > Then maybe we can put .sp explicitly instead of a blank line. I advise against it. If what follows is a paragraph or a (sub)section heading, then by calling the applicable macro, you will get any necessary vertical space automatically. Also, on typesetters, the vertical space between paragraphs and between paragraphs and (sub)section headings, is not 1v, but 0.4v. This has been the case since McIlroy's original man(7) 45 years ago. https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/lib/tmac/tmac.an See the comment '# paragraph distance'. > In our code, we add blank after blocks (or displays) of code. As noted, the macro package will take care of this for you, while leaving you the flexibility to set a code block _without_ immediately subsequent vertical space. > Extra vertical space after seems to be reasonable. Also not reliable. Some man(1) implementations, including man-db man(1), "squeeze" multiple blank lines into one. Regards, Branden