]> git.lizzy.rs Git - plan9front.git/commitdiff
troff: fix -ms mug (thanks aksr)
authorcinap_lenrek <cinap_lenrek@felloff.net>
Wed, 23 Jan 2019 20:28:22 +0000 (21:28 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Wed, 23 Jan 2019 20:28:22 +0000 (21:28 +0100)
Executing .KS after .1C exhibits a bug.
Instead on the next page, the text between .KS and .KE is shown at
the bottom of the page (where footnote would be).
To reproduce the bug: http://sprunge.us/xyCUX7

The bug can be fixed by changing two lines in tmac.s:

    if \\n(NX<1 .bp\}

to

    if \\n(NX<=1 .bp\}

and

    if \\n(NX<1 'bp\}
to

  if \\n(NX<=1 'bp\}

sys/lib/tmac/tmac.s

index 496dae72d048a9b01b7fe0c0127bdce31b923c38..3b0b3bcf3c169515edc490c4b05162c5a196e8ac 100644 (file)
@@ -972,7 +972,7 @@ Computing Science Technical Report No. \\*(MN
 .fi
 .if (\\n(nl+1v)>(\\n(.p-\\n(FM) \{\
 .      if \\n(NX>1 .RC
-.      if \\n(NX<1 .bp\}
+.      if \\n(NX<=1 .bp\}
 .nr TD 0
 ..
 .de KD
@@ -1020,7 +1020,7 @@ Computing Science Technical Report No. \\*(MN
 .if !\\n(dn .nr WF 0
 .if \\n(FC<=1 .if \\n(XX=0 \{\
 .      if \\n(NX>1 .RC
-.      if \\n(NX<1 'bp\}
+.      if \\n(NX<=1 'bp\}
 .nr FC -1
 .if \\n(ML>0 .ne \\n(MLu
 ..