<div dir="ltr">Ulrike,<div><br></div><div>Thanks! I was not aware you were not getting the correct language ... </div><div><br></div><div>Would you mind sharing why you prefer Babel?</div><div><br></div><div>Paulo Ney</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Dec 1, 2018 at 7:11 AM Ulrike Fischer <<a href="mailto:news3@nililand.de">news3@nililand.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Tue, 27 Nov 2018 22:11:31 -0800 schrieb Paulo Ney de Souza:<br>
<br>
> Would anyone help elucidate what is the problem between these two packages,<br>
> when you run it with xelatex, as show in this MWE?<br>
> <br>
> I get an error:<br>
> <br>
> ! Undefined control sequence.<br>
> \@begindocumenthook ...sname extras\cref@language<br>
> \endcsname }\@ifundefined<br>
> ...<br>
> l.12 \begin{document}<br>
<br>
cleveref has an option "brazilian", but polyglossia sets the<br>
languagename to "brazil". <br>
<br>
> and they work fine with Babel.<br>
<br>
You don't get an error but not the correct language either. This<br>
here should work (and I would prefer the babel solution):<br>
<br>
\documentclass{article}<br>
<br>
%\usepackage[brazil]{babel}<br>
<br>
\usepackage{polyglossia}<br>
\setmainlanguage{brazil}<br>
<br>
\usepackage[brazilian]{cleveref}<br>
<br>
<br>
\begin{document}<br>
\section{abc}\label{section}<br>
This is a test. \cref{section}<br>
\end{document}<br>
<br>
<br>
<br>
-- <br>
Ulrike Fischer <br>
<a href="http://www.troubleshooting-tex.de/" rel="noreferrer" target="_blank">http://www.troubleshooting-tex.de/</a><br>
<br>
_______________________________________________<br>
TeX FAQ: <a href="http://www.tex.ac.uk/faq" rel="noreferrer" target="_blank">http://www.tex.ac.uk/faq</a><br>
Mailing list archives: <a href="http://tug.org/pipermail/texhax/" rel="noreferrer" target="_blank">http://tug.org/pipermail/texhax/</a><br>
More links: <a href="http://tug.org/begin.html" rel="noreferrer" target="_blank">http://tug.org/begin.html</a><br>
<br>
Automated subscription management: <a href="http://tug.org/mailman/listinfo/texhax" rel="noreferrer" target="_blank">http://tug.org/mailman/listinfo/texhax</a><br>
Human mailing list managers: <a href="mailto:postmaster@tug.org" target="_blank">postmaster@tug.org</a><br>
</blockquote></div>