A repository holding my CV.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
4.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. \ProvidesPackage{simplecv}
  2. % Packages
  3. \usepackage[cm]{fullpage} % Margins
  4. \usepackage[hidelinks]{hyperref} % Hyperlinks
  5. \usepackage{titlesec} % Title formatting
  6. \usepackage{subfiles} % File importing
  7. \usepackage{multicol} % Multiple columns
  8. \usepackage[usenames,dvipsnames]{xcolor} % Coloring
  9. \usepackage{enumitem} % List customization
  10. \usepackage{lastpage} % Page numbering
  11. \usepackage{fancyhdr} % Footers
  12. \usepackage[russian,english]{babel} % Language styles
  13. \usepackage{graphicx} % Importing graphics
  14. \usepackage[export]{adjustbox} % Aligning margins
  15. \usepackage{ifthen} % Conditionals
  16. % % Chinese
  17. % \usepackage{xeCJK}
  18. % \setCJKmainfont{BabelStone Han}
  19. % % Cyrillic/Russian
  20. % \usepackage{hyphenat}
  21. % \babelfont{rm}{Droid Sans}
  22. % Styling
  23. \pagestyle{fancy}
  24. \fancyhf{}
  25. \renewcommand{\headrulewidth}{0pt}
  26. \renewcommand{\footrulewidth}{0pt}
  27. \urlstyle{same}
  28. \raggedbottom
  29. \raggedright
  30. \setlength{\tabcolsep}{0in}
  31. % Quotes
  32. \usepackage[autostyle,english=american]{csquotes}
  33. \MakeOuterQuote{"}
  34. % Hyperlinks
  35. % \newcommand{\link}[2]{\href{#1}{\underline{\smash{#2}}}}
  36. \newcommand{\link}[2]{\href{#1}{#2}}
  37. % Define colors
  38. \definecolor{color-text}{gray}{0.10} % light black
  39. \definecolor{color-detail}{gray}{0.40} % dark gray
  40. \colorlet{color-title}{\theme} % black
  41. % Set text color
  42. \makeatletter
  43. \newcommand{\globalcolor}[1]{\color{#1}\global\let\default@color\current@color}
  44. \makeatother
  45. \AtBeginDocument{\globalcolor{color-text}}
  46. % Shorthand
  47. \newcommand{\github}[1]{\href{https://github.com/#1/}{github.com/#1}}
  48. \newcommand{\email}[1]{\href{mailto:#1}{#1}}
  49. \newcommand{\website}[1]{\href{https://#1/}{#1}}
  50. \newcommand{\linkedin}[1]{\href{https://www.linkedin.com/in/#1/}{#1}}
  51. % Dummy environment
  52. \newenvironment*{dummyenv}{}{}
  53. % Inline heading
  54. \newcommand{\headinginline}[2]{
  55. \begin{minipage}[t]{0.60\textwidth}
  56. \vspace*{\fill}
  57. \Huge \textcolor{color-title}{#1}
  58. \end{minipage}
  59. \begin{minipage}[t]{0.35\textwidth}
  60. \begin{flushright}
  61. #2
  62. \end{flushright}
  63. \end{minipage}
  64. }
  65. % Photo heading
  66. \newcommand{\headingphoto}[3]{
  67. \begin{minipage}[t]{0.60\textwidth}
  68. \begin{dummyenv}
  69. \vspace*{\fill}
  70. \Huge \textcolor{color-title}{#1}
  71. \end{dummyenv}
  72. \vspace{5mm}\\
  73. #2
  74. \end{minipage}
  75. \begin{minipage}[t]{0.35\textwidth}
  76. \begin{flushright}
  77. \includegraphics[width=.5\linewidth,valign=t]{#3}
  78. \end{flushright}
  79. \end{minipage}
  80. }
  81. % Two-columns
  82. \newcommand{\sidebyside}[2]{
  83. \begin{multicols}{2}
  84. #1 \columnbreak
  85. #2 \end{multicols}
  86. }
  87. % Section titles
  88. \titleformat{\section}{
  89. \scshape\raggedright\Large\color{color-title}}{}{0em}{}[\color{color-title}\titlerule
  90. \vspace{-\smallskipamount}]
  91. % Footer
  92. % \fancyfoot[R]{Page \thepage \hspace{1pt} of \pageref{LastPage}}
  93. % Lists
  94. \newcommand{\outerlist}[1]{
  95. \begin{itemize}[leftmargin=*] #1 \end{itemize}}
  96. \newcommand{\denseouterlist}[1]{
  97. \begin{itemize}[leftmargin=*,itemsep=0pt] #1 \end{itemize}}
  98. \newcommand{\innerlist}[1]{
  99. \begin{itemize}[topsep=0pt] \itemsep0em #1 \end{itemize}}
  100. \newcommand{\orderedouterlist}[1]{
  101. \begin{enumerate}[leftmargin=*] #1 \end{enumerate}}
  102. % List items
  103. \newcommand{\entry}[1]{\item\small{#1}}
  104. \newcommand{\entryextra}[1]{\textcolor{color-detail}{\entry{#1}}}
  105. \newcommand{\entrylabeled}[2][]{\item[#1]\small{#2}}
  106. \newcommand{\entrymid}[4][]{
  107. \item[#1] \small{#2} \hfill \small{#3}
  108. \vspace{-\smallskipamount}
  109. \ifthenelse{\equal{#4}{}}{}{\item[]\small{\textit{#4}}}
  110. }
  111. \newcommand{\entrybig}[5][]{\item[#1]
  112. \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
  113. #2 & #3 \\ {\small#4} & {\small #5} \\ \end{tabular*}}
  114. % Fill year
  115. \newcommand{\fillyear}[1]{\phantom{#1}}
  116. % Make author name bold: https://tex.stackexchange.com/a/327046
  117. \newcommand*{\boldname}[3]{%
  118. \def\lastname{#1}%
  119. \def\firstname{#2}%
  120. \def\firstinit{#3}}
  121. \boldname{}{}{}
  122. \renewcommand{\mkbibnamegiven}[1]{%
  123. \ifboolexpr{ ( test {\ifdefequal{\firstname}{\namepartgiven}} or test {\ifdefequal{\firstinit}{\namepartgiven}} ) and test {\ifdefequal{\lastname}{\namepartfamily}} }
  124. {\mkbibbold{#1}}{#1}%
  125. }
  126. \renewcommand{\mkbibnamefamily}[1]{%
  127. \ifboolexpr{ ( test {\ifdefequal{\firstname}{\namepartgiven}} or test {\ifdefequal{\firstinit}{\namepartgiven}} ) and test {\ifdefequal{\lastname}{\namepartfamily}} }
  128. {\mkbibbold{#1}}{#1}%
  129. }