groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] 03/09: tmac/an-old.tmac: Stop remapping ` and '.


From: John Gardner
Subject: Re: [groff] 03/09: tmac/an-old.tmac: Stop remapping ` and '.
Date: Mon, 2 Nov 2020 23:24:49 +1100

I think it's time we took constant-width fonts seriously when preparing
output for the terminal. Here me out on this:

You see, I've never, *ever* needed fancy typography when typesetting code
samples, which are invariably set in a fixed-pitch (monspace) typeface. The
use of a fixed-pitch font stipulates the author's expectation that that
verbatim input should *stay* verbatim. On the other hand, nobody in their
right mind would deliberately write source-code in a proportional typeface,
so we can trust the use of Georgia or Helvetica to indicate body text—stuff
for reading and styling.

So in all seriousness, we should be revising our man pages to produce
better-looking monospaced output. Have you tried viewing your average
man(7) user's
"EXAMPLES" section as PostScript? It's rarely pretty because authors don't
care about switching between proportional and constant-width
typefaces. After all, why *would* you if you only care about terminal
output?

Currently, \f(CW is meaningless in -Tutf8 or -Tascii output, but it could
very well be exploited to know which quotes are appropriate to remap, and
what portions of an author's document to keep our grubby meathooks off of.

On Mon, 2 Nov 2020 at 22:09, Ingo Schwarze <schwarze@usta.de> wrote:

> Hi,
>
> Werner LEMBERG wrote on Mon, Nov 02, 2020 at 09:42:35AM +0100:
>
> > To summarize: It seems that there is only a single platform left today
> > that by default uses a bitmap font for terminals with symmetric ` and
> > ' characters.  This sort-of proves my point, doesn't it?
>
> I fear you missed the point.  What matters is that large numbers
> of manual pages use unescaped ' and ` to represent plain ASCII '
> and ` for programming language syntax documentation - because that
> has been supported in manual pages for more than a decade, because
> authors have become used to it, and because it seems likely that
> before 2008, not many people ever considered mon-ASCII output of
> manual pages.  So dropping support now gratuitiously breaks formatting
> of large numbers of manual pages in an important way, changing all
> existing pages would be a huge make-work project, and attempting
> to re-educate programmers is likely to alienate many of them.
>
> The shape of glyphs in some fonts has nothing to do with the issues
> involved.
>
> Admittedly, Jan could have chosen a less misleading example.  From
> the context of his mail, it appeared that he intended `that' as
> "ASCII backtick quote apostophe-quote" (even though that is
> ungrammatical in most programming languages i'm aware of), not as
> "that in single quotes".  An example like
>
>   my_var=`sed 's/foo/bar/g' input.txt`
>
> would have been less confusing.
>
> Yours,
>   Ingo
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]