[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Meta-tbl: still faster and new features !
From: |
baruchel |
Subject: |
Re: [Groff] Meta-tbl: still faster and new features ! |
Date: |
Mon, 7 Aug 2000 12:20:23 +0200 |
User-agent: |
Mutt/1.2.5i |
Brest, le lundi 7 août
Hi, this is the new version. It's fully re-read, and there is no loop any longer
Useless macros have been removed.
You have two new features:
.m4tbdr x y [s] puts a border around x,y with a size of s
(if no s is given, current one is used)
.m4tdbl [n]
ONLY with the 'doublebox' option (there is a test and a warning message)
Should fill the doublebox space (around the table)
n is the darkness, it's black by default
HELP:
There is a trouble that I see with my version of ghostscript/gv/ghostview
The filling of the doublebox is not exactly at the good horizontal place
THOUGH I have carefullylooked at the troff output, and the numbers are THE SAME
(for my filling and for the normal box drawn by tbl)
Have I a bug, or is there a bug with my ghostscript. I can't figure it out,
and I am really confused by the fact that the output code seems to be right.
================================================================================
.de M4T \" marks the beginning of the table
\\!# Here starts a new M4T table
\\!m4t: init
..
.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]]
. \" Next lines is in case of doublebox:
. nr m4th -\\n[3cd0]
.\}
\\!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 m4tj \\$1-1
.nr m4tk \\n[3cd0]+\\n[3ind]+\\n(.o
.nr m4th \\n[3rt\\$1]-\\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]]
. \" Next lines is in case of doublebox:
. nr m4th -\\n[3cd0]
.\}
\\!m4t: H\\n[m4tk]
\\!m4t: V\\n[3rt\\n[m4tj]]
.nr m4tk .25m
\\!m4t: v\\n[m4tk]
\\!m4t: Df \\$2 0
.nr m4tk \\n(TW-\\n[3cd0]-\\n[3cd0] \" in case of double box
\\!m4t: DP \\n[m4tk] 0 0 \\n[m4th] -\\n[m4tk] 0 0 -\\n[m4th]
\\!m4t: Df 0 0
..
.de m4tcf
.nr m4tL \\n[3crow]+1 \" number of the last line
.nr m4ti \\$1-1
.nr m4tk \\n[3cd\\n[m4ti]]+\\n[3ind]+\\n(.o
.nr m4tl \\n[3cd\\$1]-\\n[3cd\\n[m4ti]]
.nr m4th \\n[3rt\\n[m4tL]]-\\n[3rt0] \" height if no border around the table
.if !(\\n[3rt\\n[m4tL]]-\\n[3rt\\n[3crow]]) .nr m4th \\n[3bot] \" with border
.nr m4th -\\n[3cd0] \" in case of doublebox
\\!m4t: H\\n[m4tk]
\\!m4t: V\\n[3rt0]
.nr m4tk .25m
\\!m4t: v\\n[m4tk]
\\!m4t: Df \\$2 0
\\!m4t: DP \\n[m4tl] 0 0 \\n[m4th] -\\n[m4tl] 0 0 -\\n[m4th]
\\!m4t: Df 0 0
..
.de m4tfa
.nr m4tL \\n[3crow]+1 \" number of the last line
.nr m4tj \\n[3rt0]+.25m
\\!m4t: V\\n[m4tj]
.nr m4ti \\n[3ind]+\\n(.o+\\n[3cd0]
\\!m4t: H\\n[m4ti]
\\!m4t: Df \\$1 0
.nr m4th \\n[3rt\\n[m4tL]]-\\n[3rt0] \" height if no border around the table
.if !(\\n[3rt\\n[m4tL]]-\\n[3rt\\n[3crow]]) .nr m4th \\n[3bot] \" with border
.nr m4th -\\n[3cd0] \" in case of doublebox
.nr m4tk \\n(TW-\\n[3cd0]-\\n[3cd0]
\\!m4t: DP \\n[m4tk] 0 0 \\n[m4th] -\\n[m4tk] 0 0 -\\n[m4th]
\\!m4t: Df 0 0
..
.de m4tshd
.nr m4tL \\n[3crow]+1 \" number of the last line
.nr m4tk \\$2*1p
.if !\\n[m4tk] .nr m4tk 2p
.nr m4tj \\n[3rt0]+.25m-\\n[3cd0]
\\!m4t: V\\n[m4tj]
.nr m4ti \\n[3ind]+\\n(.o
\\!m4t: H\\n[m4ti]
\\!m4t: v\\n[m4tk]
\\!m4t: h\\n[m4tk]
\\!m4t: Df \\$1 0
.nr m4th \\n[3rt\\n[m4tL]]-\\n[3rt0] \" height if no border around the table
.if !(\\n[3rt\\n[m4tL]]-\\n[3rt\\n[3crow]]) .nr m4th \\n[3bot] \" with border
.nr m4th +\\n[3cd0] \" in case of doublebox
\\!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]
..
.de m4tbdr
.nr m4tm \\$3
.if !\\n[m4tm] .nr m4tm \\n(.s
.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]]
. \" Next lines is in case of doublebox:
. nr m4th -\\n[3cd0]
.\}
\\!m4t: H\\n[m4tk]
\\!m4t: V\\n[3rt\\n[m4tj]]
.nr m4tk .25m
\\!m4t: v\\n[m4tk]
\\!m4t: s\\n[m4tm]000
\\!m4t: Dp \\n[m4tl] 0 0 \\n[m4th] -\\n[m4tl] 0 0 -\\n[m4th]
\\!m4t: s\\n(.s000
..
.de m4tdbl
.ie !\\n[3cd0] .tm You can't use .m4tdbl without the 'doublebox' option
.el \{\
. nr m4tL \\n[3crow]+1 \" number of the last line
. nr m4tm \\$1
. if !\\n[m4tm] .nr m4tm 1000
. nr m4ti \\n[3ind]+\\n(.o
. nr m4tj \\n[3rt0]+.25m-\\n[3cd0]
. nr m4th \\n[3rt\\n[m4tL]]-\\n[3rt0] \" height if no border around the table
. if !(\\n[3rt\\n[m4tL]]-\\n[3rt\\n[3crow]]) .nr m4th \\n[3bot] \" with border
. nr m4th +\\n[3cd0] \" in case of doublebox
\\!m4t: V\\n[m4tj]
\\!m4t: H\\n[m4ti]
\\!m4t: Df \\n[m4tm] 0
\\!m4t: DP \\n(TW 0 0 \\n[m4th] -\\n(TW 0 0 -\\n[m4th]
. m4tfa 0
.\}
..