rgheck wrote: > The attached files illustrate the bug. We have an English document that > includes a file marked for Spanish and one marked for English. The > English document ends up also being in Spanish, as the appearance of the > word "Figura" shows. There's some bug here then about language changes. > I think the problem is that, at the end of the LaTeX exported for the > Spanish document, we have "\selectlanguage{spanish}", where I think we > were supposed to be going back to English.
Actually, the behaviour is to be expected (although it's a bug, of course). At the beginning of the child, LyX switches the language with \selectlanguage{spanish}. Since we never switch back, Spanish remains the document language until the end. > Strangely, if the included file contains no newlines (i.e., contains a > single paragraph), then the problem vanishes. This is not strange: within in a single paragraph, we use \foreignlanguage{spanish}{<content>} so the language is closed in this case. I guess we need to treat child documents like environments, language-wise. A new task for Enrico. Note that a workaround is to switch off "Auto begin" and "Auto end" in Preferences > Language Settings > Language. Jürgen