[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff-commit] groff/contrib/hdtbl ChangeLog hdtbl.tmac
From: |
Werner LEMBERG |
Subject: |
[Groff-commit] groff/contrib/hdtbl ChangeLog hdtbl.tmac |
Date: |
Thu, 02 Nov 2006 08:52:07 +0000 |
CVSROOT: /cvsroot/groff
Module name: groff
Changes by: Werner LEMBERG <wl> 06/11/02 08:52:07
Modified files:
contrib/hdtbl : ChangeLog hdtbl.tmac
Log message:
* hdtbl.tmac (t*divs): Fix a bug which causes incorrect table cell
heights if the `rowspan' keyword is used. This problem has been
introduced during the beautification process by introducing
incorrect parentheses.
Other minor modifications.
(\n[rsp...]): Array renamed to...
(\n[rspan...]): This.
(\n[csp...]): Array renamed to...
(\n[cspan...]): This.
(\n[vl...]): Array renamed to...
(\n[vline...]): This.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/hdtbl/ChangeLog?cvsroot=groff&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/hdtbl/hdtbl.tmac?cvsroot=groff&r1=1.7&r2=1.8
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/contrib/hdtbl/ChangeLog,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- ChangeLog 28 Oct 2006 16:57:08 -0000 1.19
+++ ChangeLog 2 Nov 2006 08:52:07 -0000 1.20
@@ -1,3 +1,17 @@
+2006-11-01 Werner LEMBERG <address@hidden>
+
+ * hdtbl.tmac (t*divs): Fix a bug which causes incorrect table cell
+ heights if the `rowspan' keyword is used. This problem has been
+ introduced during the beautification process by introducing
+ incorrect parentheses.
+ Other minor modifications.
+ (\n[rsp...]): Array renamed to...
+ (\n[rspan...]): This.
+ (\n[csp...]): Array renamed to...
+ (\n[cspan...]): This.
+ (\n[vl...]): Array renamed to...
+ (\n[vline...]): This.
+
2006-10-27 Werner LEMBERG <address@hidden>
* hdmisc.tmac (EM): Improve warning messages.
Index: hdtbl.tmac
===================================================================
RCS file: /cvsroot/groff/groff/contrib/hdtbl/hdtbl.tmac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- hdtbl.tmac 28 Oct 2006 16:57:08 -0000 1.7
+++ hdtbl.tmac 2 Nov 2006 08:52:07 -0000 1.8
@@ -363,9 +363,9 @@
.
. if (\\n[rowspan] - 1) \
. while (\\n+[*] <= \\n[rowspan]) \{\
-. nr rsp\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
+. nr rspan\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
. if (\\n[*] > 1) \
-. nr csp\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
+. nr cspan\\n[t*#]*\\n[*r]*\\n[c#\\*[#t#r]] \\n[colspan]
. nr *r +1
. \}
.
@@ -373,7 +373,7 @@
. nr *c \\n[c#\\*[#t#r]]
.
. if (\\n[colspan] - 1) \{\
-. nr vl\\*[*#trc*] 0-1 \" no vl flag
+. nr vline\\*[*#trc*] 0-1 \" set `no vl' flag
.
. while (\\n+[*] <= \\n[colspan]) \{\
. nr *c +1
@@ -436,7 +436,7 @@
. \}
. el \{\
. tmc \\n[.F]:\\n[.c]: Table end (.ETB)
-. tm1 " without corresponding tablestart (.TBL)!
+. tm1 " without corresponding table start (.TBL)!
. \}
.
. ds #t#r \\n[t*#]*\\n[t*r#\\n[t*#]]\" refresh table row
identifier
@@ -536,22 +536,22 @@
.de t*divs
. ll (\\n[l]u + 1c) \" avoid warning `can't break line'
. nf
-. nr #r 0 1
.
-. nr b/2 \\n[b/2\\n[t*#]] \" some abbrevs.
+. nr b/2 \\n[b/2\\n[t*#]] \" some abbreviations
. nr cscp \\n[cscp\\n[t*#]]
. nr cscpb (\\n[b/2] + \\n[cscp])
.
-. nr topdiv (\\n[.d] + \\n[b/2] - \\n[cscp]) \" top of cell diversion
+. nr topdiv (\\n[.d] + \\n[b/2] - \\n[cscp])\" top of cell diversion
. nr cscpb2 (\\n[b/2] / 2 + \\n[cscp])
.
+. nr #r 0 1
. \" outer loop for rows
. while (\\n+[#r] <= \\n[t*r#\\n[t*#]]) \{\
-. \" insert code here for multipage tables
+. \" TODO: insert code here for multipage tables
. nr * (\\n[#r] - 1)
. nr topdiv +(\\n[dntr\\n[t*#]*\\n[*]] + \\n[cscp] + \\n[cscpb])
.
-. \" if table still lower than specified table height, increase it.
+. \" if table still smaller than specified table height, increase it
. if ((\\n[#r] == \\n[t*r#\\n[t*#]]) & \\n[t*height\\n[t*#]]) \
. nr dntr\\n[t*#]*\\n[#r] (\\n[cscpb] \
+ \\n[toptbl\\n[t*#]] \
@@ -562,37 +562,41 @@
. \" inner loop for cells
. while (\\n+[#c] <= \\n[t*cols\\n[t*#]]) \{\
. ds #trc \\n[t*#]*\\n[#r]*\\n[#c]\"
-. if !dt*\\*[#trc] \
+. \" continue if the diversion is empty
+. if !d t*\\*[#trc] \
. continue
.
. sp |\\n[topdiv]u
-. in (\\n[in\\n[t*#]]u + \\n[in\\*[#trc]]u) \" cell indent
+. in (\\n[in\\n[t*#]]u + \\n[in\\*[#trc]]u)\" cell offset
. nr $1 \\n[dntr\\n[t*#]*\\n[#r]] \" cell height
.
-. \" if spanned rows calculate resulting row height and lower hl position
+. \" if we have spanned rows, calculate resulting row height
+. \" and position of lower horizontal line
+. if \\n[rspan\\*[#trc]] \{\
. nr * \\n[#r] 1
-. if \\n[rsp\\*[#trc]] \{\
-. nr rsp\\*[#trc] 0-1 \" set no hl flag
+. nr rspan\\*[#trc] 0-1 \" set `no hl' flag
. nr corr (\\n[dn\\*[#trc]] - \\n[dntr\\n[t*#]*\\n[#r]])
.
-. while \\n[rsp\\n[t*#]*\\n+[*]*\\n[#c]] \{\
-. nr rsp\\n[t*#]*\\n[*]*\\n[#c] 0 \" clear rsp's in
following rows
+. \" clear row span flags in following rows and update row height
+. while \\n[rspan\\n[t*#]*\\n+[*]*\\n[#c]] \{\
+. nr rspan\\n[t*#]*\\n[*]*\\n[#c] 0
. nr ** (\\n[dntr\\n[t*#]*\\n[*]] + \\n[cscp] + \\n[cscpb])
. nr corr -\\n[**]
. nr $1 +\\n[**]
. \}
.
. if (\\n-[*] == \\n[t*r#\\n[t*#]]) \
-. nr $1 (\\n[t*height\\n[t*#]] \
+. nr $1 ((\\n[t*height\\n[t*#]] \
- \\n[.d] \
+ \\n[toptbl\\n[t*#]] \
- + (\\n[cscpb] >? \\n[$1]))
+ + \\n[cscpb]) \
+ >? \\n[$1])
. nr dntr\\n[t*#]*\\n[*] +(\\n[corr] >? 0)
. \}
.
. \" paint cell background
-. nr * (2 * \\n[t*cpd\\n[t*#]] + \\n[cll\\*[#trc]]) \"
background width
-. nr $1 (\\n[$1] >? \\n[dn\\*[#trc]]) \" cell height
+. nr * (2 * \\n[t*cpd\\n[t*#]] + \\n[cll\\*[#trc]])\" background width
+. nr $1 (\\n[$1] >? \\n[dn\\*[#trc]])\" cell height
.
. if !"\\*[t*bgc\\*[#trc]]"=" \{\
. nop \h'\\n[t*csp\\n[t*#]]u'\
@@ -606,20 +610,21 @@
. \}
.
. \" *** horizontal and vertical single or double lines ***
-. \" double- and single lines have the same thickness;
-. \" the double lines distance is the line thickness.
-. \" border=n: horizontal/vertical lines n/2 thick, minimum .1n.
-. \" border=0: no border; horizontal/vertical lines .1n thick.
-. \" border= : neither border nor hl/vl's.
+. \" double and single lines have the same thickness;
+. \" the double lines' distance is the line thickness.
+. \"
+. \" `border=x': horizontal/vertical lines x/2 thick, minimum .1n
+. \" `border=0': no border; horizontal/vertical lines .1n thick
+. \" `border=': neither border nor horizontal/vertical lines
.
-. nr *t (.1n >? \\n[b/2]) \" thickness of hl/vl minimum .1n
+. nr *t (.1n >? \\n[b/2]) \" thickness of hl/vl; min. .1n
. in +\\n[cscp]u
.
+. \" check for vertical and horizontal lines
. if (1 + \\n[t*b\\n[t*#]]) \{\
. if !"\\*[t*bc\\n[t*#]]"=" \{\
-. \" possibly hl/vl's:
-. \" draw horizontal line between this and the following table cell
-. if (\\n[t*r#\\n[t*#]] - \\n[#r] + \\n[rsp\\*[#trc]]) \{\
+. \" draw horizontal line between this cell and the one below
+. if (\\n[t*r#\\n[t*#]] - \\n[#r] + \\n[rspan\\*[#trc]]) \{\
. if !"\\*[t*hl\\*[#trc]]"=" \{\
. sp \\n[$1]u
. nr * (\\n[cscp] + \\n[cscpb] + \\n[cll\\*[#trc]])
@@ -642,10 +647,10 @@
. sp (-\\n[$1]u - 1v)
. \}\}
.
-. nr rsp\\*[#trc] 0
+. nr rspan\\*[#trc] 0
.
-. \" draw vertical line between this and the next (right) cell
-. if (\\n[t*cols\\n[t*#]] - \\n[#c] + \\n[vl\\*[#trc]]) \{\
+. \" draw vertical line between this cell and the one to the right
+. if (\\n[t*cols\\n[t*#]] - \\n[#c] + \\n[vline\\*[#trc]]) \{\
. if !"\\*[t*vl\\*[#trc]]"=" \{\
. nop \X'\*[g] 1 setlinecap'\
\v'(-\\n[cscpb2]u - .67v)'\
@@ -666,13 +671,13 @@
. sp -1
. \}\}\}\}
.
-. nr vl\\*[#trc] 0
+. nr vline\\*[#trc] 0
.
. \" vert. cell content alignment
. nr ** 0
.
. ie "\\*[t*val\\*[#trc]]"m" \
-. nr ** ((\\n[$1] - \\n[dn\\*[#trc]]) / 2) \" val=m
+. nr ** ((\\n[$1] - \\n[dn\\*[#trc]]) / 2)\" val=m
. el \
. if "\\*[t*val\\*[#trc]]"b" \
. nr ** (\\n[$1] - \\n[dn\\*[#trc]])\" val=b
@@ -682,8 +687,8 @@
. \" finally output the diversion
. t*\\*[#trc]
. rm t*\\*[#trc]
-. \} \" end of while loop for
cols
-. \} \" and rows
+. \}
+. \}
.
. \" draw the box border
. in \\n[in\\n[t*#]]u
@@ -808,7 +813,7 @@
. if \\n[c#\\*[#t#r]] \{\
. di \" close diversion
. nr dn\\$4 \\n[dn] \" save height of this cell
-. if !\\n[rsp\\*[#trc]] \{\
+. if !\\n[rspan\\*[#trc]] \{\
. \" update row height if not in a row span
. nr dntr\\*[#t#r] (\\n[dntr\\*[#t#r]] >? \\n[dn])
. if \\$2 \
@@ -822,9 +827,9 @@
.
. \" update column span registers
. while (\\n+[*] <= \\$3) \{\
-. if r csp\\*[#t#r]*\\n[*] \
-. nr c#\\*[#t#r] +\\n[csp\\*[#t#r]*\\n[*]]
-. nr csp\\*[#t#r]*\\n[*] 0
+. if r cspan\\*[#t#r]*\\n[*] \
+. nr c#\\*[#t#r] +\\n[cspan\\*[#t#r]*\\n[*]]
+. nr cspan\\*[#t#r]*\\n[*] 0
. \}
.
. ds #trc \\*[#t#r]*\\n[c#\\*[#t#r]]\"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff-commit] groff/contrib/hdtbl ChangeLog hdtbl.tmac,
Werner LEMBERG <=