[Top][All Lists]

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

Proposed: an eqn keyword change: gfont -> gifont

From: G. Branden Robinson
Subject: Proposed: an eqn keyword change: gfont -> gifont
Date: Fri, 7 Apr 2023 23:53:01 -0500

Hi folks,

I've got the following worked up and was wondering who had support for
or objections to it.  I filed a Savannah ticket for it on 27 March.[1]

This isn't for 1.23.0--just something I put together on while Bertrand
evaluates a pile of changes for possible inclusion in RC4.[2]

New man page text:

    eqn uses up to three typefaces to set an equation: an italic face
    for letters, a roman face for everything else, and a bold face.
    (You might use bold to notate vectors or matrices, for example.)
    You can control which characters are treated as letters (and
    therefore set in italics) with the chartype primitive described
    above.  A type of letter causes a character to be set in italic
    type.  A type of digit causes a character to be set in roman type.
    The default typefaces correspond to the groff font styles I, R, and
    B, respectively, using the font family that is current when the
    equation is set.  Use the primitives gifont, grfont, and gbfont to
    assign a groff typeface to each of eqn's faces.  If you employ only
    the roman, italic and bold primitives to change fonts within an
    equation, avoiding use of groff font selection escape sequences,
    these suffice to configure all the typefaces used by your equations.

    gbfont f
        Set the bold font to f.

    gifont f
        Set the italic font to f.

    grfont f
        Set the roman font to f.

    For AT&T eqn compatibility, gfont is recognized as a synonym for

NEWS text:

o The "gifont" primitive replaces "gfont" as the means of configuring
  the global italic face within an equation.  "gfont" remains recognized
  as a synonym for backward compatibility.  The new name is intended to
  ease acquisition of the eqn language in light of GNU eqn's
  thirty-year-old extensions "gbfont" and "grfont".

Since it's so short, here's the code change:

diff --git a/src/preproc/eqn/lex.cpp b/src/preproc/eqn/lex.cpp
index 8eaaca593..c78ab32ba 100644
--- a/src/preproc/eqn/lex.cpp
+++ b/src/preproc/eqn/lex.cpp
@@ -94,7 +94,8 @@ static struct {
   { "mark", MARK },
   { "lineup", LINEUP },
   { "space", SPACE },
-  { "gfont", GIFONT },
+  { "gifont", GIFONT },
+  { "gfont", GIFONT }, // for backward compatibility
   { "gsize", GSIZE },
   { "define", DEFINE },
   { "sdefine", SDEFINE },
@@ -1008,7 +1009,7 @@ void do_gifont()
   int t = get_token(2);
   if (t != TEXT && t != QUOTED_TEXT) {
-    lex_error("invalid argument to gfont primitive");
+    lex_error("invalid argument to gifont primitive");
   token_buffer += '\0';

Crazy?  Sensible?  A long time coming?



Attachment: signature.asc
Description: PGP signature

reply via email to

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