11

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

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

This is a MWE:

\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}
1
  • 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
    Commented Jun 11, 2014 at 6:01

2 Answers 2

11

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'

0
1

I was looking for an answer at this related or duplicate question.

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 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.

Edit/Update:

Apparently, as stated in this answer, these packages have become obsolete; texlive-lang-european should be installed now instead:

sudo apt-get install texlive-lang-european

Fore a more technical explanation see here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .