groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/03: tmac/an-old.tmac: Clarify \n[C] setup for HTML.


From: G. Branden Robinson
Subject: [groff] 02/03: tmac/an-old.tmac: Clarify \n[C] setup for HTML.
Date: Wed, 30 Sep 2020 06:04:36 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 0b1644184c2cd7fbe65364401ab66033be339746
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Sep 30 18:53:33 2020 +1000

    tmac/an-old.tmac: Clarify \n[C] setup for HTML.
    
    Make interaction of \n[C] register and HTML output more clear in code
    and comments.  It looked strange to test \n[C] for "falseness", throw a
    warning about that not being supported for HTML, and then force its
    value to false anyway.  This was harmless given the following logic, but
    confusing and possibly not robust against future refactoring.  Do the
    redundant setting and explain why in a comment.
---
 ChangeLog        |  5 +++++
 tmac/an-old.tmac | 16 ++++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 17c1c76..4cd1f40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2020-09-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
+       * tmac/an-old.tmac (register setup): Make interaction of \n[C]
+       register and HTML output more clear in code and comments.
+
+2020-09-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
        * src/roff/groff/tests/regression_savannah_59202.sh: Reduce test
        case.
 
diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac
index ae91bd5..c9f71e2 100644
--- a/tmac/an-old.tmac
+++ b/tmac/an-old.tmac
@@ -651,19 +651,23 @@
 .\}
 .
 .\" continuous page numbering over multiple documents
+.\"
+.\" We must use consecutive page numbers when using PostScript to
+.\" generate HTML images; we must not reset the page number at the
+.\" beginning of each document (the 'ps4html' register is automatically
+.\" added to the command line by the pre-HTML preprocessor).
+.\"
+.\" \n[C] may get set to 1 redundantly in the below; we could replace
+.\" that with a complex conditional, but it doesn't seem to be worth the
+.\" trouble given AT&T-compatible restrictions on '!' placement.
 .ie !r C \
 .  nr C 0
 .el \
 .  if !\n[C] \
 .    if \n[an-html] \{\
 .       tm \*[an-old]: ignoring continuous page numbering in HTML output
-.       nr C 0
+.       nr C 1
 .    \}
-.
-.\" We must use consecutive page numbers when using PostScript to
-.\" generate HTML images; we must not reset the page number at the
-.\" beginning of each document (the 'ps4html' register is automatically
-.\" added to the command line by the pre-HTML preprocessor).
 .if \n[an-html] \
 .  nr C 1
 .if r ps4html \



reply via email to

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