-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with polyglossia #94
Comments
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 % 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. |
Include hook to input a file cvloadbeforehyperref.tex before hyperref if the file exists and lua or xelatex ist used. This is mainly done to allow users to use and configure the polyglossia package which needs to be loaded before hyperref. Explain this in the new user guide. Of course other packages that conflict with hyperref could be loaded in this way aswell.
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
The text was updated successfully, but these errors were encountered: