🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4003

Eqn ms macros bug fix

#4003
From: Andries Brouwer
Date: Fri, 04 Sep 1987 20:52
27 lines
1448 bytes
I had problems with big eqn equations: eqn (-ms, BSD4.3) fails
to check whether there is room on the page, and large matrices
often fall off the page. 
A simpleminded solution seems to be enclosing the formula in .KS/.KE
macros, but that reveals another bug in the .EQ/.EN macros: the half
line white space before the equation is lost as a result.
[This is caused by the fact that the undefined number register PE
and the number register .d compare equal (both are 0) at the start
of a diversion.]
The right solution is to add a  .ne  line to the .EN macro.
In my version of tmac.s this macro now starts off as follows:

 .de EN  \" end of a displayed equation
 .br
 .di
 .rm EZ
 .nr ZN \\n(dn
 .if \\n(ZN>0 .if \\n(YE=0 .LP
 .ne \\n(ZNu
 .if \\n(ZN=0 .if !"\\*(EL"" .nr ZN 1
 .if t .if \\n(ZN>0 .if \\n(PE>0 .if !\\n(.d=\\n(PE .sp .5
 .if n .if \\n(ZN>0 .if \\n(PE>0 .if !\\n(.d=\\n(PE .sp 1
 'pc

The described bugs do not occur with -me.
-- 
      Andries Brouwer -- CWI, Amsterdam -- seismo!mcvax!aeb -- aeb@cwi.nl
Technical Details
Message-ID: <360@zuring.cwi.nl>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!aeb

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!aeb
From: aeb@cwi.nl (Andries Brouwer)
Newsgroups: comp.text
Subject: Eqn ms macros bug fix
Message-ID: <360@zuring.cwi.nl>
Date: Fri, 4-Sep-87 16:52:17 EDT
Article-I.D.: zuring.360
Posted: Fri Sep  4 16:52:17 1987
Date-Received: Sun, 6-Sep-87 02:07:45 EDT
Organization: CWI, Amsterdam
Lines: 27