Jean-Pierre.Chretien wrote: > > > Hello, > > I've a little problem with batch use of lyx to provide tables > formatted as text. > Up to lyx version 1.3.1, I could > reLyX foo.tex > (where foo.tex contains a table) > then > lyx -e text foo.lyx > Since 1.3.1 (current is 1.3.2), this doexn't work any more, > the table is not correctly formatted when I load interactively > lyx foo.lyx > > If I load interactively in an older version, e.g > lyx-1.2.1 foo.lyx > then File->save in foo_old.lyx > all is OK again, and a diff between foo.lyx et foo_old.lyx shows a > lot of differences. > > Two questions there: > 1 - is there a problem in the reLyX install?
No. reLyX produces a total hodge-podge of stuff, some of which is in 'modern' lyx format, but some of which is in an old, old format. The lowest common denominator here is \lyxformat 2.15. Thereafter, we run the file through the lyx2lyx converter to eventually reach the current lyx format. > \LyXTable > multicol5 > ---------------------------- > Seems that this code is no more interpreted by lyx >=1.3.1. Should read > > \begin_inset Tabular > instead of > \LyXTable > > Moreover, lyxformat is 2.15, which seems an obsolete value. All is as expected. > 2 - Is there a way to recover batch processing by adding a batch step > loading foo.tex in lyx-1.2.1 and saving as foo_old.tex ? > I guess this is possible with lyxpipe, lyx2lyx seems useless here. > > Thanks for any help I'm surprised that the batch processing doesn't work, but you could write a little shell script. Something like this (untested). #! /bin/sh # script expects two args, the input (tex) file and output (ascii) file test $# -eq 2 || exit 1 test -r $1 || exit 1 reLyX $1 tmpfile1=`echo $1 | sed 's/tex$/lyx/'` tmpfile2=tmp.$$ lyx2lyx $tmpfile1 > $tmpfile2 rm -f $tmpfile1 lyx -e ascii $tmpfile2 > $2 rm -f $tmpfile2 -- Angus