%% %% Copyright (c) 2018-2024 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}[2024/12/06 v2.6.0 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[dvipsnames]{xcolor} \RequirePackage{tikz} \RequirePackage[skins]{tcolorbox} % required by tikz to make the header \RequirePackage{csquotes} \RequirePackage{relsize} % relatively scale the icons \RequirePackage{keyval} % key=value style parameters \ifdef{\@zh}{ \RequirePackage{xeCJK} }{} \RequirePackage{microtype} % % 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={\@name},% pdftitle={% \ifdef{\@zh}{简历 | \@name}{Resume | \@name}% \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}{ \setCJKmainfont{Noto Serif CJK SC} % Redefine '\emph' to bold style % Credit: https://tex.stackexchange.com/a/227644 \let\emph\relax % there's no \RedeclareTextFontCommand \DeclareTextFontCommand{\emph}{\bfseries} }{} % 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}{\faMapMarker*} \newcommand*{\phoneSymbol}{\faPhone} \newcommand*{\universitySymbol}{\faUniversity} % Color setup \ifdef{\@monochrome}{ \definecolor{basecolor}{HTML}{000000} % black }{ \definecolor{basecolor}{HTML}{000066} % blue } \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{https://creativecommons.org/licenses/#1/#2/}% {\faCreativeCommons{} \uppercase{#1} #2}% } \newcommand*{\githublink}[2]{% \href{https://github.com/#1/#2}{\githubSymbol{} #1/#2}% } \newcommand*{\link}[2]{\textcolor{linkcolor}{\href{#1}{#2}}} % The scale step for icons. % A positive step to enlarge icons, and a negative step to reduce them. \def\@iconscale{1} \newcommand*{\iconscale}[1]{\def\@iconscale{#1}} % Icon: \icon[size]{\faICON} \NewDocumentCommand{\icon}{om}{ {\IfValueTF{#1}{#1}{\relsize{\@iconscale}}% \makebox[1em][c]{\textcolor{symbolcolor}{#2}}}% \hspace{0.2em}\strut% } % 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{