Open lazzalazza opened 3 years ago
This seems to be due to polyglossia needing to be loaded before hyperref. There is no straight forward solution to this because it requires writing a parsable option for the document class, e.g. something like
\documentclass[11pt,a4paper,sans,polyglossia,pgldefaultlang={[lang option]<lang>},pglotherlang={[lang option]<lang>},pglotherlangs={<lang1>,<lang2>,...}]{moderncv}
which would then setup polyglossial before hyperref. Alternatively, write setter functions that allow to set the default language before hyperref is loaded. I have no idea how to achieve this. If somebody knows something, step up.
For now, you can alter your copy of moderncv.cls
. Around line 84 you should see
% font loading
\RequirePackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
Thereafter, insert the following lines
\ifxetexorluatex
\RequirePackage{polyglossia}
\setdefaultlanguage{italian}
\setotherlanguages{french, spanish, german}
\else
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\fi
to setup polyglossia in like in your MWE.
Alternatively, forget all that and use babel.
Using polyglossia & xelatex with the moderncv class leads to unexpected output. I'm using TeX Live under MacOs Catilina 10.15.4.
Is there a way to solve this?
mwe.pdf