Closed Felipe-Math closed 1 year ago
If I set
leftpos=0
,rightpos=0
orabovepos=0
the behavior is the same: the line that is being setted doesn't cross any line, only touches the first line. But, If I setbelowpos=0
, the vertical line covers the first horizontal line below.
Either the above end or the below end of a vline segment has to cover a hline by default, otherwise you will get a hole in a vline of multirow cells, which is unacceptable.
The wiredest is that, if i set
belowpos=0.0000000001
, then the vertical line behaves just like the others, so it doesn't cover the first line below, only touches it.
I can treat all positve values as zeros for belowpos
when there is only one hline below.
PS: you can copy and paste images directly in writing a github issue.
Thanks for answer me.
I've tried to drag the image directly in the github issue, but for some reason it doesn't worked.
This way of controling has some advantages, like setting 1 will garrantee that all lines are covered.
But it has some disvantages, for instance, if you have 4 vertical lines and wants a horizontal line to exactly covers the second vertical line, then you need to make an account, like this:
rightpos = (wd[1] + rulesep + wd[2])/(wd[1] + rulesep + wd[2] + rulesep + wd[3] + rulesep + wd[4])
,
where wd[i]
denotes the width of the i-th line.
Perhaps some feature could be thinked to make some of this settings easier, perhaps someting like:
rightpos = { to = 2, cover }
,
where to
could be used to define until wich vline the hline "stretches", and keywords like cover
, touch
and middle
to contol the intersecction behavior.
This way of controling has some advantages, like setting 1 will garrantee that all lines are covered. But it has some disvantages, for instance, if you have 4 vertical lines and wants a horizontal line to exactly covers the second vertical line, then you need to make an account, like this:
rightpos = (wd[1] + rulesep + wd[2])/(wd[1] + rulesep + wd[2] + rulesep + wd[3] + rulesep + wd[4])
, wherewd[i]
denotes the width of the i-th line.
Not time for tests, but I think rightpos=0.3333
is more or less enough in most of the time.
Perhaps some feature could be thinked to make some of this settings easier, perhaps someting like:
rightpos = { to = 2, cover }
, whereto
could be used to define until wich vline the hline "stretches", and keywords likecover
,touch
andmiddle
to contol the intersecction behavior.
We have to make a compromise between functionality and performance. Many people agree with the opinion of booktabs
package that vertical lines are evil. And I have never seen a real document which uses more than two hlines or vlines. Therefore I think it is acceptable to provide a simplified solution for better performance (actually some users have complained about the speed of tabularray
package).
I decide to make the behavior of abovepos
and belowpos
the same as leftpos
and rightpos
: with value 0
a vline segment touches the first hline. And it has default position that covers the first hline. This will also fix issue #216.
There is an inconsistency when setting
belowpos=0
.If I set
leftpos=0
,rightpos=0
orabovepos=0
the behavior is the same: the line that is being setted doesn't cross any line, only touches the first line.But, If I set
belowpos=0
, the vertical line covers the first horizontal line below.The wiredest is that, if i set
belowpos=0.0000000001
, then the vertical line behaves just like the others, so it doesn't cover the first line below, only touches it.MWE:
That results: Print
Thanks