1

I use:

  • class memoir
  • package babel
  • package biblatex-abnt
  • Manjaro Linux

I run and compile:

  • biber (biblatex)
  • XeLaTeX

I also have tried to switch the languages several times, but they are always in Dutch instead of Portuguese. I put my native language in the first and also in the last of the languages in the package babel. I also tried to add portuguese to memoir and biblatex, but always in Dutch. And `biber, at sometimes, classified wrongly as Dutch, German and Spanish.

Here is the small and minimal code:

\documentclass[12pt, a4paper, oneside, oldfontcommands, dvipsnames]{memoir}

\usepackage{xspace}
\usepackage{url}
\usepackage{fontspec}

\usepackage[backend = biber, dateabbrev = false, giveninits, ittitles, justify, sorting = nyt, style = abnt, url = true]{biblatex}
\addbibresource{referencias.bib}

\PassOptionsToPackage{hyphens}{url}
\usepackage[htt]{hyphenat}

\usepackage[portugues, dutch, english, french, italian, ngerman, spanish]{babel}
\usepackage{csquotes}
\selectlanguage{portugues}

\begin{document}

    \chapter*{Abstracto}

    Bom dia!

    \selectlanguage{english}
    \chapter*{Abstract}

    Good morning!

    \selectlanguage{french}
    \chapter*{Abstract}

    Bonjour !

    \selectlanguage{spanish}
    \chapter*{Abstracto}

    ¡Buenos días!

    \selectlanguage{italian}
    \chapter*{Riassunto}

    Buonggiorno!

    \selectlanguage{ngerman}
    \chapter*{Abstract}

    Guten Tag!

    \selectlanguage{dutch}
    \chapter*{Overzicht}

    Goedemorgen!

    \selectlanguage{portugues}


    \tableofcontents
    \listoffigures
    \listoftables

    \nocite{*}
    \begin{raggedright}
    \printbibliography
    \end{raggedright}

\end{document}

Screenshot

enter image description here

Log

Log file

Yes, I have Portuguese installed.

Which packages were caused by catoptions? Here is the list of packages (yes, many packages, because I am using @gcedo'sThesis Polimi).

\usepackage{parskip}
\usepackage{pdfpages}
\usepackage{subcaption}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{tikz}
\usetikzlibrary{pgfplots.groupplots}
\usetikzlibrary{positioning, calc, shapes}
\usepackage{sansmath}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{abraces}
\usepackage{ragged2e}
\hyphenation{da-ta-base}
\usepackage{marginnote}
\usepackage{pgfplotstable}
\usepackage{calc}
\usepackage{blindtext}
\usepackage{metalogo}
\usepackage{lettrine}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{xspace}
\usepackage{url}
\usepackage{acronym}
\usepackage{fontspec}
\usepackage{environ}
\usepackage{titlesec}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{newverbs}
\usepackage{verbments}
\usepackage{adjustbox}
\usepackage{verbatim}
\usepackage{minted}
\usepackage{chngcntr}
\usepackage{menukeys}
\usepackage[htt]{hyphenat}
\usepackage{hyperref}
\usepackage{memhfixc}
\usepackage{pacotes/infoBulle/infoBulle}
  • Observe that if I change from portuguese to brazil, the document will still be in Dutch. – Gustavo Reis Nov 26 '18 at 8:32
  • 1
    Make sure to make this into a single example instead of asking people to make several files to test your example. There is no need to include that abstract, it could just as well be in the document. Also is the biblatex/biber stuff necessary because you are not providing any bib data for others to test. – daleif Nov 26 '18 at 8:36
  • 1
    Package babel Error: Unknown language `portuguese' does not sound good. Are you sure you have installed the Portuguese language module? – moewe Nov 26 '18 at 8:40
  • Please follow daleif's request and try to minimise your example. Ideally you would only have one file (without biblatex or Biber, they are not relevant here, I think). Do you really need all the languages in your example to show the issue or would two be enough? – moewe Nov 26 '18 at 8:42
  • 2
    I have no issues using upstream TeXLive 2018, I don't speak dutch or portuguese, but Conteúdo, Lista de Figuras and Lista de Tabelas sounds quite portuguese to me – daleif Nov 26 '18 at 8:42
3

Your MWE works fine for me, but the .log file you show (which is from a different document) suggests that catoptions is loaded.

The following MWE reproduces the undesirable behaviour for me (not only is the output in Dutch, I also get two errors)

\documentclass{article}

\usepackage{catoptions}
\usepackage[dutch, portuguese]{babel}

\begin{document}
Lorem \refname

  \tableofcontents
  \listoffigures
  \listoftables
\end{document}

Apparently catoptions messes with babel's option handling so heavily that it completely destroys the mapping from portuguese to the internal name portuges.

Solution 1: Don't load catoptions (or the package(s) that load it) unless you really need it and know why you load it.

Solution 2: Load babel before catoptions (or the package(s) that load it).

Solution 3: Load babel with the option portuges instead of portuguese. (For historically reasons the Portuguese language module is internally called portuges in babel, the name portuguese is resolved as a convenience option and catoptions disables the handling of that option.)

See also Error when using xwatermark and babel


The package menukeys in your updated list of packages is the one that loads catoptions. I strongly suggest you do not load all the packages you list in your question – I can hardly imagine that you need all of them. The template you link to has not been updated in two years and I doubt there is going to be a lot of support for it.

  • I do not have package catoptions. I will test now. – Gustavo Reis Nov 26 '18 at 9:04
  • @GustavoReis Your .log file says otherwise. Quite likely a package you or you template loads loads catoptions internally. – moewe Nov 26 '18 at 9:04
  • I have searched catoptions in all files and I did not find catoptions. I will attach the log and the file. – Gustavo Reis Nov 26 '18 at 9:07
  • 1
    You need to create an MWE that actually gives this problem. xwatermark seems the most likely candidate – daleif Nov 26 '18 at 9:18
  • 1
    @GustavoReis ^^^^^See Tobi's comment above. – moewe Nov 26 '18 at 12:24

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.