I recently updated my Miktex 2.9 and when I try to compile my files I get the following error, which I didn't have...

package babel error: unknown option spanish. Either you misspelled it or the language definition file spanish.ldf was not found.

This is my preamble:


Please help!

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Jun 11 '14 at 6:01
  • Thanks Christian, I'll check the guide. This is an example that has the above problem:\documentclass[12pt]{article} \usepackage[explicit]{titlesec} \usepackage[usenames,dvipsnames]{pstricks} \usepackage{amsfonts,amssymb,amsmath,mathrsfs,enumerate,epsfig,fullpage,pst-grad,pst-plot} \usepackage[spanish]{babel} \usepackage[latin1]{inputenc} \begin{document} Esta es una prueba. \end{document} – Romeo Jun 11 '14 at 6:20

The organization of babel has changed. The languages has been separated into separate distribution packages and are now independently maintained. In MiKTeX you have to install babel-spanish to get babel's spanish.

Related: Package babel Error: Unknown option `francais'

| improve this answer | |

I was looking for an answer here: (related/duplicate question)

Package babel Error: Unknown option `ngerman'

For me on different Ubuntu derivates, this did the trick:

sudo apt-get install texlive-lang-spanish %in my case -german

(don't forget the "install" as in egreg's comment there, where I have this from)

For Fedora/Debian please use

sudo dnf install texlive-babel-spanish %in my case -german

Of course, you can replace spanish/german with your needed language, dutch, francais or another one.

Apparently (as stated in this answer: https://tex.stackexchange.com/a/142358/110394 ), these packages have become obsolete; texlive-lang-european should be installed now:

sudo apt-get install texlive-lang-european

Fore a more technical explanation see here: https://tex.stackexchange.com/a/139707/110394

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.