Bug 16 has been classified as a reLyX bug. It's not. I think that
it's partly a lyx2lyx bug and partly a regression in the lyxformat.

I don't provide a fix for lyx2lyx because I have no python yet,
but I hope that the analysis below will make it easy to squash the bug.
At least, squash it as well as the current format allows.

The bug:
importing latex like :

\begin{tabular}{|c||c|}

ignores the "||"

Which is true, IN THE LYX FILE LOADED BY LyX 1.3.

However, reLyX produces a LyX file with \lyxformat 2.15.
The relevant snippet here is:

\LyXTable
multicol5
2 2 0 0 0 0 0 0
0 0 0 0
0 0 0 0
8 1 2 "" ""
8 0 1 "" ""
0 8 0 0 0 0 0 "" ""
0 8 0 0 0 0 0 "" ""
0 8 0 0 0 0 0 "" ""
0 8 0 0 0 0 0 "" ""

The LaTeX {|c||c|} is equivalent to lines
# centred column, one left line, two right lines, no pwidth, no special
8 1 2 "" ""
# centred column, zero left lines, one right lines, no pwidth, no special
8 0 1 "" ""

As you see, this is correct. 

Running this lyx file through lyx2lyx, I find the lyxformat 217 is ok
\begin_inset  Tabular
<LyXTabular version="1" rows="2" columns="2">
<Features rotate="0" islongtable="0" endhead="0" endfirsthead="0" endfoot="0" 
endlastfoot="0">

<Row topline="0" bottomline="0" newpage="0">
<Column alignment="8" valignment="0" leftline="1" rightline="2" width="" special="">
<Cell multicolumn="0" alignment="8" valignment="0" topline="0" bottomline="0" 
leftline="1" rightline="2" rotate="0" usebox="0" width="" special="">

But things go wrong between lyxformat 217 and lyxformat 218:
\begin_inset  Tabular
<lyxtabular version="2" rows="2" columns="2">
<features rotate="false" islongtable="false" endhead="0" endfirsthead="0" endfoot="0" 
endlastfoot="0">
<column alignment="center" valignment="top" leftline="true" rightline="true" width="" 
special="">
<column alignment="center" valignment="top" leftline="false" rightline="true" width="" 
special="">
<row topline="false" bottomline="false" newpage="false">
<cell multicolumn="0" alignment="center" valignment="top" topline="false" 
bottomline="false" leftline="true" rightline="true" rotate="false" usebox="none" 
width="" special="">

Clearly, column 2 now requires a leftline="true".

More generally, however, I think that this is a regression in the LyX format. 
This is perfectly valid LaTeX:
\begin{tabular}{|c||||c|}
and I don't think LyX can generate this anymore.

HTH,
-- 

Reply via email to