From: "G. Branden Robinson" <g.branden.robinson@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org, groff@gnu.org
Subject: Re: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]
Date: Thu, 2 Jan 2025 06:14:00 -0600 [thread overview]
Message-ID: <20250102121400.gklcd2t7vecwtox3@illithid> (raw)
In-Reply-To: <87o70qg9gi.fsf@localhost>
[-- Attachment #1: Type: text/plain, Size: 2546 bytes --]
Hi Ihor,
At 2025-01-01T09:38:37+0000, Ihor Radchenko wrote:
> "onf" <onf@disroot.org> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-01-02 12:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 7:51 [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)] Xiyue Deng
2024-03-03 13:30 ` Ihor Radchenko
2024-03-12 0:06 ` Xiyue Deng
2024-03-13 11:25 ` Ihor Radchenko
2024-03-14 21:46 ` Jeremy Sowden
2024-05-22 9:54 ` Ihor Radchenko
2024-12-18 17:20 ` G. Branden Robinson
2024-12-22 15:41 ` Ihor Radchenko
2024-12-31 17:00 ` G. Branden Robinson
2024-12-31 18:15 ` Ihor Radchenko
2024-12-31 18:42 ` onf
2024-12-31 18:54 ` onf
2025-01-01 9:38 ` Ihor Radchenko
2025-01-01 12:30 ` onf
2025-01-02 14:29 ` onf
2025-01-02 17:47 ` [BUG] ox-man: Nested markup is broken (was: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]) Ihor Radchenko
2025-01-02 21:51 ` onf
2025-01-03 8:38 ` [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)] G. Branden Robinson
2025-01-04 0:23 ` onf
2025-01-04 6:37 ` G. Branden Robinson
2025-01-04 20:10 ` onf
2025-01-05 15:24 ` Lennart Jablonka
2025-01-04 13:26 ` Ihor Radchenko
2025-01-04 16:22 ` Dave Kemper
2025-01-04 17:37 ` Ihor Radchenko
2025-01-02 12:14 ` G. Branden Robinson [this message]
2025-01-04 12:21 ` Ihor Radchenko
2025-01-02 12:38 ` G. Branden Robinson
2025-01-02 14:21 ` onf
2025-01-04 12:36 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250102121400.gklcd2t7vecwtox3@illithid \
--to=g.branden.robinson@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=groff@gnu.org \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).