groff-commit
[Top][All Lists]
Advanced

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

[groff] 22/72: Migrate terminology away from "paper size".


From: G. Branden Robinson
Subject: [groff] 22/72: Migrate terminology away from "paper size".
Date: Sun, 23 Oct 2022 22:25:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 60e3bd7ab36267f82b1b7ae0fc3c3f073ae91843
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Oct 21 17:56:36 2022 -0500

    Migrate terminology away from "paper size".
    
    Migrate terminology from "paper size" to "paper format" or "paper
    dimensions" as appropriate in documentation and diagnostic messages.
    "Format" implies an orientation (which can be overridden in many cases)
    whereas size does not.  When only the magnitudes of measurements are at
    issue (mainly for internal purposes), use the term "dimensions".
    
    * NEWS:
    * PROBLEMS:
    * doc/groff.texi:
    * m4/groff.m4 (GROFF_PAGE):
    * man/groff_font.5.man:
    * man/groff_tmac.5.man:
    * src/devices/grodvi/dvi.cpp (main):
    * src/devices/grolbp/grolbp.1.man:
    * src/devices/grolbp/lbp.cpp (main):
    * src/devices/grolj4/grolj4.1.man:
    * src/devices/grolj4/lj4.cpp (lj4_printer::lj4_printer, main):
    * src/devices/grolj4/lj4_font.5.man:
    * src/devices/gropdf/gropdf.1.man:
    * src/devices/grops/grops.1.man:
    * src/devices/grops/ps.cpp (main):
    * src/roff/groff/groff.1.man:
    * tmac/papersize.tmac: Do it.
---
 ChangeLog                         | 27 +++++++++++++++++++++++++++
 NEWS                              |  2 +-
 PROBLEMS                          |  2 +-
 doc/groff.texi                    | 18 ++++++++++--------
 m4/groff.m4                       |  2 +-
 man/groff_font.5.man              |  6 +++---
 man/groff_tmac.5.man              |  4 ++--
 src/devices/grodvi/dvi.cpp        |  2 +-
 src/devices/grolbp/grolbp.1.man   | 14 +++++++-------
 src/devices/grolbp/lbp.cpp        | 22 +++++++++++++---------
 src/devices/grolj4/grolj4.1.man   |  8 ++++----
 src/devices/grolj4/lj4.cpp        |  8 ++++----
 src/devices/grolj4/lj4_font.5.man |  2 +-
 src/devices/gropdf/gropdf.1.man   | 24 ++++++++++++------------
 src/devices/grops/grops.1.man     |  2 +-
 src/devices/grops/ps.cpp          | 13 +++++++------
 src/roff/groff/groff.1.man        |  2 +-
 tmac/papersize.tmac               |  6 ++++--
 18 files changed, 100 insertions(+), 64 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ced21fdae..ea94c008e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2022-10-21  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       Migrate terminology from "paper size" to "paper format" or
+       "paper dimensions" as appropriate in documentation and
+       diagnostic messages.  "Format" implies an orientation (which can
+       be overridden in many cases) whereas size does not.  When only
+       the magnitudes of measurements are at issue (mainly for internal
+       purposes), use the term "dimensions".
+
+       * NEWS:
+       * PROBLEMS:
+       * doc/groff.texi:
+       * m4/groff.m4 (GROFF_PAGE):
+       * man/groff_font.5.man:
+       * man/groff_tmac.5.man:
+       * src/devices/grodvi/dvi.cpp (main):
+       * src/devices/grolbp/grolbp.1.man:
+       * src/devices/grolbp/lbp.cpp (main):
+       * src/devices/grolj4/grolj4.1.man:
+       * src/devices/grolj4/lj4.cpp (lj4_printer::lj4_printer, main):
+       * src/devices/grolj4/lj4_font.5.man:
+       * src/devices/gropdf/gropdf.1.man:
+       * src/devices/grops/grops.1.man:
+       * src/devices/grops/ps.cpp (main):
+       * src/roff/groff/groff.1.man:
+       * tmac/papersize.tmac: Do it.
+
 2022-10-19  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/mdoc/doc-ditroff (doc-left-parenthesis)
diff --git a/NEWS b/NEWS
index e1a505c3e..c777ea1ae 100644
--- a/NEWS
+++ b/NEWS
@@ -429,7 +429,7 @@ o The s (ms) macro package supports new macros `XN` and 
`XH` to ease the
 
 o The "a4.tmac" file has been dropped from the distribution.  Its
   successor, "papersize.tmac", has been present and documented for
