URL: <https://savannah.gnu.org/bugs/?64728>
Summary: Wrong width of lined-up eqn equation reported by diversion Group: GNU roff Submitter: None Submitted: Sat 30 Sep 2023 01:09:39 PM UTC Category: None Severity: 3 - Normal Item Group: Incorrect behaviour Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: None _______________________________________________________ Follow-up Comments: ------------------------------------------------------- Date: Sat 30 Sep 2023 01:09:39 PM UTC By: Anonymous Using a diversion to capture the output of an eqn equation with the lineup indicator when there is an earlier equation with the mark indicator seemingly gives the wrong width of this lineup equation, in both troff and nroff. In the example below, two different equations are processed: (1) with a mark indicator, and (2), printed once without and once with a lineup indicator, that is longer and has a common start with equation (1) before the indicators, such that output of both variants of (2) should look the same. However, the width of (2) with lineup indicator as reported by troff and nroff is not equal to the width of (2) without the lineup indicator (and equals the width of (1) in case of troff). For reference, I added the output of the latest (development snapshot) of Heirloom doctools, with the logical output. $ cat mark_lineup_diversion .di xx .EQ x mark = 1 + 1 .EN .br .di \*(xx .tm Width of (diversed) 1: \n(dl .di xx .EQ x = 1 - 1 + 1 - 1 + 2 .EN .br .di \*(xx .tm Width of (diversed) 2: \n(dl .di xx .EQ x lineup = 1 - 1 + 1 - 1 + 2 .EN .br .di \*(xx .tm Width of (diversed) 2 (using lineup): \n(dl $ /usr/local/bin/neqn --version GNU eqn (groff) version 1.23.0 $ /usr/local/bin/nroff --version GNU nroff (groff) version 1.23.0 GNU groff version 1.23.0 Copyright (C) 2022 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. called subprograms: GNU grotty (groff) version 1.23.0 GNU troff (groff) version 1.23.0 $ cat mark_lineup_diversion | /usr/local/bin/neqn -Tascii | /usr/local/bin/nroff -Tascii | sed '/^$/d' Width of (diversed) 1: 120 Width of (diversed) 2: 264 Width of (diversed) 2 (using lineup): 96 x=1+1 x=1-1+1-1+2 x=1-1+1-1+2 $ cat mark_lineup_diversion | /usr/local/ucb/neqn | /usr/local/ucb/nroff | sed '/^$/d' Width of (diversed) 1: 120 x=1+1 Width of (diversed) 2: 264 x=1-1+1-1+2 Width of (diversed) 2 (using lineup): 264 x=1-1+1-1+2 $ cat mark_lineup_diversion | /usr/local/bin/eqn | /usr/local/bin/troff > /dev/null Width of (diversed) 1: 36720 Width of (diversed) 2: 81390 Width of (diversed) 2 (using lineup): 36720 $ cat mark_lineup_diversion | /usr/local/ucb/eqn | /usr/local/ucb/troff > /dev/null Width of (diversed) 1: 27086 Width of (diversed) 2: 58556 Width of (diversed) 2 (using lineup): 58556 _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64728> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/