mirror of
https://github.com/moderncv/moderncv.git
synced 2026-02-06 10:05:19 +01:00
Put font loading in template
Closes https://github.com/moderncv/moderncv/issues/73 Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
This commit is contained in:
parent
95b301f777
commit
29bbdd62fe
2 changed files with 18 additions and 16 deletions
17
moderncv.cls
17
moderncv.cls
|
|
@ -83,7 +83,7 @@
|
||||||
% color
|
% color
|
||||||
\RequirePackage[table]{xcolor}
|
\RequirePackage[table]{xcolor}
|
||||||
|
|
||||||
% font loading
|
% tex compiler checking for symbol loading
|
||||||
\RequirePackage{iftex}
|
\RequirePackage{iftex}
|
||||||
\newif\ifxetexorluatex
|
\newif\ifxetexorluatex
|
||||||
\ifxetex
|
\ifxetex
|
||||||
|
|
@ -96,21 +96,6 @@
|
||||||
\fi
|
\fi
|
||||||
\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)
|
% 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
|
\newcommand*\pdfpagemode{UseNone}% do not show thumbnails or bookmarks on opening (on supporting browsers); set \pdfpagemode to "UseOutlines" to show bookmarks
|
||||||
|
|
|
||||||
17
template.tex
17
template.tex
|
|
@ -24,6 +24,23 @@
|
||||||
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
|
%\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...
|
%\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
|
% personal data
|
||||||
\name{John}{Doe}
|
\name{John}{Doe}
|
||||||
\title{Résumé title} % optional, remove / comment the line if not wanted
|
\title{Résumé title} % optional, remove / comment the line if not wanted
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue