5

I am having the warning:

Package babel Warning: Last declared language option is `english',(babel) but the last processed one was `brazil'.

Because the class I use is badly and has hard coded the babel option:

\RequirePackage[brazil]{babel}

But I need to use english on the document. Doing:

\PassOptionsToPackage{english}{babel}
\documentclass[brazil,english]{abntex2}

Seems to be passing the option to babel as:

\RequirePackage[english,brazil]{babel}

Instead of:

\RequirePackage[brazil,english]{babel}

Update

Adding MWE:

\PassOptionsToPackage{english}{babel}

\documentclass[
    10pt,
    openright,
    twoside,
    a5paper,
    brazil,
    english
    ]{abntex2}

\begin{document}

Hello World!

\end{document}
1
  • Please add a (MWE!(as always)
    – Bobyandbob
    Aug 11 '17 at 13:29
10

Use

\PassOptionsToPackage{main=english}{babel}

if you want English as the main language of your document or

\PassOptionsToPackage{english,main=brazil}{babel}

if you want Brazil to be the main language of your document and English an additional language:

\PassOptionsToPackage{main=english}{babel}

\documentclass[
    10pt,
    openright,
    twoside,
    a5paper,
    ]{abntex2}

\begin{document}

Current language is \languagename.

\end{document}

results in

Current language is english.

and

\PassOptionsToPackage{english,main=brazil}{babel}

\documentclass[
    10pt,
    openright,
    twoside,
    a5paper,
    ]{abntex2}

\begin{document}

Current language is \languagename.

\end{document}

results in

Current language is brazil.

Both results without warning.

2
  • 2
    Your first two lines use brackets instead of (curly) braces. Is there a reason for that.
    – TeXnician
    Aug 11 '17 at 14:35
  • 1
    @TeXnician Only my personal inadequacy. Fixed. Thanks you. Aug 11 '17 at 14:39

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.