%% %% Copyright (c) 2018 Weitian LI %% Copyright (c) 2016 Christophe Roger %% The LaTeX Project Public License (LPPL) Version 1.3c %% %% Resume LaTeX template. %% Based on %% YACC: Another Awesome CV by Christophe Roger %% https://github.com/darwiin/yaac-another-awesome-cv %% which is further based on %% Plasmati Graduate CV by Alessandro Plasmati %% https://www.latextemplates.com/template/plasmati-graduate-cv %% \ProvidesClass{resume}[2018/04/17 v2.1.0 Resume Class] \LoadClass{article} %% %% Class options %% \DeclareOption{monochrome}{\def\@monochrome{true}} \DeclareOption{zh}{\def\@zh{true}} \ProcessOptions %% %% Packages %% \RequirePackage[% a4paper,% margin=1.5cm,% includefoot, ]{geometry} \RequirePackage{xparse} \RequirePackage{etoolbox} \RequirePackage{fontspec} \RequirePackage[regular]{fontawesome5} \RequirePackage{parskip} % auto adjust parskip and items skip \RequirePackage{titlesec} \RequirePackage{enumitem} \RequirePackage{setspace} \RequirePackage{array} \RequirePackage{multirow} \RequirePackage{makecell} % multirowcell \RequirePackage{longtable} \RequirePackage[usenames,dvipsnames]{xcolor} \RequirePackage{tikz} \RequirePackage[skins]{tcolorbox} % required by tikz to make the header \RequirePackage{csquotes} \RequirePackage{microtype} \ifdef{\@zh}{ \RequirePackage{xeCJK} }{} % % Hyperref % % Delay the execution of \hypersetup at \begin{document}. % NOTE: Should be set before hyperref uses it. \AtBeginDocument{% \hypersetup{% pdfborder={0 0 0},% No border around links pdfauthor={% \ifdef{\@zh}{% \@lastname{} \@firstname% }{% \@firstname{} \@lastname% }% },% pdftitle={% \ifdef{\@zh}{% 简历 | \@lastname{} \@firstname{} | \@tagline% }{% Resume | \@firstname{} \@lastname{} | \@tagline% }% },% pdfsubject={\@tagline},% pdfkeywords={\@keywords},% }% } \RequirePackage{hyperref} %% %% General settings %% % Fonts \defaultfontfeatures{Mapping=tex-text} \setmainfont{TeX Gyre Pagella} \setsansfont{Roboto} \setmonofont{M+ 1mn} % Chinese setup \ifdef{\@zh}{ \xeCJKsetup{PunctStyle=hangmobanjiao} \setCJKmainfont{Noto Serif CJK SC}[BoldFont=Noto Sans CJK SC] \setCJKsansfont{Noto Sans CJK SC} \setCJKmonofont{Noto Sans Mono CJK SC} }{} % Font Awesome icon aliases \newcommand*{\birthdaySymbol}{\faBirthdayCake} \newcommand*{\degreeSymbol}{\faGraduationCap} \newcommand*{\githubSymbol}{\faGithub} \newcommand*{\homeSymbol}{\faHome} \newcommand*{\infoSymbol}{\faInfoCircle} \newcommand*{\mailSymbol}{\faEnvelope} \newcommand*{\mobileSymbol}{\faPhone} % \faMobilePhone is too narrow \newcommand*{\linkedinSymbol}{\faLinkedin} \newcommand*{\locationSymbol}{\faMapMarker} \newcommand*{\phoneSymbol}{\faPhone} \newcommand*{\universitySymbol}{\faUniversity} % Color setup \ifdef{\@monochrome}% {\definecolor{basecolor}{HTML}{000000}}% {\definecolor{basecolor}{HTML}{000066}} % blue % \definecolor{darkGrey}{HTML}{989898} % \colorlet{linkcolor}{basecolor} \colorlet{accentcolor}{linkcolor!90} \colorlet{symbolcolor}{linkcolor!85} % Date format: yyyy.mm.dd \newcommand*{\twodigits}[1]{\ifnum#1<10 0\fi\the#1} \renewcommand*{\today}{% \leavevmode\hbox{\the\year.\twodigits\month.\twodigits\day} } % Non-numbered pages \pagestyle{empty} % Last-page style \def\ps@lastpage{% \def\@oddfoot{\textcolor{lightgray}{\footnotesize\@fileinfo}\hfil}% \def\@evenfoot{\textcolor{lightgray}{\footnotesize\@fileinfo}\hfil}% } \AtEndDocument{\thispagestyle{lastpage}} % No paragraph indentation \setlength{\parindent}{0em} % Line spacing \ifdef{\@zh}{ \linespread{1.15} }{ \linespread{1.05} } % Setup resume sections \titleformat{\section}{\Large\raggedright}{}{0.2em}{}[\titlerule] \titlespacing{\section}{0em}{0.1em}{0em} % % Configure list via 'enumitem' \setlist[itemize,1]{label=\faAngleRight, nosep, leftmargin=2em} \setlist[description,1]{style=sameline} % New length definition \newlength{\leftcolwidth} \newlength{\rightcolwidth} \ifdef{\@zh}{% \setlength{\leftcolwidth}{6em} }{ \setlength{\leftcolwidth}{7.5em} } \setlength{\rightcolwidth}{\dimexpr \textwidth - \leftcolwidth - 4\tabcolsep} %% %% Generic commands %% \newcommand*{\creativecommons}[2]{% \href{http://creativecommons.org/licenses/#1/#2/}% {\faCreativeCommons{} \uppercase{#1} #2}% } \newcommand*{\link}[2]{\textcolor{linkcolor}{\href{#1}{#2}}} \newcommand*{\important}[1]{\textbf{#1}} % Render an icon \newcommand*{\icon}[1]{% \makebox[1em][c]{\textcolor{symbolcolor}{#1}}% \hspace{0.2em}% } % Test whether the command argument is given and is not empty % Credit: https://tex.stackexchange.com/a/63233 \ExplSyntaxOn \DeclareExpandableDocumentCommand{\IfNoValueOrEmptyTF}{mmm}{% \IfNoValueTF{#1}{#2}{% \tl_if_empty:nTF {#1} {#2} {#3} } } \ExplSyntaxOff %% %% Tags %% % Create a tag: \tag{