%% %% Copyright (c) 2018-2019 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}[2019/05/14 v2.4.4 Resume Class] \LoadClass{article} %% %% Class options %% \DeclareOption{monochrome}{\def\@monochrome{true}} \DeclareOption{zh}{\def\@zh{true}} \ProcessOptions\relax %% %% Packages %% \RequirePackage[% a4paper,% margin=1.5cm,% includefoot, ]{geometry} \RequirePackage{xparse} \RequirePackage{etoolbox} \RequirePackage{fontspec} \RequirePackage{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[normalem]{ulem} \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{} \ifdef{\@tagline}{| \@tagline}{}% }{% Resume | \@firstname{} \@lastname{} \ifdef{\@tagline}{| \@tagline}{}% }% },% pdfkeywords={\ifdef{\@keywords}{\@keywords}{}},% }% } \RequirePackage{hyperref} %% %% General settings %% % Fonts \defaultfontfeatures{Mapping=tex-text} \setmainfont{IBM Plex Serif} \setmonofont{IBM Plex Mono} % Chinese setup \ifdef{\@zh}{ \xeCJKsetup{PunctStyle=kaiming} \setCJKmainfont{Source Han Serif SC} }{} % Font Awesome icon aliases \newcommand*{\birthdaySymbol}{\faBirthdayCake} \newcommand*{\degreeSymbol}{\faGraduationCap} \newcommand*{\githubSymbol}{\faGithub} \newcommand*{\homeSymbol}{\faHome} \newcommand*{\infoSymbol}{\faInfoCircle} \newcommand*{\mailSymbol}{\faAt} \newcommand*{\mobileSymbol}{\faPhone} % \faMobilePhone is too narrow \newcommand*{\linkedinSymbol}{\faLinkedin} \newcommand*{\locationSymbol}{\faMapMarkerAlt} \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{gray}{\footnotesize\@fileinfo}\hfil}% \def\@evenfoot{\textcolor{gray}{\footnotesize\@fileinfo}\hfil}% } \AtEndDocument{\thispagestyle{lastpage}} % No paragraph indentation \setlength{\parindent}{0em} % Line spacing \ifdef{\@zh}{ \linespread{1.25} }{ \linespread{1.15} } % Setup resume sections \titleformat{\section}{\Large\raggedright}{}{0.2em}{}[\titlerule] \titlespacing{\section}{0em}{1ex}{1ex} % % Configure list via 'enumitem' \setlist[itemize,1]{label=\faAngleRight, nosep, leftmargin=2em} \setlist[description,1]{style=sameline} % Width of the left column for date ranges \newlength{\leftcolwidth} \newlength{\rightcolwidth} \ifdef{\@zh}{% \setlength{\leftcolwidth}{6em} }{ \setlength{\leftcolwidth}{8.1em} } \setlength{\rightcolwidth}{\dimexpr \textwidth - \leftcolwidth - 4\tabcolsep} %% %% Generic commands %% \newcommand*{\creativecommons}[2]{% \href{http://creativecommons.org/licenses/#1/#2/}% {\faCreativeCommons{} \uppercase{#1} #2}% } \newcommand*{\githublink}[2]{% \href{http://github.com/#1/#2}% {\githubSymbol{} #1/#2}% } \newcommand*{\link}[2]{\textcolor{linkcolor}{\href{#1}{#2}}} \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{