diff --git a/moderncv.cls b/moderncv.cls index 3d1ac22..fefc7ba 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -83,7 +83,7 @@ % color \RequirePackage[table]{xcolor} -% font loading +% tex compiler checking for symbol loading \RequirePackage{iftex} \newif\ifxetexorluatex \ifxetex @@ -96,21 +96,6 @@ \fi \fi -% for luatex and xetex, do not use inputenc and fontenc -% see https://tex.stackexchange.com/a/496643 -\ifxetexorluatex - \RequirePackage{fontspec} - \defaultfontfeatures{Ligatures=TeX} - \RequirePackage{unicode-math} - \setmainfont{Latin Modern Roman} - \setsansfont{Latin Modern Sans} - \setmonofont{Latin Modern Mono} - \setmathfont{Latin Modern Math} -\else - \RequirePackage[utf8]{inputenc} - \RequirePackage[T1]{fontenc} - \RequirePackage{lmodern} -\fi % hyper links (hyperref is loaded at the end of the preamble to pass options required by loaded packages such as CJK) \newcommand*\pdfpagemode{UseNone}% do not show thumbnails or bookmarks on opening (on supporting browsers); set \pdfpagemode to "UseOutlines" to show bookmarks diff --git a/template.tex b/template.tex index 1083fc8..34abd84 100644 --- a/template.tex +++ b/template.tex @@ -20,10 +20,27 @@ % adjust the page margins \usepackage[scale=0.75]{geometry} -\setlength{\footskip}{122.40004pt} % depending on the amount of information in the footer, you need to change this value. comment this line out and set it to the size given in the warning +\setlength{\footskip}{136.00005pt} % depending on the amount of information in the footer, you need to change this value. comment this line out and set it to the size given in the warning %\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates %\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... +% font loading +% for luatex and xetex, do not use inputenc and fontenc +% see https://tex.stackexchange.com/a/496643 +\ifxetexorluatex + \usepackage{fontspec} + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX} + \setmainfont{Latin Modern Roman} + \setsansfont{Latin Modern Sans} + \setmonofont{Latin Modern Mono} + \setmathfont{Latin Modern Math} +\else + \usepackage[utf8]{inputenc} + \usepackage[T1]{fontenc} + \usepackage{lmodern} +\fi + % personal data \name{John}{Doe} \title{Résumé title} % optional, remove / comment the line if not wanted