groff
[Top][All Lists]
Advanced

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

Re: [Groff] Meta-tbl: 2 new features: fill-all and shadow


From: baruchel
Subject: Re: [Groff] Meta-tbl: 2 new features: fill-all and shadow
Date: Sun, 6 Aug 2000 20:50:36 +0200
User-agent: Mutt/1.2.5i

Brest, le dimanche 6 août

Hi, the basics are the same, but two new functions are available:

.m4tfa n    (fill all with a darkness of n)
.m4tshd n [d]
   put a shadow under the whole table. n is the darkness (500 is a good value)
   d is optional (by default: 2), and is the distance of the shadow from the
   corner (0 would make the shadow invisible, but isn't allowed). Don't put the
   unit, which is points: .m4tshd 500 4     stands for a decalage of 4p

===tmac.4t===========================================================
.de M4T \" marks the beginning of the table
\\!# Here starts a new M4T table
\\!m4t: init
.M4Tinitc 1
.M4Tinitl 1
.rr ZZ
..
.de M4Tinitc \" remove some registers in case of greater previous table
.if \\n[3cd\\$1] \{\
.                   rr 3cd\\$1
.                   nr ZZ \\$1+1
.                   M4Tinitc \\n(ZZ \}
..
.de M4Tinitl \" remove some registers in case of greater previous table
.if \\n[3rt\\$1] \{\
.                   rr 3rt\\$1
.                   nr ZZ \\$1+1
.                   M4Tinitl \\n(ZZ \}
..
.de M4Tlastc \" looks for the last column
.nr ZZ \\$1+1
.if \\n[3cd\\n(ZZ] \{\
.                     M4Tlastc \\n(ZZ
.                     nr M4TLC +1 \}
..
.de M4Tlastl \" looks for the last line
.nr ZZ \\$1+1
.if \\n[3rt\\n(ZZ] \{\
.                     M4Tlastl \\n(ZZ
.                     nr M4TLL +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 0
.M4Tlastl 0 \" looks for the last line
.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 0
.M4Tlastl 0 \" looks for the last line
.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 m4th \\n[3bot]+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]