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
    Commented Aug 11, 2017 at 13:29

1 Answer 1

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
    Commented Aug 11, 2017 at 14:35
  • 1
    @TeXnician Only my personal inadequacy. Fixed. Thanks you. Commented Aug 11, 2017 at 14:39

You must log in to answer this question.

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