On Sat, Jan 28, 2006 at 07:58:00PM +0100, Georg Baum wrote: > Am Samstag, 28. Januar 2006 14:12 schrieb Martin Vermeer: > > Couldn't it be done like this: > > > > 1) modify lib/configure.m4 to issue the command > > > > lyx2lyx -t 221 -Y $PWD/layouts \$\$i >\$\$o > > $PWD would not work. We also need to consider the user directory. And I > don't like to pass information by relying on the current directory. > > > 2) modify lyx2lyx to use the layouts directory from -Y to load the > > layout file? > > > > I understand that this should be traightforward. > > Well, if one actually implements it it is not so straightforward anymore. > > This patch uses the already existing code to read layout files from > layout2layout.py to extract the text class in lyx2lyx itself. > It works well for me, but two things should be thought of: > 1) lyx2lyx has no hardcoded userdir/sysdir as LyX has. This is only > relevant for standalone usage. Should we change that? > 2) Currently lyx2lyx refuses to run if it can't find the layout file, even > if is not necessary at all. This could be refined to only bail out if the > default layout is really needed. > > Given the fact that 1.3.7 is already out with the broken lyx2lyx I tend > now to polish this and put it in 1.4.1, and for 1.4.0 to tell users to do > > s/^\\begin_layout Standard/\\begin_layout whatever_the_default_layout_is/ > > on their files if they are broken after converting.
Probably sensible. This is heavy machinery for this purpose, but as the code already exists... /BTW problem 2) is only relevant if Layout.py's performance in finding the layout files is poorer than that of LyX. And as to 1), I would assume that the human user knows where they are in standalone use. - Martin
pgpbSW1KyVez7.pgp
Description: PGP signature