4

I'm trying to use csquotes and to define the variant brazilian for the portuguese language.

Following the package documentation, I've called the package with:

\usepackage[autostyle,portuguese=brazilian]{csquotes}

However, when trying to compile, latex issues an error, namely: "Package keyval Error: portuguese undefined. \ProcessOptions*" (in line 2465 of csquotes.sty).

I've played with other languages and variants, and they work fine. Only when attempting to set it for portuguese language (in either variant) I get the error.

A MWE of the issue is:

\documentclass{article}

\usepackage[portuguese]{babel}
\usepackage[autostyle,portuguese=brazilian]{csquotes}

\begin{document}

\enquote{Something.}

\end{document}

It is true that I can "cheat" and manually redefine the quote style for the portuguese variant with the values of the brazilian variant, as defined in csquotes.def. That can be done by adding to the preamble (I suppose after csquotes has been called):

\DeclareQuoteStyle[portuguese]{portuguese}
{\textquotedblleft}
{\textquotedblright}
[0.05em]
{\textquoteleft}
{\textquoteright}

And with this, I wouldn't need to set the variant in the package options, thus getting rid of the error.

But I suppose this not the best way to deal with the issue. Any clues or suggestions on why this might be happening or what should I do with it?

Thanks in advance!

gusbrs
  • 13,740

1 Answers1

4

The csquotes.def part of the package is missing a line:

\DeclareQuoteOption{portuguese}

This should be reported as a bug, as far as I can tell. For the moment your workaround is the simplest fix, I think. I have reported the bug to the current maintainer, and a fix has been submitted to CTAN. If you are using a current TeXLive or MikTeX, wait a few days and update your packages to get the fixed version.

Alan Munn
  • 218,180
  • I guess you are correct, @alan. And, kudos! for I got not only the answer but the package bug report plus the fix. Thanks a lot! And please thank Joseph Wright as well. It may be sometime before I enjoy it, for I'm using the TeXLive from the Ubuntu repositories. But it's perfectly fine. I can live with the workaround for the moment. – gusbrs Mar 11 '17 at 19:48