Search code examples
latexlyx

Package Babel Error in Lyx


I am new user Lyx. I just installed, Version LyX 2.1.4. After creating my first file, I run the DVI viewer, but I get this error:

You need to specify a language, either as a global option or as an optional argument to the \usepackage command; You shouldn't try to proceed from here, type x to quit.

I don't know how to set the language. My OS is Windows 10. Help please.


Solution

  • If you use the babel package, you need to specify which language should be used, for example:

    \usepackage[ngerman]{babel}
    

    The square brackets are used for optional arguments. In this case you need to give the language so that babel knows how to work.

    Another way is to specify it as a global option, which can be placed as an optional argument in the document class, but since I only know this solution in in LaTeX, I can't give you an example for this.

    UPDATE:

    If I get it right, you can simply write it anywhere in the preamble like this:

    \language english
    

    just look up what language you need and insert it for english or ngerman