103

I recently updated my operating system from Ubuntu 13.04 to Ubuntu 13.10.

Since then, I am facing difficulties compiling my TeX code in which the french babel package is called. Please note that all my sources were compiling very fine before the system upgrade.

However, now, given the following header:

  \usepackage[francais]{babel}

I receive the following error:

! Package babel Error: Unknown option `francais'. Either you misspelled it

What should I do? Please note that if I remove this part of code (\usepackage[francais]{babel}), everything is compiling well. I also tried it with french, and I receive the same result.

Thank you in advance for your help.


MINIMUM WORKING EXAMPLE :

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document} This is a MINIMUM WORKING EXAMPLE. \end{document}

! Package babel Error: Unknow option `francais'. Either you misspelled it
Olivier
  • 208
Martingal
  • 1,326
  • 3
  • 9
  • 11
  • It's french not francais – YuppieNetworking Oct 20 '13 at 13:39
  • 8
    @YuppieNetworking : Unfortunately, it's not working either with french. I receive the same error. – Martingal Oct 20 '13 at 13:41
  • Then you should edit your question to specify that it is not working with the french option, and add all your preamble for us to see if there is some problems in it. – Ludovic C. Oct 20 '13 at 13:44
  • 5
    @LudovicC. It worked with francais before the upgrade. And only this line gives this error. If I remove it, there is no further error. – Martingal Oct 20 '13 at 13:49
  • @Martingal Why do you need this package? Are you trying to typeset letters like ç as in Français? And do you use pdflatex or Xelatex? – Alenanno Oct 20 '13 at 13:52
  • 9
    @Alenanno : Yes, I need that package, otherwise I wouldn't be asking here ... Especially when it's french reports. – Martingal Oct 20 '13 at 13:54
  • @YuppeNetworking: in fact the original name of the option is frenchb. frenchand francaisare both aliases of this name. A few years ago there used to be an autonomous frenchpackage which did a similar job and could be used with babel. (This package still exists under the name eFrench after having been a shareware named FrenchPro for a while). hence possible confusions and the choice of frenchb for the french option of babel. In recent distributions however, the names frenchb, frenchand francais as options for babel should lead to the same results. – Franck Pastor Feb 05 '14 at 14:11
  • 2
    @LudovicC. For future reference, please do not ask users to "add all your preamble for us to see if there is some problems in it". I refer to the following guide on how to write a minimal working example. – Sverre Oct 09 '14 at 13:29

7 Answers7

107

The complete error message is:

! Package babel Error: Unknown option `francais'. Either you misspelled it
(babel)                or the language definition file francais.ldf was not found.

Package file babel.sty supports francais since a very long time, thus the second line of the error message applies very likely:

The organization of the babel language files has recently changed. The language files (.ldf, ...) go into separate TeX distribution packages. For example, option francais loads frenchb.ldf:

  • TeX Live puts the latter in the distribution package babel-french. It needs to be installed, if you are using tlmgr, the package manager of TeX Live.

  • In Ubuntu saucy there is a package texlive-lang-french that contains frenchb.ldf (file list). Install it, if you are using TeX Live of Ubuntu.

Heiko Oberdiek
  • 271,626
  • 3
    Your second proposal solved my problem. Thank you very much for your help. I have no idea why it was removed when upgrading the system. Anyway, thanks again ! – Martingal Oct 20 '13 at 14:16
  • 2
    FWIW: In Fedora 18+, packages like texlive-babel-german contains the relevant files. – Frederick Nord Jan 07 '14 at 15:16
  • 2
    It works in the same way in Ubuntu 16.04 for italian language: just need to install the package texlive-lang-italian. – Danibix Aug 19 '17 at 18:54
64

I had the same error while trying to generate the pdf files from lyx. I did run sudo apt-get install texlive-lang-french and the error was resolved. Now working fine

Update: These packages have become obsolete; texlive-lang-european should be installed now:

sudo apt-get install texlive-lang-european

user39497
  • 641
  • 4
  • 2
8

Exactly same issue here for various languages like: \usepackage[dutch]{babel}

A way of solving: Open: Ubuntu Software Center and install: texlive-lang-all

But what still changed is that in case you change the language in the \usepackage[english]{babel} you have to remove the temporary latex files before latex-ing again. But with that remark every works again as before.

thomas
  • 81
2

The solution for the error prompted for \usepackage[spanish]{babel} :

! Package babel Error: Unknown option `spanish'. Either you misspelled it

Install the texlive-babel-spanish package via yum/dnf:

sudo dnf install texlive-babel-spanish
  • 2
    This package doesn't exist for Ubuntu with apt-get, as with other languages the command needed is sudo apt-get install texlive-lang-spanish. – Diego-MX Oct 28 '16 at 15:09
2

I had the same problem for the Spanish language, only after reading I came to the conclusion that I had to install all the packages, and so I did for Elementary OS from the terminal:

$ sudo apt-get install texlive-full texmaker

Yo tuve el mismo problema para el lenguaje español, unicamente luego de leer llegué a la conclusión que debía instalar todos los paquetes, y así hice para Elementary OS desde la terminal:

$ sudo apt-get install texlive-full texmaker

Screenshot of Texmaker

Cadoiz
  • 213
0

I found this post looking for the spanish version of this error, i.e.:

Package babel Error: Unknown option `spanish'.

To solve do:

sudo apt-get install texlive-lang-spanish

(Works on Ubuntu 16.04 LTS)

0

I was looking for an answer here (duplicate question). For me on different Ubuntu derivates, this did the trick:

sudo apt-get install texlive-lang-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-german

Of course, you can replace german with your needed language, dutch, spanish or francais, as in the other answers.

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

sudo apt-get install texlive-lang-european
Cadoiz
  • 213