Advertisement
Guest User

Untitled

a guest
Mar 12th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.32 KB | None | 0 0
  1. %% Start of file `awesome-cv.cls'.
  2. % Awesome CV Class File
  3. %
  4. % This class has been downloaded from:
  5. % https://github.com/posquit0/Awesome-CV
  6. %
  7. % Author:
  8. % Claud D. Park <posquit0.bj@gmail.com>
  9. % http://www.posquit0.com
  10. %
  11. % Notes:
  12. % 1) This class file defines the structure and layout of the template file (cv.tex, resume.tex).
  13. % 2) It has been written in such a way that under most circumstances you
  14. % should not need to edit it.
  15. %
  16. % Class license:
  17. % LPPL v1.3c (http://www.latex-project.org/lppl)
  18. %
  19.  
  20.  
  21. %-------------------------------------------------------------------------------
  22. % Identification
  23. %-------------------------------------------------------------------------------
  24. \ProvidesClass{awesome-cv}[2015/12/14 v1.3 Awesome Curriculum Vitae Class]
  25. \NeedsTeXFormat{LaTeX2e}
  26.  
  27.  
  28. %-------------------------------------------------------------------------------
  29. % Class options
  30. %
  31. % (need to be done before the external package loading, for example because
  32. % we need \paperwidth, \paperheight and \@ptsize to be defined before loading
  33. % geometry and fancyhdr)
  34. %-------------------------------------------------------------------------------
  35. % Options for draft or final
  36. \DeclareOption{draft}{\setlength\overfullrule{5pt}}
  37. \DeclareOption{final}{\setlength\overfullrule{0pt}}
  38. % Inherit options of article
  39. \DeclareOption*{
  40. \PassOptionsToClass{\CurrentOption}{article}
  41. }
  42. \ProcessOptions\relax
  43. \LoadClass{article}
  44.  
  45.  
  46. %-------------------------------------------------------------------------------
  47. % 3rd party packages
  48. %-------------------------------------------------------------------------------
  49. % Needed to make fixed length table
  50. \RequirePackage{array}
  51. % Needed to handle list environment
  52. \RequirePackage{enumitem}
  53. % Needed to handle text alignment
  54. \RequirePackage{ragged2e}
  55. % Needed to configure page layout
  56. \RequirePackage{geometry}
  57. % Needed to make header & footer effeciently
  58. \RequirePackage{fancyhdr}
  59. % Needed to manage colors
  60. \RequirePackage{xcolor}
  61. % Needed to use \ifxetex-\else-\fi statement
  62. \RequirePackage{ifxetex}
  63. % Needed to use \if-\then-\else statement
  64. \RequirePackage{xifthen}
  65. % Needed to use a toolbox of programming tools
  66. \RequirePackage{etoolbox}
  67. % Needed to change line spacing in specific environment
  68. \RequirePackage{setspace}
  69. % Needed to manage fonts
  70. \ifxetex
  71. \RequirePackage[quiet]{fontspec}
  72. % To support LaTeX quoting style
  73. \defaultfontfeatures{Ligatures=TeX}
  74. \else
  75. \RequirePackage[T1]{fontenc}
  76. % Replace by the encoding you are using
  77. \RequirePackage[utf8]{inputenc}
  78. \fi
  79. % Needed to manage math fonts
  80. \RequirePackage[math-style=TeX,vargreek-shape=unicode]{unicode-math}
  81. % Needed to use icons from font-awesome
  82. % (https://github.com/posquit0/latex-fontawesome)
  83. \RequirePackage{fontawesome}
  84. % Needed to deal a paragraphs
  85. \RequirePackage{parskip}
  86. % Needed to deal hyperlink
  87. \RequirePackage{hyperref}
  88. \hypersetup{
  89. pdftitle={},
  90. pdfauthor={},
  91. pdfsubject={},
  92. pdfkeywords={},
  93. colorlinks=false,
  94. allbordercolors=white
  95. }
  96.  
  97.  
  98. %-------------------------------------------------------------------------------
  99. % Configuration for directory locations
  100. %-------------------------------------------------------------------------------
  101. % Configure a directory location for fonts(default: 'fonts/')
  102. \newcommand*{\fontdir}[1][fonts/]{\def\@fontdir{#1}}
  103. \fontdir
  104.  
  105.  
  106. %-------------------------------------------------------------------------------
  107. % Configuration for layout
  108. %-------------------------------------------------------------------------------
  109. %% Page Layout
  110. % Configure page margins with geometry
  111. \geometry{left=2.0cm, top=2.0cm, right=2.0cm, bottom=2.0cm, footskip=.5cm}
  112.  
  113. %% Header & Footer
  114. % Set offset to each header and offset
  115. \fancyhfoffset{0em}
  116. % Remove head rule
  117. \renewcommand{\headrulewidth}{0pt}
  118. % Clear all header & footer fields
  119. \fancyhf{}
  120. % Enable if you want to make header or footer using fancyhdr
  121. \pagestyle{fancy}
  122.  
  123.  
  124. %-------------------------------------------------------------------------------
  125. % Configuration for colors
  126. %-------------------------------------------------------------------------------
  127. % Gray-scale colors
  128. \definecolor{white}{HTML}{FFFFFF}
  129. \definecolor{black}{HTML}{000000}
  130. \definecolor{darkgray}{HTML}{333333}
  131. \definecolor{gray}{HTML}{5D5D5D}
  132. \definecolor{lightgray}{HTML}{999999}
  133. % Basic colors
  134. \definecolor{green}{HTML}{C2E15F}
  135. \definecolor{orange}{HTML}{FDA333}
  136. \definecolor{purple}{HTML}{D3A4F9}
  137. \definecolor{red}{HTML}{FB4485}
  138. \definecolor{blue}{HTML}{6CE0F1}
  139. % Text colors
  140. \definecolor{darktext}{HTML}{414141}
  141. \colorlet{text}{darkgray}
  142. \colorlet{graytext}{gray}
  143. \colorlet{lighttext}{lightgray}
  144. % Awesome colors
  145. \definecolor{awesome-emerald}{HTML}{00A388}
  146. \definecolor{awesome-skyblue}{HTML}{0395DE}
  147. \definecolor{awesome-red}{HTML}{DC3522}
  148. \definecolor{awesome-pink}{HTML}{EF4089}
  149. \definecolor{awesome-orange}{HTML}{FF6138}
  150. \definecolor{awesome-nephritis}{HTML}{27AE60}
  151. \definecolor{awesome-concrete}{HTML}{95A5A6}
  152. \definecolor{awesome-darknight}{HTML}{131A28}
  153. \colorlet{awesome}{awesome-red}
  154.  
  155. % Awesome section color
  156. \newcounter{colorCounter}
  157. \def\@sectioncolor#1#2#3{%
  158. {%
  159. \color{%
  160. \ifcase\value{colorCounter}%
  161. awesome\or%
  162. awesome\or%
  163. awesome\or%
  164. awesome\or%
  165. awesome\else%
  166. awesome\fi%
  167. } #1#2#3%
  168. }%
  169. \stepcounter{colorCounter}%
  170. }
  171.  
  172.  
  173. %-------------------------------------------------------------------------------
  174. % Configuration for fonts
  175. %-------------------------------------------------------------------------------
  176. % Set font for header (default is Roboto)
  177. \newfontfamily\headerfont[
  178. Path=\@fontdir,
  179. UprightFont=*-Regular,
  180. ItalicFont=*-Italic,
  181. BoldFont=*-Bold,
  182. BoldItalicFont=*-BoldItalic,
  183. ]{Roboto}
  184.  
  185. \newfontfamily\headerfontlight[
  186. Path=\@fontdir,
  187. UprightFont=*-Thin,
  188. ItalicFont=*-ThinItalic,
  189. BoldFont=*-Medium,
  190. BoldItalicFont=*-MediumItalic,
  191. ]{Roboto}
  192.  
  193. % Set font for footer (default is Source Sans Pro)
  194. \newfontfamily\footerfont[
  195. Path=\@fontdir,
  196. UprightFont=*-Regular,
  197. ItalicFont=*-It,
  198. BoldFont=*-Bold
  199. ]{SourceSansPro}
  200.  
  201. % Set font for body (default is Source Sans Pro)
  202. \newfontfamily\bodyfont[
  203. Path=\@fontdir,
  204. UprightFont=*-Regular,
  205. ItalicFont=*-It,
  206. BoldFont=*-Bold,
  207. BoldItalicFont=*-BoldIt
  208. ]{SourceSansPro}
  209.  
  210. \newfontfamily\bodyfontlight[
  211. Path=\@fontdir,
  212. UprightFont=*-Light,
  213. ItalicFont=*-LightIt,
  214. BoldFont=*-Semibold,
  215. BoldItalicFont=*-SemiboldIt
  216. ]{SourceSansPro}
  217.  
  218.  
  219. %-------------------------------------------------------------------------------
  220. % Configuration for styles
  221. %-------------------------------------------------------------------------------
  222. % Configure styles for each CV elements
  223. % For fundamental structures
  224. \newcommand*{\headerfirstnamestyle}[1]{{\fontsize{32pt}{1em}\headerfontlight\color{graytext} #1}}
  225. \newcommand*{\headerlastnamestyle}[1]{{\fontsize{32pt}{1em}\headerfont\bfseries\color{text} #1}}
  226. \newcommand*{\headerpositionstyle}[1]{{\fontsize{7.6pt}{1em}\bodyfont\scshape\color{awesome} #1}}
  227. \newcommand*{\headeraddressstyle}[1]{{\fontsize{8pt}{1em}\headerfont\itshape\color{lighttext} #1}}
  228. \newcommand*{\headersocialstyle}[1]{{\fontsize{6.8pt}{1em}\headerfont\color{text} #1}}
  229. \newcommand*{\headerquotestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\itshape\color{darktext} #1}}
  230. \newcommand*{\footerstyle}[1]{{\fontsize{8pt}{1em}\footerfont\scshape\color{lighttext} #1}}
  231. \newcommand*{\sectionstyle}[1]{{\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}\@sectioncolor #1}}
  232. \newcommand*{\subsectionstyle}[1]{{\fontsize{12pt}{1em}\bodyfont\scshape\textcolor{text}{#1}}}
  233.  
  234. % For elements of entry
  235. \newcommand*{\entrytitlestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
  236. \newcommand*{\entrypositionstyle}[1]{{\fontsize{8pt}{1em}\bodyfont\scshape\color{graytext} #1}}
  237. \newcommand*{\entrydatestyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
  238. \newcommand*{\entrylocationstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
  239. \newcommand*{\descriptionstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\upshape\color{text} #1}}
  240.  
  241. % For elements of subentry
  242. \newcommand*{\subentrytitlestyle}[1]{{\fontsize{8pt}{1em}\bodyfont\mdseries\color{graytext} #1}}
  243. \newcommand*{\subentrypositionstyle}[1]{{\fontsize{7pt}{1em}\bodyfont\scshape\color{graytext} #1}}
  244. \newcommand*{\subentrydatestyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
  245. \newcommand*{\subentrylocationstyle}[1]{{\fontsize{7pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
  246. \newcommand*{\subdescriptionstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
  247.  
  248. % For elements of honor
  249. \newcommand*{\honortitlestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
  250. \newcommand*{\honorpositionstyle}[1]{{\fontsize{9pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
  251. \newcommand*{\honordatestyle}[1]{{\fontsize{9pt}{1em}\bodyfont\color{graytext} #1}}
  252. \newcommand*{\honorlocationstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\slshape\color{awesome} #1}}
  253.  
  254. % For elements of skill
  255. \newcommand*{\skilltypestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
  256. \newcommand*{\skillsetstyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\color{text} #1}}
  257.  
  258. % For elements of the cover letter
  259. \newcommand*{\paragraphstyle}[1]{{\fontsize{14pt}{1em}\bodyfont\bfseries\color{text}\@sectioncolor #1}}
  260. \newcommand*{\recipientaddressstyle}[1]{{\fontsize{9pt}{1em}\bodyfont\scshape\color{graytext} #1}}
  261. \newcommand*{\recipienttitlestyle}[1]{{\fontsize{11pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
  262. \newcommand*{\lettertitlestyle}[1]{{\fontsize{10pt}{1em}\bodyfontlight\bfseries\color{darktext} \underline{#1}}}
  263. \newcommand*{\letterdatestyle}[1]{{\fontsize{9pt}{1em}\bodyfontlight\slshape\color{graytext} #1}}
  264. \newcommand*{\lettertextstyle}{\fontsize{10pt}{1.4em}\bodyfontlight\upshape\color{graytext}}
  265. \newcommand*{\letternamestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
  266. \newcommand*{\letterenclosurestyle}[1]{{\fontsize{10pt}{1em}\bodyfontlight\slshape\color{lighttext} #1}}
  267.  
  268.  
  269. %-------------------------------------------------------------------------------
  270. % Commands for personal information
  271. %-------------------------------------------------------------------------------
  272. % Define writer's name
  273. % Usage: \name{<firstname>}{<lastname>}
  274. % Usage: \firstname{<firstname>}
  275. % Usage: \lastname{<lastname>}
  276. % Usage: \familyname{<familyname>}
  277. \newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}
  278. \newcommand*{\firstname}[1]{\def\@firstname{#1}}
  279. \newcommand*{\lastname}[1]{\def\@lastname{#1}}
  280. \newcommand*{\familyname}[1]{\def\@lastname{#1}}
  281. \def\@familyname{\@lastname}
  282.  
  283. % Define writer's address
  284. % Usage: \address{<address>}
  285. \newcommand*{\address}[1]{\def\@address{#1}}
  286.  
  287. % Define writer's position
  288. % Usage: \name{<position>}
  289. \newcommand*{\position}[1]{\def\@position{#1}}
  290.  
  291. % Defines writer's mobile (optional)
  292. % Usage: \mobile{<mobile number>}
  293. \newcommand*{\mobile}[1]{\def\@mobile{#1}}
  294.  
  295. % Defines writer's email (optional)
  296. % Usage: \email{<email adress>}
  297. \newcommand*{\email}[1]{\def\@email{#1}}
  298.  
  299. % Defines writer's homepage (optional)
  300. % Usage: \homepage{<url>}
  301. \newcommand*{\homepage}[1]{\def\@homepage{#1}}
  302.  
  303. % Defines writer's github (optional)
  304. % Usage: \github{<github-nick>}
  305. \newcommand*{\github}[1]{\def\@github{#1}}
  306.  
  307. % Defines writer's linked-in (optional)
  308. % Usage: \linkedin{<linked-in-nick>}
  309. \newcommand*{\linkedin}[1]{\def\@linkedin{#1}}
  310.  
  311. % Defines writer's stackoverflow profile (optional)
  312. % Usage: \stackoverflow{<so userid>}{<so username>}
  313. % e.g.https://stackoverflow.com/users/123456/sam-smith
  314. % would be \stackoverflow{123456}{sam-smith}
  315. \newcommand*{\stackoverflow}[2]{\def\@stackoverflowid{#1}\def\@stackoverflowname{#2}}
  316.  
  317. % Defines writer's skype (optional)
  318. % Usage: \skype{<skype account>}
  319. \newcommand*{\skype}[1]{\def\@skype{#1}}
  320.  
  321. % Defines writer's twitter (optional)
  322. % Usage: \twitter{<twitter handle>}
  323. \newcommand*{\twitter}[1]{\def\@twitter{#1}}
  324.  
  325. % Defines writer's quote (optional)
  326. % Usage: \quote{<quote>}
  327. \renewcommand*{\quote}[1]{\def\@quote{#1}}
  328.  
  329. % Defines recipient's information (cover letter only)
  330. % Usage: \recipient{<recipient name>}{<recipient address>}
  331. % Usage: \recipientname{<recipient name>}
  332. % Usage: \recipientaddress{<recipient address>}
  333. \newcommand*{\recipient}[2]{\def\@recipientname{#1}\def\@recipientaddress{#2}}
  334. \newcommand*{\recipientname}[1]{\def\@recipientname{#1}}
  335. \newcommand*{\recipientaddress}[1]{\def\@recipientaddress{#1}}
  336.  
  337. % Defines the title for letter (cover letter only, optional)
  338. % Usage: \lettertitle{<title>}
  339. \newcommand*{\lettertitle}[1]{\def\@lettertitle{#1}}
  340.  
  341. % Defines the date for letter (cover letter only)
  342. % Usage: \letterdate{<date>}
  343. \newcommand*{\letterdate}[1]{\def\@letterdate{#1}}
  344.  
  345. % Defines a message of opening for letter (cover letter only)
  346. % Usage: \letteropening{<message>}
  347. \newcommand*{\letteropening}[1]{\def\@letteropening{#1}}
  348.  
  349. % Defines a message of closing for letter (cover letter only)
  350. % Usage: \letterclosing{<message>}
  351. \newcommand*{\letterclosing}[1]{\def\@letterclosing{#1}}
  352.  
  353. % Defines an enclosure for letter (cover letter only, optional)
  354. % Usage: \letterenclosure[<enclosure name>]{<enclosure>}
  355. \newcommand*{\letterenclname}[1][Enclosure]{\def\@letterenclname{#1}}
  356. \newcommand*{\letterenclosure}[2][]{
  357. % if an optional argument is provided, use it to redefine \enclname
  358. \ifthenelse{\equal{#1}{}}{}{\def\@letterenclname{#1}}
  359. \def\@letterenclosure{#2}
  360. }
  361.  
  362.  
  363. %-------------------------------------------------------------------------------
  364. % Commands for extra
  365. %-------------------------------------------------------------------------------
  366. % Define separator for social informations in header
  367. % Usage: \headersocialsep{<separator>}
  368. % Default: \quad\textbar\quad
  369. \newcommand*{\headersocialsep}[1][\quad\textbar\quad]{\def\@headersocialsep{#1}}
  370. \headersocialsep
  371.  
  372.  
  373. %-------------------------------------------------------------------------------
  374. % Commands for utilities
  375. %-------------------------------------------------------------------------------
  376. % Use to align an element of tabular table
  377. \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
  378. \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
  379. \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
  380.  
  381. % Use to draw horizontal line with specific tickness
  382. \def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
  383.  
  384. % Use to execute conditional statements by checking empty string
  385. \newcommand*{\ifempty}[3]{\ifthenelse{\isempty{#1}}{#2}{#3}}
  386.  
  387.  
  388. %-------------------------------------------------------------------------------
  389. % Commands for elements of CV structure
  390. %-------------------------------------------------------------------------------
  391. % Define a header for CV
  392. % Usage: \makecvheader
  393. \newcommand*{\makecvheader}{
  394. \begin{center}
  395. \headerfirstnamestyle{
  396. \@firstname
  397. } \headerlastnamestyle{
  398. \@lastname
  399. }
  400. \\
  401. \vspace{0.4mm}
  402. \ifthenelse{\isundefined{\@position}}{}{\headerpositionstyle{\@position\\}}
  403. \vspace{0.4mm}
  404. \ifthenelse{\isundefined{\@address}}{}{\headeraddressstyle{\@address\\}}
  405. \vspace{-0.5mm}
  406. \headersocialstyle{
  407. \newbool{isstart}
  408. \setbool{isstart}{true}
  409. \ifthenelse{\isundefined{\@mobile}}
  410. {}
  411. {
  412. \faMobile\ \@mobile
  413. \setbool{isstart}{false}
  414. }
  415. \ifthenelse{\isundefined{\@email}}
  416. {}
  417. {
  418. \ifbool{isstart}
  419. {
  420. \setbool{istart}{false}
  421. }
  422. {\@headersocialsep}
  423. \href{mailto:\@email}{\faEnvelope\ \@email}
  424. }
  425. \ifthenelse{\isundefined{\@homepage}}
  426. {}
  427. {
  428. \ifbool{isstart}
  429. {
  430. \setbool{istart}{false}
  431. }
  432. {\@headersocialsep}
  433. \href{http://\@homepage}{\faHome\ \@homepage}
  434. }
  435. \ifthenelse{\isundefined{\@github}}
  436. {}
  437. {
  438. \ifbool{isstart}
  439. {
  440. \setbool{istart}{false}
  441. }
  442. {\@headersocialsep}
  443. \href{https://github.com/\@github}{\faGithubSquare\ \@github}
  444. }
  445. \ifthenelse{\isundefined{\@stackoverflowid}}
  446. {}
  447. {
  448. \ifbool{isstart}
  449. {
  450. \setbool{istart}{false}
  451. }
  452. {\@headersocialsep}
  453. \href{https://stackoverflow.com/users/\@stackoverflowid}{\faStackOverflow\ \@stackoverflowname}
  454. }
  455. \ifthenelse{\isundefined{\@linkedin}}
  456. {}
  457. {
  458. \ifbool{isstart}
  459. {
  460. \setbool{istart}{false}
  461. }
  462. {\@headersocialsep}
  463. \href{https://www.linkedin.com/in/\@linkedin}{\faLinkedinSquare\ \@linkedin}
  464. }
  465. \ifthenelse{\isundefined{\@twitter}}
  466. {}
  467. {
  468. \ifbool{isstart}
  469. {
  470. \setbool{istart}{false}
  471. }
  472. {\@headersocialsep}
  473. \href{https://twitter.com/\@twitter}{\faTwitter\ \@twitter}
  474. }
  475. \ifthenelse{\isundefined{\@skype}}
  476. {}
  477. {
  478. \ifbool{isstart}
  479. {
  480. \setbool{istart}{false}
  481. }
  482. {\@headersocialsep}
  483. \faSkype\ \@skype
  484. }
  485. } \\
  486. \ifthenelse{\isundefined{\@quote}}
  487. {}
  488. {\vspace{6.0mm}\headerquotestyle{\@quote\\}\vspace{5.0mm}}
  489. \end{center}
  490. }
  491.  
  492. % Define a footer for CV
  493. % Usage: \makecvfooter{<left>}{<center>}{<right>}
  494. \newcommand*{\makecvfooter}[3]{
  495. \fancyfoot{}
  496. \fancyfoot[L]{
  497. \footerstyle{#1}
  498. }
  499. \fancyfoot[C]{
  500. \footerstyle{#2}
  501. }
  502. \fancyfoot[R]{
  503. \footerstyle{#3}
  504. }
  505. }
  506.  
  507. % Define a section for CV
  508. % Usage: \cvsection{<section-title>}
  509. \newcommand{\cvsection}[1]{
  510. \par\addvspace{-2ex}
  511. \phantomsection{}
  512. \sectionstyle{#1}
  513. \color{gray}\vhrulefill{0.9pt}
  514. \par\nobreak\addvspace{0.0ex}
  515. }
  516.  
  517. % Define a subsection for CV
  518. % Usage: \cvsubsection{<subsection-title>}
  519. \newcommand{\cvsubsection}[1]{
  520. \phantomsection{}
  521. \subsectionstyle{#1}
  522. }
  523.  
  524. % Define an environment for cventry
  525. \newenvironment{cventries}{
  526. \begin{center}
  527. }{
  528. \end{center}
  529. }
  530. % Define an entry of cv information
  531. % Usage: \cventry{<position>}{<title>}{<location>}{<date>}{<description>}
  532. \newcommand*{\cventry}[5]{
  533. \setlength\tabcolsep{0pt}
  534. \setlength{\extrarowheight}{0pt}
  535. \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{12.5cm} R{4.5cm}}
  536. \ifempty{#2#3}
  537. {\entrypositionstyle{#1} & \entrydatestyle{#4} \\}
  538. {\entrytitlestyle{#2} & \entrylocationstyle{#3} \\
  539. \entrypositionstyle{#1} & \entrydatestyle{#4} \\}
  540. \multicolumn{2}{L{17cm}}{\descriptionstyle{#5}} \\
  541. \end{tabular*}
  542. }
  543.  
  544. % Define an environment for cvsubentry
  545. \newenvironment{cvsubentries}{
  546. \begin{center}
  547. }{
  548. \end{center}
  549. }
  550. % Define a subentry of cv information
  551. % Usage: \cvsubentry{<position>}{<title>}{<date>}{<description>}
  552. \newcommand*{\cvsubentry}[4]{
  553. \setlength\tabcolsep{0pt}
  554. \setlength{\extrarowheight}{0pt}
  555. \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{12.5cm} R{4.5cm}}
  556. \setlength\leftskip{0.2cm}
  557. \subentrytitlestyle{#2} & \ifthenelse{\equal{#1}{}}
  558. {\subentrydatestyle{#3}}{}
  559. \ifthenelse{\equal{#1}{}}
  560. {}
  561. {\subentrypositionstyle{#1} & \subentrydatestyle{#3} \\}
  562. \ifthenelse{\equal{#4}{}}
  563. {}
  564. {\multicolumn{2}{L{17.0cm}}{\subdescriptionstyle{#4}} \\}
  565. \end{tabular*}
  566. }
  567.  
  568. % Define an environment for cvhonor
  569. \newenvironment{cvhonors}{
  570. \begin{center}
  571. \setlength\tabcolsep{0pt}
  572. \setlength{\extrarowheight}{0pt}
  573. \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} C{1.5cm} L{13.0cm} R{2.5cm}}
  574. }{
  575. \end{tabular*}
  576. \end{center}
  577. }
  578. % Define a line of cv information(honor, award or something else)
  579. % Usage: \cvhonor{<position>}{<title>}{<location>}{<date>}
  580. \newcommand*{\cvhonor}[4]{
  581. \honordatestyle{#4} & \honorpositionstyle{#1}, \honortitlestyle{#2} & \honorlocationstyle{#3}
  582. \\
  583. }
  584.  
  585. % Define an environment for cvskill
  586. \newenvironment{cvskills}{
  587. \begin{center}
  588. \setlength\tabcolsep{1ex}
  589. \setlength{\extrarowheight}{0pt}
  590. \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{15.2cm}}
  591. }{
  592. \end{tabular*}
  593. \end{center}
  594. }
  595. % Define a line of cv information(skill)
  596. % Usage: \cvskill{<type>}{<skillset>}
  597. \newcommand*{\cvskill}[2]{
  598. \skilltypestyle{#1} & \skillsetstyle{#2}
  599. \\
  600. }
  601.  
  602. % Define an environment for cvitems(for cventry)
  603. \newenvironment{cvitems}{
  604. \vspace{-4mm}
  605. \begin{justify}
  606. \begin{itemize}[leftmargin=2ex, nosep, noitemsep]
  607. \setlength{\parskip}{0pt}
  608. \renewcommand{\labelitemi}{\bullet}
  609. }{
  610. \end{itemize}
  611. \end{justify}
  612. \vspace{-2mm}
  613. }
  614.  
  615.  
  616. %-------------------------------------------------------------------------------
  617. % Commands for elements of Cover Letter
  618. %-------------------------------------------------------------------------------
  619. % Define an environment for cvletter
  620. \newenvironment{cvletter}{
  621. \lettertextstyle
  622. }{
  623. }
  624.  
  625. % Define a paragraph for cvletter
  626. % Usage: \cvparagraph{<paragraph-title>}
  627. \newcommand{\cvparagraph}[1]{
  628. \par\addvspace{2.5ex}
  629. \phantomsection{}
  630. \paragraphstyle{#1}
  631. \color{gray}\vhrulefill{0.9pt}
  632. \par\nobreak\addvspace{0.4ex}
  633. }
  634.  
  635. % Define a title of the cover letter
  636. % Usage: \makelettertitle
  637. \newcommand*{\makelettertitle}{
  638. \vspace{8.4mm}
  639. \setlength\tabcolsep{0pt}
  640. \setlength{\extrarowheight}{0pt}
  641. \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{12.5cm} R{4.5cm}}
  642. \recipienttitlestyle{\@recipientname} & \letterdatestyle{\@letterdate}
  643. \end{tabular*}
  644. \begin{singlespace}
  645. \recipientaddressstyle{\@recipientaddress} \\\\
  646. \end{singlespace}
  647. \ifthenelse{\isundefined{\@lettertitle}}
  648. {}
  649. {\lettertitlestyle{\@lettertitle} \\}
  650. \lettertextstyle{\@letteropening}
  651. }
  652.  
  653. % Define a closing of the cover letter
  654. % Usage: \makeletterclosing
  655. \newcommand*{\makeletterclosing}{
  656. \vspace{3.4mm}
  657. \lettertextstyle{\@letterclosing} \\\\
  658. \letternamestyle{\@firstname \@lastname}
  659. \ifthenelse{\isundefined{\@letterenclosure}}
  660. {\\}
  661. {
  662. \\\\\\
  663. \letterenclosurestyle{\@letterenclname: \@letterenclosure} \\
  664. }
  665. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement