Hi Branden,

On Fri Jan 3, 2025 at 9:38 AM CET, G. Branden Robinson wrote:
> At 2025-01-02T15:29:59+0100, onf wrote:
> > I don't know why it took me so long, but I think what you're looking
> > for is this:
> >   \fC\f(CRLorem\fR
>
> Not a bad idea, but while you're there, given Ihor's ambitious
> portability objectives, you might as well scoop up the population of
> troffs that named the font `CW`.[1]
>
> So you'd emit `\fC\fCW\fCRLorem\fR`.

Fair point.

> [...]
> At 2025-01-02T22:51:47+0100, onf wrote:
> [...]
> > But I agree; I would track each style change (bold -> not bold,
> > italic -> not italic) and emit an appropriate \f sequence that
> > would match the currently active styles after each such change,
> > like so:
> >   code & bold & italic  \f[CBI]
> >   code & bold           \fC\f(CB
> >   code & italic         \fC\f(CI
> >   code                  \fC\f(CR
> >   bold & italic         \f(BI
> >   bold                  \fB
> >   italic                \fI
> >   none                  \fR
> > 
> > Note that \f[CBI] will break in old troffs due to the "new" \f[]
> > syntax, so a warning should probably be emitted. And I have no
> > idea how good support for {bold,italic} Courier is in older troffs
> > either.
>
> Poor, in general.  Where Courier bold-italic existed, it was sometimes
> called "CX".

I meant support for CB and CI, not CBI.

> > (That is assuming Org-mode markup allows code to be styled like that.)
> > 
> > Also note that if a change involving italic happens between two
> > non-whitespace characters, like so:
> >   groff(/7/)
> > 
> > ...an italic correction should be emitted to prevent the two glyphs
> > colliding into each other:
> >   groff(\,\fI7\fR\/)
> > where:
> >   \,  is left italic correction
> >   \/  is right italic correction
>
> So another thing to know here is that these italic correction escape
> sequences are, yet again, GNU troff extensions.  A legacy formatter is
> likely to render them as if the backslash were absent, which is very
> much not what you want in your output.

Oh. Thanks for pointing that out, I had no idea.

> [...]
> If org-mode did that, it could ignore the `CW` font whose history I just
> went to the trouble to explore, and the problem with `\,` and `\/`
> escape sequences as well.  With a little more research we might find
> that org-mode could disregard `\fC` as well.

Speaking of the left italic correction (\,), could you please give me
some example(s) where it's actually useful? I have yet to see a single
instance where it changes anything... (I don't rule out the possibility
that I may be using it incorrectly or that my fonts might be
misconfigured, though.)

> [...]
> [5] I admit I'm a little fuzzy on Plan 9 from User Space's objectives
>     for its troff.  I can say that the pace of its development is not
>     swift.  I don't think Plan 9 advocates pick up the system to use its
>     typesetter.

My understanding is that Plan 9 from User Space is merely providing a
port of the Plan 9 program. My impression of Plan 9's troff is that
it's a poorly maintained descendant of DWB troff that's used only to
format manpages.

~ onf

Reply via email to