>> That's not that easy as this could break the document compilation. So when
>> hyperref is used, we load babel before the user preamble without hyperref
>> behind it. So you have to adapt your preamble when you turn on/off
>> hyperref. This is extremely tricky as this affects many LaTeX-packages and
>> will surely lead to complaints.
>
> This is what we do for jurabib already, and it works well. At least the people
> can decide: use the new feature (hyperref) and pay for it by having to change
> the preamble, or continue to use the old documents without being urged to
> rewrite them.

But with your proposal using hyperref or not is then the same as converting from 1.5 to 1.6 and vice versa. I use for example in all my German documents commands to translate the word "Index" to Stichwort- und Befehlsverzeichnis" or similar. Therefore I have a a babel call in my preamble in 1.5 documents. In LyX 1.6 now have to add or delete it every time I use the PDF properties of LyX 1.6 or not. In my opinion this is not acceptable to change the document preamble when using LyX features or not. With the current solution you only have to adapt your preamble once when going from 1.5 to 1.6 but then can use 1.6 and all its features or not. That's how it should work in my opinion.

>> Nevertheless, also for other packages you might load in the preamble it is
>> important to load babel before them as many rely on babel.
>
> Such as?

As said, vietnamese, and japanese, but also caption. And stuff like algorithm floats and AMS words like "Theorem" that you need to translate. The language support can only be handled correctly when LyX loads babel before the user preamble when Vietnamese and Japanese is used, otherwise you would be in troubles when turning on/off hyperref as this changes the way these packages have to be loaded. When using the caption package, which I use for example in nearly all of my documents, babel must be loaded before the user preamble, not afterwards.

>> I mean, have a
>> look in the EmbeddedObjects manual what nasty hacks were needed to be able
>> to define things in the preamble, due the too late loading of babel.
>
> For example?

The nastiest ones were algorithms (OK, this was related to hyperref).

> Look, hyperref might be a nice addition, and it might require the shifting of
> babel for the people that use it, as jurabib required it. But also accept
> that there are people that do not care a dime about hyperref and that do not
> want that their documents break just for the sake of a feature they do not
> need.

I see your point, but loading bale after the user preamble was in general not the correct place. You will run again and again into the situation that babel needs to be loaded before packages that deal with words that need to be translated. So the babel loading change was not only made only for hyperref, but for general better support as you can of course only change or define word translations and language issues after babel has been loaded.
I think LyX shouldn't suffer from one not so very good decision to load babel 
as the last package.

> The situation, as I see it, is the following:
>
> * the addition of hyperref requires that babel is being loaded before hyperref
> * there's no urgent need of changing the babel loading order in any other case

Not true, see above.

>> Does anybody found a drawback instead of this?

Has anybody?

> But I have had so  many hacks to use the be able to define things
> because babel was loaded after the preamble, not only hyperref issues, but
> also koma-script ones.

Which KOMA-script issues?

I must admit that I can't find this at the moment, only perhaps the 
"numericaldate" option.

regards Uwe

Reply via email to