A table created by Lyx 1.2 with a fixed width column has a bogus horizontal
alignment alignment attribute:
<column alignment="left" ... width="4cm">
LyX 1.2 ignores this attribute, and always used block alignment,
so there was no problem.
LyX 1.3 does not ignore this attribute, so on files created with LyX 1.2,
fixed width columns get left alignment even though they should have block
alignment.
The attached patch fixes this bug.
PS This shows why storing useless information in the LyX file
(like the h. alignment for fixed width column) is wrong, as I claimed before.
Index: lyxconvert_220.py
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/lyx2lyx/lyxconvert_220.py,v
retrieving revision 1.3
diff -u -p -r1.3 lyxconvert_220.py
--- lyxconvert_220.py 28 Aug 2002 09:03:45 -0000 1.3
+++ lyxconvert_220.py 19 Dec 2002 19:13:21 -0000
@@ -75,9 +75,19 @@ def change_insetgraphics(lines):
i = i+1
+def change_tabular(lines):
+ i = 0
+ while 1:
+ i = find_token(lines, "<column", i)
+ if i == -1:
+ break
+ if not re.search('width="0pt"', lines[i]):
+ lines[i] = re.sub(' alignment=".*?"',' alignment="block"',lines[i])
+ i = i+1
def convert(header, body):
change_insetgraphics(body)
+ change_tabular(body)
if __name__ == "__main__":
pass