Edwin Leuven wrote:

> Michael Gerz wrote:
>>> Edwin Leuven wrote:
>>>
>>> is there a reason to have both M_TOGGLE_LINE_TOP and TOGGLE_LINE_TOP ?
>>> couldn't we just have one TOGGLE_LINE_TOP and set the proper flags
>>> depending whether we are in a multicolumn cell or not?
>> This is exactly what I proposed for 1.4 :-)
> 
> the attach patch does just that...
> 
> Georg Baum wrote:
>>> what happened?
>> 
>> Nobody dared to open the can of worms that the tabular inset is. IMO the
>> tabular code that is spread over tabular.C and insets/insettabular.C
>> needs to be put into one file and almost completely rewritten. Of course
>> now is not the time to do so...
> 
> agreed. the patch is an improvement to the current code though because
> it basically gets rid of the M_TOGGLE_LINE stuff...

I had a closer look, and IMHO it is only partly an improvement. You remove
the functionality to set the borders of whole columns/rows. This is useful
functionality that should not be removed. For example I could have a table
with several columns, including multicolumn cells, where some have top
lines and decide that I rather do not want any top row. I therefore want to
be able to set or reset the top lines of a whole row.
For toggling I agree: It does only make sense to toggle what is currently
used, e.g. if at least one cell of a row has an individual top/bottom line
setting that setting should be toggled. If the whole row has the same
setting then the whole row should be toggled. The same applies of course to
left/right lines and columns.

> moreover, atm the dialog and toolbar give inconsistent results. the
> patch solves that (and gets rid of a bog).

Which one?

I just committed apatch that renames the arguments of the tabular methods
that you want to remove. These are useful IMO, even if they are currently
not used by the dialog, so they should be kept. Maybe you now see what
these arguments mean after I gave them meaningful names.

If you rework your patch to not remove this functionality then it would be
OK with me. It would be even better if it would be possible to set/reset
whole column/row lines in the dialog, but since the dialog is horribly
broken anwyway this can also wait.

> the only thing left is the enabling/disabling of the toolbuttons (which
> btw is not done atm either)
> 
> it is not really clear to me in what situations we should allow what. i
> found the following comment:
> 
> // pay attention to left/right lines: they are only allowed
> // to set if we are in first/last cell of row or if the left/right
> // cell is also a multicolumn.
> 
> why is that, and what would be the preferred policy here?

This is the multicolumn case (normal cells are handled above that comment).
It is not possible to set left/right lines inside of a multicolumn cell,
they can of course only be set at the leftmost/rightmost cell of a
multicolumn cell. This is one area where the code could be simplified (e.g.
do not use dummy cells for multicolumn cells, but just one cell), but I
believe that the current code is correct here.

>>> what would be a good way of setting lines anyway? (am not a latex
>>> expert)
>>>
>>> on a per cell basis using \cline and switching to \hline when all
>>> columns are spanned?
>> 
>> This is done AFAIK.
> 
> not in the user interface....

What do you mean? You can set the lines in the UI per cell. If all lines in
a row are set this results in a \hline, otherwise in one or more \cline.
What else has \cline and \hline to do with the user interface?


Georg


Reply via email to