emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
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: Sun, 22 Dec 2024 15:41:57 +0000	[thread overview]
Message-ID: <87ttav7mii.fsf@localhost> (raw)
In-Reply-To: <20241218172040.tyytdhbyl7annyli@illithid>

"G. Branden Robinson" <g.branden.robinson@gmail.com> writes:

>> Jeremy suggests that "C" may be an old alias for Courier, and if
>> that's the case it should be changed to "\f[CR]".  Would be great if
>> Org people can confirm.
>
> That is good advice and it is what I recommend if you're writing in
> "raw" roff.  The context of the discussion is not ultra-clear to me; is
> ox-man.el a replacement for the old GNU Emacs man pager, "woman"?

Nope. ox-man is a converter between Org markup and Man page sources:

Given the following Org markup:

  *This is test*
  ~code a+b~ here a+b.

 [*...* is bold markup. ~...~ is code markup.]

we aim to produce a valid man file that approximates the initial Org
markup as much as possible:

    .TH "" "1" 
    .PP
    \fBThis is test\fP
    \fCcode a+b\fP here a+b.

And this discussion was about using \fC to represent "code" (also,
"fixed width" and tables). We use \fC historically, and it is not very
clear what could be a replacement that does not break Man export
compared to previously produced results.

>>>   The best solution known to me is to use an extension to the man(7)
>>>   language.  It first appeared in Ninth Edition Unix (1986) and was
>>>   adopted by a groff release in 2009.  That is the `EX`/`EE` macro
>>>   pair, which sets a monospaced display.  (In other words, filling is
>>>   disabled and a monospaced font selected if necessary.)
>
> Yes.

Ok. But will it work inline?
From my reading of man 7 man, .EX/.EE are more suitable for paragraph
markup:

       .EX
       .EE    Begin and end example.  After .EX, filling is disabled and a
              constant-width (monospaced) font is selected.  Calling .EE
              enables filling and restores the previous font.

              These macros are extensions introduced in Ninth Edition
              Research Unix.  Systems running that troff, or those from
              Documenter’s Workbench, Heirloom Doctools, or Plan 9 troff
              support them.  To be certain your page will be portable to
              systems that do not, copy their definitions from the
              an-ext.tmac file of a groff installation.

>> However, as you observe, `\f[CR]` doesn't (nor does `\f(CR`).  I note
>> that groff's HTML support is stated in the grohtml(1) man-page to be
>> in beta.  Haven't checked the source to determine whether that is
>> what's going on here.
>
> It's a mess. :(
>
> https://savannah.gnu.org/bugs/index.php?61915
>
> That's the tip of a large iceberg.

Ok. So much for testing via man->HTML exporter.
What about PDF?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>


      reply	other threads:[~2024-12-22 15:41 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
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 [this message]

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=87ttav7mii.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    /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).