Hi,
I was makin a table with Hdtbl macro set. Which works nice.
But I noticed I couldn't change the cell spacing separately for the
vertical space and horizontal space.
So I looked into the macro set and sorted it out. So I can set it
separately.
I called it the argument cspb since I found this register was already in
use for calculating the vertical space.
Here the diff file
Kind regards
Wim Stockman
--- ./hdtbl.tmac-u 2020-10-28 21:46:56.993442819 +0100
+++ ./hdtbl.tmac-u 2021-01-30 15:02:10.558188791 +0100
@@ -52,6 +52,7 @@
.ds t*bc red4\"
.nr t*cpd .5n
.nr t*csp .5n
+.nr t*cspb 1c
.nr t*b .1n
.nr t*cols 1
.nr t*v \n[.v]
@@ -134,6 +135,16 @@
. tm \\n[.F]:\\n[.c]: Invalid cell padding value '\\*[cpd]'.
. \}
.
+. t*getarg cspb \\*[args] \" vertical cell spacing
+. ie "\\*[cspb]"" \
+. nr t*cspb\\n[t*#] \\n[t*cspb]
+. el \{\
+. ie \B\\*[cspb] \
+. nr t*cspb\\n[t*#] \\*[cspb]
+. el \
+. tm \\n[.F]:\\n[.c]: Invalid verctical cell spacing value '\\*[cspb]'.
+. \}
+.
. t*getarg csp \\*[args] \" cell spacing
. ie "\\*[csp]"" \
. nr t*csp\\n[t*#] \\n[t*csp]
@@ -144,6 +155,7 @@
. tm \\n[.F]:\\n[.c]: Invalid cell spacing value '\\*[csp]'.
. \}
.
+.
. t*getarg border \\*[args] \" border thickness
. ie "\\*[border]"=" \
. nr t*b\\n[t*#] 0-1
@@ -183,6 +195,7 @@
.
. nr b/2\\n[t*#] (\\n[t*b\\n[t*#]] / 2)\" shortcut
. nr cscp\\n[t*#] (\\n[t*csp\\n[t*#]] + \\n[t*cpd\\n[t*#]])\" aux. register
+. nr cscpb\\n[t*#] (\\n[t*csp\\n[t*#]] + \\n[t*cpd\\n[t*#]])\" aux. register
.
. t*getarg height \\*[args] \" table outline height
. ie "\\*[height]"" \
@@ -190,7 +203,7 @@
. el \{\
. ie \B\\*[height] \
. nr t*height\\n[t*#] (\\*[height] \
- - ((2 * \\n[cscp\\n[t*#]]) \
+ - ((2 * \\n[cscpb\\n[t*#]]) \
+ (3 * \\n[b/2\\n[t*#]])))
. el \
. tm \\n[.F]:\\n[.c]: Invalid height value '\\*[height]'.
@@ -548,7 +561,7 @@
.
. nr b/2 \\n[b/2\\n[t*#]] \" some abbreviations
. nr cscp \\n[cscp\\n[t*#]]
-. nr cscpb (\\n[b/2] + \\n[cscp])
+. nr cscpb \\n[t*cspb\\n[t*#]]
.
. nr topdiv (\\n[.d] + \\n[b/2] - \\n[cscp])\" top of cell diversion
. nr cscpb2 (\\n[b/2] / 2 + \\n[cscp])