-  nearly 20 years.  See subsection "Paper size" of groff(1).
+  nearly 20 years.  See subsection "Paper format" of groff(1).
 
 o The "safer.tmac" file has been dropped from the distribution.  It was
   present only to support man(1) programs that unconditionally passed
diff --git a/PROBLEMS b/PROBLEMS
index dc398e3db..889d7f526 100644
--- a/PROBLEMS
+++ b/PROBLEMS
@@ -453,7 +453,7 @@ See groff(1) and groff_tmac(5) for more information.
 * When I print the output of groff -Tps, the output is always shifted
   up by about 0.7 inches; I'm using 8.5x11 inch paper.
 
-Make sure that the paper size is `letter'.  See groff_tmac(5).
+Make sure that the paper format is "letter".  See groff_tmac(5).
 
 ----------------------------------------------------------------------
 
diff --git a/doc/groff.texi b/doc/groff.texi
index 19f6e8d61..598b920d3 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -903,7 +903,7 @@ exception.} (with more or less compatible changes).  
Similarly, we say
 * Environment::
 * Macro Directories::
 * Font Directories::
-* Paper Size::
+* Paper Format::
 * Invocation Examples::
 @end menu
 
@@ -1504,7 +1504,7 @@ those directories during the installation process.
 
 @c =====================================================================
 
-@node Font Directories, Paper Size, Macro Directories, Invoking groff
+@node Font Directories, Paper Format, Macro Directories, Invoking groff
 @section Font Directories
 @cindex font directories
 @cindex directories for fonts
@@ -1561,8 +1561,10 @@ those directories during the installation process.
 
 @c =====================================================================
 
-@node Paper Size, Invocation Examples, Font Directories, Invoking groff
-@section Paper Size
+@node Paper Format, Invocation Examples, Font Directories, Invoking groff
+@section Paper Format
+@cindex paper format
+@cindex format, paper
 @cindex paper size
 @cindex size, paper
 @cindex landscape page orientation
@@ -1605,7 +1607,7 @@ groff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps
 @c =====================================================================
 
 @c BEGIN Keep parallel with groff(1), section "Examples".
-@node Invocation Examples,  , Paper Size, Invoking groff
+@node Invocation Examples,  , Paper Format, Invoking groff
 @section Invocation Examples
 @cindex invocation examples
 @cindex examples of invocation
@@ -18044,7 +18046,7 @@ Recognized paper formats are the ISO and DIN formats
 @code{executive}; and the envelope formats @code{com10}, @code{monarch},
 and @code{DL}.  Matching is performed without regard for lettercase.
 
-Alternatively, the argument can be a custom paper size in the format
+Alternatively, the argument can be a custom paper format in the format
 @code{@var{length},@var{width}} (with no spaces before or after the
 comma).  Both @var{length} and @var{width} must have a unit appended;
 valid units are @samp{i} for inches, @samp{c} for centimeters, @samp{p}
@@ -18183,8 +18185,8 @@ information about the device.
 @cindex format of font description files
 
 On typesetting output devices, each font is typically available at
-multiple sizes.  While paper size measurements in the device description
-file are in absolute units, measurements applicable to fonts must be
+multiple sizes.  While paper measurements in the device description file
+are in absolute units, measurements applicable to fonts must be
 proportional to the type size.  @code{groff} achieves this using the
 precedent set by @acronym{AT&T} device-independent @code{troff}: one
 font size is chosen as a norm, and all others are scaled linearly
diff --git a/m4/groff.m4 b/m4/groff.m4
index a3238dee8..27f954238 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -869,7 +869,7 @@ AC_DEFUN([GROFF_BROKEN_SPOOLER_FLAGS],
 
 
 AC_DEFUN([GROFF_PAGE], [
-  AC_MSG_CHECKING([default paper size])
+  AC_MSG_CHECKING([default paper format])
   groff_prefix=$prefix
   test "$prefix" = NONE && groff_prefix=$ac_default_prefix
   if test -z "$PAGE" && test -r /etc/papersize
diff --git a/man/groff_font.5.man b/man/groff_font.5.man
index afcf52bd0..6252ed90a 100644
--- a/man/groff_font.5.man
+++ b/man/groff_font.5.man
@@ -241,7 +241,7 @@ Matching is performed without regard for lettercase.
 .
 .IP
 Alternatively,
-the argument can be a custom paper size in the format
+the argument can be a custom paper format
 .IB length , width
 (with no spaces before or after the comma).
 .
@@ -517,8 +517,8 @@ the device.
 On typesetting output devices,
 each font is typically available at multiple sizes.
 .
-While paper size measurements in the device description file are in
-absolute units,
+While paper measurements in the device description file are in absolute
+units,
 measurements applicable to fonts must be proportional to the type size.
 .
 .I groff
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index c2d04d445..f5baa79d2 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -513,7 +513,7 @@ See
 .
 .TP
 .I papersize
-enables the paper size to be set on the command line by giving a
+enables the paper format to be set on the command line by giving a
 .BI "\-d \%paper=" size
 option to
 .IR @g@troff .
@@ -558,7 +558,7 @@ respectively,
 defined in its
 .I DESC
 file;
-see subsection \[lq]Paper sizes\[rq]
+see subsection \[lq]Paper format\[rq]
 of
 .MR groff @MAN1EXT@ .
 .
diff --git a/src/devices/grodvi/dvi.cpp b/src/devices/grodvi/dvi.cpp
index 476067378..8d98995c5 100644
--- a/src/devices/grodvi/dvi.cpp
+++ b/src/devices/grodvi/dvi.cpp
@@ -935,7 +935,7 @@ int main(int argc, char **argv)
     case 'p':
       if (!font::scan_papersize(optarg, 0,
                                &user_paper_length, &user_paper_width))
-       error("invalid custom paper size '%1' ignored", optarg);
+       error("ignoring invalid paper format '%1'", optarg);
       break;
     case 'v':
       {
diff --git a/src/devices/grolbp/grolbp.1.man b/src/devices/grolbp/grolbp.1.man
index a09524ef2..448356a0d 100644
--- a/src/devices/grolbp/grolbp.1.man
+++ b/src/devices/grolbp/grolbp.1.man
@@ -50,7 +50,7 @@ output driver for Canon CaPSL printers
 .RB [ \-o\~\c
 .IR orientation ]
 .RB [ \-p\~\c
-.IR paper-size ]
+.IR paper-format ]
 .RB [ \-w\~\c
 .IR width ]
 .RI [ file\~ .\|.\|.]
@@ -67,7 +67,7 @@ output driver for Canon CaPSL printers
 ] [\c
 .BI \-\-orientation= orientation\c
 ] [\c
-.BI \-\-papersize= paper-size\c
+.BI \-\-papersize= paper-format\c
 ]
 .RI [ file\~ .\|.\|.]
 .YS
@@ -399,12 +399,12 @@ or
 .
 .
 .TP
-.BI \-p " paper-size"
+.BI \-p " paper-format"
 .TQ
-.BI \-\-papersize= paper-size
-Set the paper size to
-.IR paper-size ,
-which must be a valid paper size format as described above.
+.BI \-\-papersize= paper-format
+Set the paper format to
+.IR paper-format ,
+which must be a valid paper format as described above.
 .
 .
 .TP
diff --git a/src/devices/grolbp/lbp.cpp b/src/devices/grolbp/lbp.cpp
index fbe633b90..d1c159001 100644
--- a/src/devices/grolbp/lbp.cpp
+++ b/src/devices/grolbp/lbp.cpp
@@ -35,8 +35,11 @@ extern "C" const char *Version_string;
 
 static int user_papersize = -1;                // papersize
 static int orientation = -1;           // orientation
-static double user_paperlength = 0;    // Custom Paper size
+
+// custom paper format
+static double user_paperlength = 0;
 static double user_paperwidth = 0;
+
 static int ncopies = 1;                        // Number of copies
 
 #define DEFAULT_LINEWIDTH_FACTOR 40    // 0.04em
@@ -83,8 +86,9 @@ private:
   unsigned short cur_symbol_set;
   int line_thickness;
   int req_linethickness; // requested line thickness
+  // custom paper format
   int papersize;
-  int paperlength;     // custom paper size
+  int paperlength;
   int paperwidth;
 };
 
@@ -154,10 +158,10 @@ lbp_printer::lbp_printer(int ps, double pw, double pl)
   lbpputs("\033c\033;\033[2&z\033[7 I\033[?32h\033[?33h\033[11h");
   wp54charset(); // Define the new symbol set
   lbpputs("\033[7 I\033[?32h\033[?33h\033[11h");
-  // Paper size handling
+  // Paper format handling
   if (orientation < 0)
     orientation = 0;   // Default orientation is portrait
-  papersize = 14;      // Default paper size is A4
+  papersize = 14;      // Default paper format is A4
   if (font::papersize) {
     papersize = set_papersize(font::papersize);
     paperlength = font::paperlength;
@@ -570,15 +574,15 @@ static struct {
 static int set_papersize(const char *paperformat)
 {
   unsigned int i;
-  // First test for a standard (i.e. supported directly by the printer)
-  // paper size
+  // First, test for a standard (i.e. supported directly by the printer)
+  // paper format.
   for (i = 0 ; i < sizeof(lbp_papersizes) / sizeof(lbp_papersizes[0]); i++)
   {
     if (strcasecmp(lbp_papersizes[i].name,paperformat) == 0)
       return lbp_papersizes[i].code;
   }
-  // Otherwise, we assume a custom paper size
-  return 82;
+  // Otherwise, we assume a custom paper format.
+  return 82; // XXX: magic number
 }
 
 static void handle_unknown_desc_command(const char *command, const char *arg,
@@ -658,7 +662,7 @@ int main(int argc, char **argv)
        const char *s;
        if (!font::scan_papersize(optarg, &s,
                                  &user_paperlength, &user_paperwidth))
-         error("invalid paper size '%1' ignored", optarg);
+         error("ignoring invalid paper format '%1'", optarg);
        else
          user_papersize = set_papersize(s);
        break;
diff --git a/src/devices/grolj4/grolj4.1.man b/src/devices/grolj4/grolj4.1.man
index 411f7ec9a..379e0d816 100644
--- a/src/devices/grolj4/grolj4.1.man
+++ b/src/devices/grolj4/grolj4.1.man
@@ -53,7 +53,7 @@ output driver for HP LaserJet 4 family printers
 .RB [ \-F\~\c
 .IR font-directory ]
 .RB [ \-p\~\c
-.IR paper-size ]
+.IR paper-format ]
 .RB [ \-w\~\c
 .IR line-width ]
 .RI [ file\~ .\|.\|.]
@@ -578,9 +578,9 @@ Format the document in landscape orientation.
 .
 .
 .TP
-.BI \-p " paper-size"
-Set the paper size to
-.IR paper-size ,
+.BI \-p " paper-format"
+Set the paper format to
+.IR paper-format ,
 which must be a valid paper format as described above.
 .
 .
diff --git a/src/devices/grolj4/lj4.cpp b/src/devices/grolj4/lj4.cpp
index fa717dbf0..51a8fa539 100644
--- a/src/devices/grolj4/lj4.cpp
+++ b/src/devices/grolj4/lj4.cpp
@@ -58,7 +58,7 @@ static int user_paper_size = -1;
 static int landscape_flag = 0;
 static int duplex_flag = 0;
 
-// An upper limit on the paper size in centipoints,
+// An upper limit on the paper dimensions in centipoints,
 // used for setting HPGL picture frame.
 #define MAX_PAPER_WIDTH (12*720)
 #define MAX_PAPER_HEIGHT (17*720)
@@ -230,13 +230,13 @@ lj4_printer::lj4_printer(int ps)
   if (font::papersize) {
     int n = lookup_paper_size(font::papersize);
     if (n < 0)
-      error("unknown paper size '%1'", font::papersize);
+      error("ignoring invalid paper format '%1'", font::papersize);
     else
       paper_size = n;
   }
   if (ps >= 0)
     paper_size = ps;
-  printf("\033&l%dA"           // paper size
+  printf("\033&l%dA"           // paper format
         "\033&l%dO"            // orientation
         "\033&l0E",            // no top margin
         paper_table[paper_size].code,
@@ -640,7 +640,7 @@ int main(int argc, char **argv)
       {
        int n = lookup_paper_size(optarg);
        if (n < 0)
-         error("unknown paper size '%1'", optarg);
+         error("ignoring invalid paper format '%1'", font::papersize);
        else
          user_paper_size = n;
        break;
diff --git a/src/devices/grolj4/lj4_font.5.man 
b/src/devices/grolj4/lj4_font.5.man
index bd7035a8a..f9b75bbfd 100644
--- a/src/devices/grolj4/lj4_font.5.man
+++ b/src/devices/grolj4/lj4_font.5.man
@@ -137,7 +137,7 @@ the maximum usable resolution is 32\|767\~\[di]\~17,
 or 1927 units per inch,
 which rounds down to 1200 units per inch.
 .
-If the largest required paper size is less
+If the largest required paper dimension is less
 (e.g.,
 8.5\~in\~\[mu]\~11\~in,
 or A5),
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index fb10a0a88..018a455f4 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -50,7 +50,7 @@ gropdf \- groff output driver for Portable Document Format
 .RB [ \-I\~\c
 .IR dir ]
 .RB [ \-p\~\c
-.IR paper-size ]
+.IR paper-format ]
 \#.RB [ \-w\~\c
 \#.IR n ]
 .RB [ \-u
@@ -177,8 +177,8 @@ it is otherwise searched last.
 Orient the document in landscape format.
 .
 .TP
-.BI \-p " paper-size"
-Set physical dimension of output medium.
+.BI \-p " paper-format"
+Set the physical dimensions of the output medium.
 .
 This overrides the
 .BR papersize ,
@@ -261,9 +261,9 @@ device uses a resolution of 72000 and a sizescale of 1000.
 .
 .
 .LP
-The device description file must contain a valid paper size; see
-.MR groff_font @MAN5EXT@
-for more information.
+The device description file must contain a valid paper format;
+see
+.MR groff_font @MAN5EXT@ .
 .
 .I gropdf
 uses the same Type\~1 Adobe PostScript fonts as the
@@ -797,24 +797,24 @@ One
 special used by the DVI driver is also recognised:
 .
 .TP
-.BI \[rs]X\[aq]papersize= paper-size \[aq]
+.BI \[rs]X\[aq]papersize= paper-format \[aq]
 where the
-.I paper-size
-parameter is the same as the
+.I paper-format
+parameter is the same as that to the
 .B papersize
 command.
 .
 See
-.MR groff_font @MAN5EXT@
-for details.
+.MR groff_font @MAN5EXT@ .
 .
 This means that you can alter the page size at will within the PDF file
 being created by
 .IR gropdf .
 .
-If you do want to change the paper size,
+If you do want to change the paper format,
 it must be done before you start creating the page.
 .
+.
 .LP
 In addition,
 .I gropdf
diff --git a/src/devices/grops/grops.1.man b/src/devices/grops/grops.1.man
index f784e14f1..833eb0548 100644
--- a/src/devices/grops/grops.1.man
+++ b/src/devices/grops/grops.1.man
@@ -374,7 +374,7 @@ certain requirements.
 The device resolution must be an integer multiple of\~72 times the
 .BR sizescale .
 .
-The device description file must contain a valid paper size;
+The device description file must contain a valid paper format;
 see
 .MR groff_font @MAN5EXT@ .
 .
diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp
index 732d2bb39..1a270dac6 100644
--- a/src/devices/grops/ps.cpp
+++ b/src/devices/grops/ps.cpp
@@ -1261,13 +1261,14 @@ int ps_printer::media_width()
 {
   /*
    *  NOTE:
-   *  Although paper size is defined as real numbers, it seems to be
-   *  a common convention to round to the nearest postscript unit.
-   *  For example, a4 is really 595.276 by 841.89 but we use 595 by 842.
+   *  Although paper dimensions are defined as a pair of real numbers,
+   *  it seems to be a common convention to round to the nearest
+   *  PostScript unit.  For example, A4 is really 595.276 by 841.89 but
+   *  we use 595 by 842.
    *
    *  This is probably a good compromise, especially since the
-   *  Postscript definition specifies that media
-   *  matching should be done within a tolerance of 5 units.
+   *  PostScript definition specifies that media matching should be done
+   *  within a tolerance of 5 units.
    */
   return int(user_paper_width ? user_paper_width*72.0 + 0.5
                              : font::paperwidth*72.0/font::res + 0.5);
@@ -1827,7 +1828,7 @@ int main(int argc, char **argv)
     case 'p':
       if (!font::scan_papersize(optarg, 0,
                                &user_paper_length, &user_paper_width))
-       error("invalid custom paper size '%1' ignored", optarg);
+       error("ignoring invalid custom paper format '%1'", optarg);
       break;
     case 'P':
       env = "GROPS_PROLOGUE";
diff --git a/src/roff/groff/groff.1.man b/src/roff/groff/groff.1.man
index 4cd618680..51e5167a1 100644
--- a/src/roff/groff/groff.1.man
+++ b/src/roff/groff/groff.1.man
@@ -751,7 +751,7 @@ It is even.
 .
 .
 .\" ====================================================================
-.SS "Paper size"
+.SS "Paper format"
 .\" ====================================================================
 .
 In GNU
diff --git a/tmac/papersize.tmac b/tmac/papersize.tmac
index fc0058ac3..51cae0553 100644
--- a/tmac/papersize.tmac
+++ b/tmac/papersize.tmac
@@ -141,8 +141,10 @@
 .  el \
 .    nr paper-w 1
 .
-.  ie \n[paper-w] \
-.    tm papersize.tmac: warning: unrecognized paper size '\*[paper-arg]'
+.  ie \n[paper-w] \{\
+.    tmc papersize.tmac: warning: ignoring unrecognized paper format
+.    tm1 " '\*[paper-arg]'
+.  \}
 .  el \
 .    if !r LL \
 .      nr LL \n[.l]u  \" for ms, mdoc, man



reply via email to

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