groff-commit
[Top][All Lists]
Advanced

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

[groff] 05/05: [mdoc]: Fix Debian #919890 (bad page # placement).


From: G. Branden Robinson
Subject: [groff] 05/05: [mdoc]: Fix Debian #919890 (bad page # placement).
Date: Wed, 18 Nov 2020 05:42:10 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 456dad17ba6a86738b980c21bd5a88eab25e2840
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 18 18:44:24 2020 +1100

    [mdoc]: Fix Debian #919890 (bad page # placement).
    
    * tmac/mdoc/doc-common-u (doc-footer): When performing double-sided page
      layout, Set page number on outside of _recto_ {odd-numbered} pages, as
      is conventional and for consistency with man(7).
    
    * tmac/groff_mdoc.7.man (Formatting with groff, troff, and nroff):
      Document what double-sided layout (not "printing") means.  Also
      correct description of continuous rendering, which implied that page
      headers and footers were not written at all, and used an incorrect
      groff driver name.
    
    Fixes <https://bugs.debian.org/919890>.  Also see
    <https://lists.gnu.org/archive/html/groff/2019-01/msg00021.html>.
    Thanks to Ralph Corderoy for the discussion.
---
 ChangeLog              | 21 +++++++++++++++++++++
 tmac/groff_mdoc.7.man  | 40 +++++++++++++++++++++++++++-------------
 tmac/mdoc/doc-common-u |  2 +-
 3 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4ab623e..b093679 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2020-11-18  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/mdoc/doc-common-u (doc-footer): When performing
+       double-sided page layout, Set page number on outside of _recto_
+       {odd-numbered} pages, as is conventional and for consistency
+       with man(7).
+
+       * tmac/groff_mdoc.7.man
+       (Formatting with groff, troff, and nroff): Document what
+       double-sided layout (not "printing") means.  Also correct
+       description of continuous rendering, which implied that page
+       headers and footers were not written at all, and used an
+       incorrect groff driver name.
+
+       Fixes <https://bugs.debian.org/919890>.  Also see:
+       https://lists.gnu.org/archive/html/groff/2019-01/msg00021.html
+       Thanks to Ralph Corderoy for the discussion.
+
+       * tmac/tests/doc-D_places_page_numbers_correctly.sh: Test it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
+2020-11-18  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * tmac/mdoc/doc-common-u (doc-header): Fix infinite loop when
        attempting to trim header string (like "FTP(1)") to fit when the
        available title length won't allow even extreme shortening.
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index 066129f..0b8202e 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -4194,21 +4194,24 @@ A normal user will never need it.
 .
 .Sh "Formatting with groff, troff, and nroff"
 .
-By default, the package inhibits page breaks, headers, and footers if
-displayed with a
-.Tn TTY
-device like
+By default,
+the package inhibits page breaks,
+headers,
+and footers in the midst of the document text if it is being displayed
+with a terminal device such as
 .Sq latin1
 or
-.Sq unicode ,
-to make the manual more efficient for viewing on-line.
-This behaviour can be changed (e.g.\& to create a hardcopy of the
-.Tn TTY
-output) by setting the register
+.Sq utf8 ,
+to enable more efficient viewing of the page.
+.
+This behavior can be changed to format the page as if for 66-line
+.Tn Teletype
+output by setting the continuous rendering register
 .Ql cR
 to zero while calling
-.Xr groff 1 ,
-resulting in multiple pages instead of a single, very long page:
+.Xr groff 1 .
+.
+.
 .Pp
 .Dl groff \-Tlatin1 \-rcR=0 \-mdoc foo.man > foo.txt
 .
@@ -4232,11 +4235,22 @@ distinction information.
 .
 .
 .Pp
-For double-sided printing, set register
+Setting register
 .Ql D
-to\~1:
+to\~1 enables double-sided page layout,
+which is only distinct when not continuously rendering.
+.
+It places the page number at the bottom right on odd-numbered (recto)
+pages,
+and at the bottom left on even-numbered (verso) pages,
+swapping places with the arguments to
+.Ql .Os .
+.
+.
 .Pp
 .Dl groff \-Tps \-rD1 \-mdoc foo.man > foo.ps
+.
+.
 .Pp
 To change the document font size to 11pt or 12pt, set register
 .Ql S
diff --git a/tmac/mdoc/doc-common-u b/tmac/mdoc/doc-common-u
index 1e5f6d9..89ca77e 100644
--- a/tmac/mdoc/doc-common-u
+++ b/tmac/mdoc/doc-common-u
@@ -973,7 +973,7 @@
 .    doc-setup-page-layout
 .    sp \n[doc-footer-space]u
 .    ie \n[D] \{\
-.      ie o \
+.      ie e \
 .        tl 
%\*[doc-caption-font2]\*[doc-date-string]\f[]\*[doc-caption-font]\*[doc-operating-system]\f[]
 .      el \
 .        tl 
\*[doc-caption-font]\*[doc-operating-system]\f[]\*[doc-caption-font2]\*[doc-date-string]\f[]%



reply via email to

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