groff
[Top][All Lists]
Advanced

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

Re: [Groff] Meta-tbl: a new version with a better code and a bug fixed


From: baruchel
Subject: Re: [Groff] Meta-tbl: a new version with a better code and a bug fixed
Date: Mon, 7 Aug 2000 09:01:29 +0200
User-agent: Mutt/1.2.5i

Brest, le lundi 7 août

Hi,

with the help of Ted Harding, we wrote a better code. The commands are now the
same, but it should work better and faster.
A bug is fixed (the shadow didn't work without a border around the table)

Please try it, and tell us if you find other bugs.
================================================================================
.de M4T \" marks the beginning of the table
\\!# Here starts a new M4T table
\\!m4t: init
.M4Tinitc 1
.rr ZZ
..
.de M4Tinitc \" remove some registers in case of greater previous table
.if r 3cd\\$1 .if \\n[3cd\\$1] \{\
.                   rr 3cd\\$1
.                   nr ZZ \\$1+1
.                   M4Tinitc \\n(ZZ
.\}
..
.de M4Tlastc \" looks for the last column
.nr ZZ \\$1+1
.nr ZZ \\$1+1
.if r 3cd\\n(ZZ .if \\n[3cd\\n(ZZ] \{\
.                     M4Tlastc \\n(ZZ
.                     nr M4TLC +1
.\}
..
.de m4tfc
.nr m4ti \\$1-1
.nr m4tj \\$2-1
.nr m4tk \\n[3cd\\n[m4ti]]+\\n[3ind]+\\n(.o
.nr m4tl \\n[3cd\\$1]-\\n[3cd\\n[m4ti]]
.nr m4th \\n[3rt\\$2]-\\n[3rt\\n[m4tj]]
.\" Next lines seem to fix the bug for the last line of the table
.  if !\\n[m4th] \{\
.  nr m4th \\n[3rt0]+\\n[3bot]-\\n[3rt\\n[m4tj]]
.  \" Three next lines are in case of doublebox:
.    nr M4TLC 0
.    M4Tlastc 0 \" looks for the last column
.    nr m4th -(\\n(TW-\\n[3cd\\n[M4TLC]])
.\}
\\!m4t: H\\n[m4tk]
\\!m4t: V\\n[3rt\\n[m4tj]]
.nr m4tk .25m
\\!m4t: v\\n[m4tk]
\\!m4t: Df \\$3 0
\\!m4t: DP \\n[m4tl] 0 0 \\n[m4th] -\\n[m4tl] 0 0 -\\n[m4th]
\\!m4t: Df 0 0
..
.de m4tlf
.nr M4TLC 0
.M4Tlastc 0 \" looks for the last column
.M4TfillL \\n[M4TLC] \\$1 \\$2
.rr ZZ
..
.de M4TfillL
.m4tfc \\$1 \\$2 \\$3
.nr ZZ \\$1-1
.if \\n(ZZ .M4TfillL \\n(ZZ \\$2 \\$3
..
.de m4tcf
.nr M4TLL \\n[3crow]+1
.M4TfillC \\n[M4TLL] \\$1 \\$2
.rr ZZ
..
.de M4TfillC
.m4tfc \\$2 \\$1 \\$3
.nr ZZ \\$1-1
.if \\n(ZZ .M4TfillC \\n(ZZ \\$2 \\$3
..
.de m4tfa
.nr M4TLL \\n[3crow]+1
.m4tfa2 \\n[M4TLL] \\$1
..
.de m4tfa2
.m4tlf \\$1 \\$2
.nr ZZ \\$1-1
.if \\n(ZZ .m4tfa2 \\n(ZZ \\$2
.rr ZZ
..
.de m4tshd
.nr m4tz \\$2*1p
.if !\\n[m4tz] .nr m4tz 2p
.nr M4TLC 0
.M4Tlastc 0
.nr m4tj \\n[3rt0]+.25m
\\!m4t: V\\n[m4tj]
.nr m4ti \\n[3ind]+\\n(.o
\\!m4t: H\\n[m4ti]
.nr m4tk \\n[m4tz]
\\!m4t: v\\n[m4tk]
\\!m4t: h\\n[m4tk]
\\!m4t: Df \\$1 0
.nr m4tl \\n[3crow]+1 \" number of the last line
.nr m4th \\n[3rt\\n[m4tl]]-\\n[3rt0]
.if !(\\n[3rt\\n[m4tl]]-\\n[3rt\\n[3crow]]) .nr m4th \\n[3bot]
.nr m4th +2(\\n(TW-\\n[3cd\\n[M4TLC]])
\\!m4t: DP \\n(TW 0 0 \\n[m4th] -\\n(TW 0 0 -\\n[m4th]
\\!m4t: V\\n[m4tj]
\\!m4t: H\\n[m4ti]
\\!m4t: Df 0 0
\\!m4t: DP \\n(TW 0 0 \\n[m4th] -\\n(TW 0 0 -\\n[m4th]
..

reply via email to

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