On Fri, Feb 7, 2014 at 8:21 AM, Vincent van Ravesteijn <v...@lyx.org> wrote:
> On Thu, Feb 6, 2014 at 1:20 AM, Scott Kostyshak <skost...@lyx.org> wrote:
>> On Wed, Feb 5, 2014 at 5:07 AM, Andrew Parsloe <apars...@clear.net.nz> wrote:
>>>
>>>
>>> On 5/02/2014 9:04 p.m., Scott Kostyshak wrote:
>>>>
>>>> On Wed, Feb 5, 2014 at 2:47 AM, Andrew Parsloe <apars...@clear.net.nz>
>>>> wrote:
>>>>>
>>>>> I notice if I create a table and select the columns of a row (the header
>>>>> row
>>>>> is simplest) then right click > More > Multicolumn, LyX shows a single
>>>>> cell
>>>>> spanning the table, with vertical rules at either end, as one would
>>>>> expect.
>>>>> However, the right rule is not present in the pdf. For a 3-column table,
>>>>> the
>>>>> View Source window shows
>>>>>
>>>>> \multicolumn{3}{|c}{}\tabularnewline
>>>>>
>>>>> whereas it should be
>>>>>
>>>>> \multicolumn{3}{|c|}{}\tabularnewline
>>>>>
>>>>> This is present in both 2.1.0beta2 and 2.0.6 on Windows and is a problem
>>>>> only when *all* cells in the row are selected and converted to a single
>>>>> multicolumn cell.
>>>>>
>>>>> Andrew
>>>>>
>>>>> ---
>>>>> This email is free from viruses and malware because avast! Antivirus
>>>>> protection is active.
>>>>> http://www.avast.com
>>>>>
>>>>
>>>> Hi Andrew,
>>>>
>>>> I remember looking at this code a while ago and it's tricky to get the
>>>> borders right. I forget why. I think it has to do with LyX storing
>>>> left and right borders for each cell but really the LaTeX code should
>>>> show if either is set (because it's the combination). That doesn't
>>>> sound exactly right but it's something like that.
>>>>
>>>> I did some searching and I wonder if this is a duplicate of
>>>> http://www.lyx.org/trac/ticket/8082 . Can you take a look? If not a
>>>> duplicate, can you open a new bug report (and set component to
>>>> tabular) ?
>>>>
>>>> Thanks,
>>>>
>>>> Scott
>>>>
>>>
>>> I should have checked that first. It is probably the same bug, only 8082
>>> emphasizes the multirow aspect. I've added a comment that the bug arises
>>> also with only multicolumn.
>>
>> Vincent fixed the painting bug (that LyX output was different from
>> LaTeX output). I wonder if there is another bug here though. If you
>> select all columns of a row in a table and set multicolumn, the right
>> border is unset, even if the right border of the last cell was set
>> before. It seems that if the right border of the last cell was set
>> then the right border of the multicolumn should be set to that. This
>> is what happens with a multirow (the bottom line is set).
>>
>> The attached patch "fixes" the above behavior. I put "fixes" in quotes
>> because it seems like it was on purpose: there is an explicit
>> condition on col > 0 (0 means 1 column).
>> This condition was introduced by Edwin in 62b0691b.
>> Jürgen might have an idea because he changed the code in the condition
>> at 25117149. Jürgen -- do you know why the condition is there?
>>
>> Scott
>
> The condition was there because Edwin related the existence of the
> right line to the cell left of the multicolumn. This doesn't really
> make sense to me.
>
> So, feel free to commit.

It's in at 1fd32312.

Scott

Reply via email to