I think I have the same problem but a bit funnier. In the screen I can see Teorema, Demostracion etc But when I export the document (or print to file) some of the keywords remain in english (theorem, definition, etc) while others get the correct translation (Demostracion instead proof) etc
That is driving me crazy. for I haven´t any idea about managing that
Could anyone help (I coarse grain solution patching files or something could help me
I am not a LyX user, but after playing a bit with this program, I think I may clarify some things. Suppose you want to write a corollary. You choose "Corollary" in the corresponding drop box (located at the top left corner, at least in my version of LyX). Then you see something like "Corolario xx.xx" in your document, depending on the document class, language settings, etc.. So you start typing the corollary statement. When you get the pdf file, you see "Corollary" (in English), independently of the language settings. What happened?
Internally, LyX adds to the preamble of the LaTeX source the lines
The label that appears in the pdf is fixed by the \newtheorem command, which defines the cor environment. You can't change the label (in English)... unless you redefine somehow the cor environment. For example, add to the preamble the following code:
That's magic! You now get "Corolario", as desired, in the pdf file. The same process must done for every theorem-like environment. But, which code should be used to make redefinitions? Let us write again the original source lines with some colors
Don't forget to put together all the \@namedef commands between \makeatletter and \makeatother, as shown below, assuming that your document has theorems, corollaries, unnumbered propositions, unnumbered examples, exercises and unnumbered remarks:
Mikesol, before adding \usepackage commands, check if the corresponding package has been already loaded. For example, in your file, babel appears three times.
20100 wrote:Hello, I have finally found a solution.
You can select all your text (ctrl-A) and by a right clic you have a Text style option > personalize > language...
And now my whole document is under a single selectlanguage english
That only inserts \selectlanguage commands in the LaTeX code, which have no influence on how theorem-like environments are labeled. So it does not solve the problem exposed in the opening post.
Thanks Juanjo, your solution works for me... almost as is. I'm using Lyx 1.6.5 with babel on Ubuntu 10.04. The only thing I had to modify is to elimine the tag
at the end of the code you provided. Otherwise it wouldn't compile at all (lots of LaTeX errors). I also added fields to change the name of numbered propositions and definitions. At the end, my LaTeX preamble for my document looks like this (copy & paste):