From: Ihor Radchenko <yantar92@posteo.net>
To: Xiyue Deng <manphiz@gmail.com>
Cc: emacs-orgmode@gnu.org, Jeremy Sowden <jeremy@azazel.net>
Subject: Re: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]
Date: Wed, 13 Mar 2024 11:25:23 +0000 [thread overview]
Message-ID: <878r2mxtjw.fsf@localhost> (raw)
In-Reply-To: <87h6hcia9y.fsf@debian-hx90.lan>
Xiyue Deng <manphiz@gmail.com> writes:
> I'm not very familiar with roff so my understanding may be off.
> According to the `Safe subset' section in man(7), they mentioned the
> following:
>
> ,----
> | Font changes (ft and the \f escape sequence) should only have the
> | values 1, 2, 3, 4, R, I, B, P, or CW (the ft command may also have no
> | parameters).
> `----
>
> Does it mean `\fC' should be replaced by `\f[CW]'?
I am not sure
man 7 groff has
Fonts often have trademarked names, and even Free Software fonts
can require renaming upon modification. groff maintains a
convention that a de‐ vice’s serif font family is given the name
T (“Times”), its sans-serif family H (“Helvetica”), and its
monospaced family C (“Courier”). Histori‐ cal inertia has driven
groff’s font identifiers to short uppercase abbreviations of font
names, as with TR, TB, TI, TBI, and a special font S.
So, \fC refers to "Courier".
I did not find any text description of CW font, but my groff
installation has usr/share/groff/1.23.0/font/devdvi/CW font spec:
name CW
special
...
for comparison, /usr/share/groff/1.23.0/font/devps/CR has
name CR
internalname Courier
...
which looks more suitable. But CR is not listed in "safe" subset
(man 7 man)
Also, neither CW nor CR work with html output:
with \fC
.TH "" "1"
.PP
\fBThis is test\fP
\fCcode a+b\fP here a+b.
yields (groff -Thtml test.man)
<p><b>This is test</b> <tt>code a+b</tt> here a+b.</p>
Note <tt> tag.
but with \f[CW]
.TH "" "1"
.PP
\fBThis is test\fP
\f[CW]code a+b\fP here a+b.
<p><b>This is test</b> code a+b here a+b.</p>
No special markup is applied to the code.
Same for \f[CR].
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2024-03-13 11:22 UTC|newest]
Thread overview: 8+ 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 [this message]
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
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=878r2mxtjw.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=jeremy@azazel.net \
--cc=manphiz@gmail.com \
/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).