[Tex/LaTex] Why can’t I use babel package

babeltexmaker

I'm using TexMaker in Xubuntu. I wrote these lines:

\documentclass{article}
%
\title{Os devaneios da pós-graduação de Luís Muniz}
\author{Luís Augusto Muniz Telles}
\date{\today}
\usepackage[portuguese]{babel}
%
\begin{document}
\maketitle
%
"Paulo batista mito"
\end{document}

When I click on the button to compile, it gives me this error:

#"Package babel error: unknown option 'portuguese'. Either you mispelled it  
 (babel)      or the language definition file portugues.ldf was not found."

I already tried the options portuges, brazilian and brazil and it gives me the same error.

Note: I just installed TexMaker and tried it out.

Best Answer

From my comment to a proper answer. :)

This looks like a missing dependency in the TeX installation. Running

$ sudo apt-get install texlive-lang-portuguese

in the terminal (or installing the very same package via Software Center) will install the Portuguese support for babel and hopefully the code will work. :)


Also, the format of the document should be

\documentclass{article}

\usepackage[T1]{fontenc} % to have good hyphenation
\usepackage[utf8]{inputenc} % accented characters in input
\usepackage[portuguese]{babel}
%
\title{Os devaneios da pós-graduação de Luís Muniz}
\author{Luís Augusto Muniz Telles}
\date{\today}
%
\begin{document}
\maketitle
%
``Paulo batista mito''
\end{document}
Related Question