package babel error: you haven't specified a language option
Dimitris Diochnos
diochnos at gmail.com
Mon Feb 26 15:18:07 UTC 2018
Hi Fabrizio,
Packages are usually loaded with the command
"\usepackage{a_package_name_here}" in the preamble of the latex
document. The preamble of a latex document is between the
"\documentclass..." and the "\begin{document}" command.
In your case, you can substitute the command
\RequirePackage{babel}
with
\RequirePackage[american]{babel}
Another idea is to comment out that line altogether and see if your
document compiles with the rest of the dependencies that you have. If
the above suggestions do not work please try to create a minimal
example showing the problem that you have. Here is a short working
example of what is stated above and should be clear that this is not a
macports issue:
\documentclass[letterpaper,11pt]{article}
\RequirePackage[american]{babel}
\begin{document}
\title{Something}
\author{Someone}
\date{}
\maketitle
\section{Introduction}
Blurb ...
\end{document}
Cheers,
Dimitris
P.S.: The order by which packages are included in a latex document
matters. For example, you say that you put the
\usepackage[american]{babel} command right before the \begin{document}
command and it did not work. What if you try to put that command right
before where your problem lies? That is, put the command in the line
before the \RequirePackage{babel} command.
On Mon, Feb 26, 2018 at 5:26 AM, Fabrizio Salvatore
<p.fabrizio.salvatore at googlemail.com> wrote:
> Hi Dimitris,
>
> indeed I have found a statement in the stye file that I'm using that says:
>
> % Document language control
> \RequirePackage{babel}
>
> However, if I add what you suggest in the main body of my LaTeX file, I
> still see the same error appearing. I have added the call:
>
> \usepackage[american]{babel}
>
> just before the '\begin{document}' statement. I don't see to find anything
> saying where exactly it should be added....
>
> Thanks for your help!
>
> Cheers,
>
> Fab
>
> On 26 February 2018 at 00:54, Dimitris Diochnos <diochnos at gmail.com> wrote:
>>
>> Hi,
>>
>> Babel is a package that lets you write in multiple languages in your
>> tex file (and eventually in the compiled file that you will create).
>> As the error message says, you have not specified a language option.
>> My guess is that somewhere in the preamble of your document you have a
>> statement of the form:
>>
>> \usepackage{babel}
>>
>> Replacing that statement with:
>>
>> \usepackage[american]{babel}
>>
>> you should be able to compile the document without the error that you
>> mention. (Also, as a general remark, a short example that others can
>> use to reproduce the error that you claim is always appreciated, so,
>> do not be shy including such an example.)
>>
>> Cheers!
>> Dimitris
>>
>> P.S.: https://ctan.org/pkg/babel has a link to the documentation of
>> the package as well.
>>
>> On Sun, Feb 25, 2018 at 6:37 PM, Fabrizio Salvatore via macports-users
>> <macports-users at lists.macports.org> wrote:
>> > Hi,
>> >
>> > I have come across the following error message when compiling a LaTeX
>> > document:
>> >
>> > package babel error: you haven't specified a language option
>> >
>> > I've googled for this and what I found is related to the presence or not
>> > of
>> > the texlive-language-* packages. I have checked that I have all those
>> > available on macports installed, but I still have the same error
>> > message.
>> > Does anyone have any experience with that?
>> >
>> > Thanks a lot !
>> >
>> > Fab
>> >
>> > --
>> > +++++++++++++++++++++++++++++++++++++++++++++++
>> > Dr Fabrizio Salvatore | e-mail: p.f.salvatore at sussex.ac.uk
>> > orcid.org/0000-0002-3709-1554
>> > Department of Physics and Astronomy, University of Sussex,
>> > Brighton, Sussex, BN1 9QH, United Kingdom
>> > Tel.: +44 (0)1273 67 8749; Fax: +44 (0)1273 67 8068
>> > http://epp.phys.susx.ac.uk/epp/FabrizioSalvatore
>> > facebook.com/p.fabrizio.salvatore
>> > +++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
> --
> +++++++++++++++++++++++++++++++++++++++++++++++
> Dr Fabrizio Salvatore | e-mail: p.f.salvatore at sussex.ac.uk
> orcid.org/0000-0002-3709-1554
> Department of Physics and Astronomy, University of Sussex,
> Brighton, Sussex, BN1 9QH, United Kingdom
> Tel.: +44 (0)1273 67 8749; Fax: +44 (0)1273 67 8068
> http://epp.phys.susx.ac.uk/epp/FabrizioSalvatore
> facebook.com/p.fabrizio.salvatore
> +++++++++++++++++++++++++++++++++++++++++++++++
More information about the macports-users
mailing list