rowdistance in xtables
Dear list, I have the following xtable: \starttext \startxtable[frame=off] \startxtablehead[foregroundstyle=\bf, topframe=on, bottomframe=on] \startxrow \startxcell one \stopxcell \stopxrow \stopxtablehead \startxtablebody[rowdistance=20em] \startxrow \startxcell two \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext Well, I suspect that rowdistance isn’t working as expected. If that helps (and I may be wrong), lines 280-283 from tabl-xtb.mkiv read: columndistance \dimexpr\xtableparameter\c!columndistance\relax leftmargindistance \dimexpr\xtableparameter\c!leftmargindistance\relax rightmargindistance \dimexpr\xtableparameter\c!rightmargindistance\relax rowdistance \ht\scratchbox Sorry, but I’m guess that rowdistance doesn’t honor settings.rowdistance from tabl-xtb.lua. Could anyone confirm the bug or tell me what I miss? Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 13. Februar 2016 um 11:28 Dear list,
I have the following xtable:
\starttext \startxtable[frame=off] \startxtablehead[foregroundstyle=\bf, topframe=on, bottomframe=on] \startxrow \startxcell one \stopxcell \stopxrow \stopxtablehead \startxtablebody[rowdistance=20em] \startxrow \startxcell two \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext
Well, I suspect that rowdistance isn’t working as expected.
If that helps (and I may be wrong), lines 280-283 from tabl-xtb.mkiv read:
columndistance \dimexpr\xtableparameter\c!columndistance\relax leftmargindistance \dimexpr\xtableparameter\c!leftmargindistance\relax rightmargindistance \dimexpr\xtableparameter\c!rightmargindistance\relax rowdistance \ht\scratchbox
Sorry, but I’m guess that rowdistance doesn’t honor settings.rowdistance from tabl-xtb.lua.
Could anyone confirm the bug or tell me what I miss? You have to use the spaceinbetween key.
\starttext \startxtable[spaceinbetween=2em] \startxrow \startxcell One \stopxcell \stopxrow \startxrow \startxcell Two \stopxcell \stopxrow \startxrow \startxcell Three \stopxcell \stopxrow \stopxtable \stoptext Wolfgang
On 02/13/2016 11:33 AM, Wolfgang Schuster wrote:
Pablo Rodriguez 13. Februar 2016 um 11:28 [...] Well, I suspect that rowdistance isn’t working as expected. [...] Sorry, but I’m guess that rowdistance doesn’t honor settings.rowdistance from tabl-xtb.lua.
Could anyone confirm the bug or tell me what I miss?
You have to use the spaceinbetween key.
Many thanks for your reply, Wolfgang. I’m afraid that spaceinbetween isn’t what I need, It adds extra space to each row, when I only need it after the table header (of before the table body, if you prefer). \starttext \startxtable[frame=off, spaceinbetween=2em] \startxtablehead[foregroundstyle=\bf, topframe=on, bottomframe=on] \startxrow \startxcell one \stopxcell \stopxrow \stopxtablehead \startxtablebody \startxrow \startxcell two \stopxcell \stopxrow \startxrow \startxcell three \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext I thought rowdistance may be the option, but it should be another one. Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 13. Februar 2016 um 11:55
Many thanks for your reply, Wolfgang.
I’m afraid that spaceinbetween isn’t what I need, It adds extra space to each row, when I only need it after the table header (of before the table body, if you prefer). You can increase the height of the cells in the header.
\starttext \startxtable%[frame=off] \startxtablehead \startxrow[boffset=1ex] \startxcell Head \stopxcell \stopxrow \stopxtablehead \startxtablebody \startxrow \startxcell One \stopxcell \stopxrow \startxrow \startxcell Two \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext Wolfgang
On 02/13/2016 12:21 PM, Wolfgang Schuster wrote:
Pablo Rodriguez>> 13. Februar 2016 um 11:55
Many thanks for your reply, Wolfgang.
I’m afraid that spaceinbetween isn’t what I need, It adds extra space to each row, when I only need it after the table header (of before the table body, if you prefer). You can increase the height of the cells in the header. [...] \startxrow[boffset=1ex]
Many thanks for your reply, Wolfgang. This is exactly what I needed. But sorry for asking again, I don’t know why rowdistance doesn’t work when columndistance works: \starttext \startxtable[columndistance=5em, rowdistance=5ex] \dorecurse{10}{\startxrow\dorecurse{6}{% \startxcell cell\stopxcell}\stopxrow} \stopxtable \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 13. Februar 2016 um 19:27
Many thanks for your reply, Wolfgang.
This is exactly what I needed.
But sorry for asking again, I don’t know why rowdistance doesn’t work when columndistance works: ConTeXt uses sometimes different names for the keys in TeX and the variables in Lua, in this case the value from the spaceinbetwen key from TeX is passed to the rowdistance variable in Lua.
Wolfgang
On 02/14/2016 03:40 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 13. Februar 2016 um 19:27 [...] But sorry for asking again, I don’t know why rowdistance doesn’t work when columndistance works:
ConTeXt uses sometimes different names for the keys in TeX and the variables in Lua, in this case the value from the spaceinbetwen key from TeX is passed to the rowdistance variable in Lua.
Many thanks for your explanation, Wolfgang. Pablo -- http://www.ousia.tk
participants (2)
-
Pablo Rodriguez
-
Wolfgang Schuster