Jürgen Spitzmüller wrote:
We are having some discussion about the impact of a change of the babel
loading order in LyX 1.6:
http://bugzilla.lyx.org/show_bug.cgi?id=5024
In 1.5 and earlier, babel was loaded after the user preamble. This has been
changed in the 1.6 cycle, mainly because babel should be loaded before
hyperref.
Now the problem is that this breaks any document that redefines babel in the
preamble or in some private style file, due to a package clash.
Basically, there are two opinions:
1. Don't care about the user preamble. Loading babel before the preamble is
generally better, and we should do the switch now, even if it means some
extra work and irritation to the users.
2. This is an inacceptable regression. Old documents should not stop working
in 1.6 just like that (i.e., without any explicit user action). Therefore,
the babel loading order (at least for old documents) must not be changed.
Note that there is a clean technical solution for both ways. For (1.), leave
the code as is, for (2.), only load babel earlier if hyperref is used (as we
already do for jurabib) and adapt the syntax for Vietnamese, which also needs
special treatment.
I guess this entails a rather fundamental question about our file format and
upgrading policy, that's why I'd like to hear other's opinion (you can read
the opinions of Georg, Uwe and myself on bugzilla).
My personal, humble opinion as a LateX ignorant:
We should do the right thing at LateX level. If Uwe is right that what
current method is the correct one we should adapt the code to it so that
1.5 documents are always correctly imported. If that means fiddling a
bit with the preamble then so be it, we just need to say that the
preamble is sacro-saint territory and that any more fiddling is by
default forbidden with it should be carefully evaluated before it is
committed.
Idea 1: As the preamble is LateX, maybe the option to use tex2lyx in
lyx2lyx should be evaluated.
Idea 2: There is apparently no real communication between lyx2lyx and
LyX. So 1, LyX cannot specify options for importing (like this dangerous
preamble fiddling) and 2, doesn't really know what went wrong in lyx2lyx.
For problem 1, I guess we need an optional import option dialog, the
saved options could be reused for further imports.
For problem 2, we need to (optionally) show a lyx2lyx generated report
to the user.
But, as I said, this is all advanced stuff for the advanced user (i.e.e
not me :-)) so just do what you think is right.
Abdel.