Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. documentclass{resume}
  2.  
  3. usepackage{comment}
  4. usepackage{tabularx}
  5. usepackage{fontspec}
  6. usepackage{setspace}
  7. usepackage{graphicx} % Required for figures
  8. usepackage[export]{adjustbox}
  9. usepackage{changepage}
  10.  
  11. name{My name}
  12. jobtitle{Student}
  13. born{xx.xx.xxxx}
  14. address{Some street, some city}
  15. phone{0123456789}
  16. email{mail@mail.com}
  17.  
  18. newcommand{userinformation}[1]{renewcommand{userinformation}{#1}} %
  19.  
  20. userinformation{
  21.  
  22. begin{figure}
  23. hfill
  24. includegraphics[width=.4textwidth,right]{photo.jpg} % Your photo
  25. end{figure}
  26. }
  27.  
  28. begin{document}
  29.  
  30. begin{adjustwidth}{}{-8cm}
  31. userinformation
  32. end{adjustwidth}
  33. %----------------------------------------------------------------------------------------
  34. % EDUCATION SECTION
  35. %----------------------------------------------------------------------------------------
  36. begin{rSection}{Utdanning}
  37.  
  38. {bf Some university} hfill {Year - Year} \
  39. University
  40. item Some text
  41.  
  42. end{rSection}
  43. end{document}
  44.  
  45. ProvidesClass{resume}[2010/09/17 v0.1 Resume class]
  46.  
  47. LoadClass[11pt,letterpaper]{article} % Font size and paper type
  48.  
  49. usepackage[left=0.5in,top=0.3in,right=0.5in,bottom=0.5in]{geometry} % Document margins
  50. usepackage[parfill]{parskip} % Remove paragraph indentation
  51. usepackage[usenames,dvipsnames]{xcolor} % Colorize
  52. usepackage{hyperref} % Clickable links
  53. usepackage{xhfill} % Customizable hrulefill
  54. usepackage{array} % Required for boldface (bf and bfseries) tabular columns
  55. usepackage{ifthen} % Required for ifthenelse statements
  56. usepackage{fontspec}
  57.  
  58. pagestyle{empty} % Suppress page numbers
  59.  
  60. definecolor{accentColor}{RGB}{72,105,24}
  61. definecolor{titleColor}{RGB}{132,129,129}
  62. definecolor{textColor}{RGB}{90,91,94}
  63. definecolor{linkColor}{RGB}{49,117,194}
  64.  
  65. hypersetup{
  66. colorlinks=true,
  67. urlcolor=linkColor
  68. }
  69.  
  70. % New command for the blue bullets
  71. newcommand{bluebullet}{textcolor{accentColor}{$circ$}~~}
  72.  
  73. %----------------------------------------------------------------------------------------
  74. % HEADING
  75. %----------------------------------------------------------------------------------------
  76. newcommand{name}[1]{
  77. def@name{#1}
  78. }
  79. def@name{} % Sets @name to empty by default
  80.  
  81. newcommand{jobtitle}[1] {
  82. def@jobtitle{#1} % Defines the jobtitle command to set name
  83. }
  84.  
  85. newcommand{address}[1]{def@address{#1}}
  86. newcommand{phone}[1]{def@phone{#1}}
  87. newcommand{website}[1]{def@website{#1}}
  88. newcommand{email}[1]{def@email{#1}}
  89. newcommand{born}[1]{def@born{#1}}
  90.  
  91. % printname is used to print the name as a page header
  92. newcommand{printname} {
  93. begingroup
  94. Largebftextcolor{accentColor}{@name}hfil
  95. smallskipbreak
  96. endgroup
  97. }
  98.  
  99. % printjobtitle is used to print the name as a page header
  100. newcommand{printjobtitle} {
  101. begingroup
  102. largebftextcolor{textColor}{@jobtitle}hfil
  103. smallskipbreak
  104. endgroup
  105. }
  106.  
  107. % printjobtitle is used to print the name as a page header
  108. letcontactsizenormalsize
  109. letcontactskipsmallskip
  110. newcommand{printcontact} {
  111. begin{tabular}{ l l }
  112. @ifundefined{@born}{}{contactsizetextcolor{accentColor}{Født:} & contactsizebftextcolor{textColor}{@born} \ noalign{contactskip}}
  113.  
  114. @ifundefined{@phone}{}{contactsizetextcolor{accentColor}{Telefon:} & contactsizebftextcolor{textColor}{@phone} \ noalign{contactskip}}
  115.  
  116. @ifundefined{@address}{}{contactsizetextcolor{accentColor}{Adresse:} & contactsizebftextcolor{textColor}{@address} \ noalign{contactskip}}
  117.  
  118. @ifundefined{@website}{}{contactsizetextcolor{accentColor}{Website:} & contactsizebfhref{@website}{@website} \ noalign{contactskip}}
  119.  
  120. @ifundefined{@email}{}{contactsizetextcolor{accentColor}{Mail:} & contactsizebfhref{mailto:@email}{@email} \}
  121.  
  122. end{tabular}
  123. }
  124.  
  125. %----------------------------------------------------------------------------------------
  126. % PRINT THE HEADING LINES
  127. %----------------------------------------------------------------------------------------
  128. letori@document=document
  129. renewcommand{document}{
  130. ori@document % Begin document
  131. printname % Print the name specified with name
  132. @ifundefined{@jobtitle}{}{printjobtitle}
  133. printcontact
  134. }
  135.  
  136. %------------------------------------------------------------------------------- ---------
  137. % SECTION FORMATTING
  138. %----------------------------------------------------------------------------------------
  139. % Defines the rSection environment for the large sections within the CV
  140. newenvironment{rSection}[1]{ % 1 input argument - section name
  141. smallskip
  142. textcolor{accentColor}{rule{1cm} {.4mm}quadhbox{MakeUppercase{bf{textit{#1}}}}quadxhrulefill{accentColor} {.4mm}}
  143. smallskip
  144. begin{list}{}{ % List for each individual item in the section
  145. setlength{leftmargin}{1.5em} % Margin within the section
  146. }
  147. item[]
  148. }{
  149. end{list}
  150. }
  151.  
  152. %----------------------------------------------------------------------------------------
  153. % WORK EXPERIENCE FORMATTING
  154. %----------------------------------------------------------------------------------------
  155. newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
  156. {bf #1} hfill {#2} % Bold company name and date on the right
  157. ifthenelse{equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  158. \
  159. {em #3} hfill {em #4} % Italic job title and location
  160. }smallskip
  161. begin{list}{$cdot$}{leftmargin=0em} % cdot used for bullets, no indentation
  162. itemsep -0.5em vspace{-0.5em} % Compress items in list together for aesthetics
  163. }{
  164. end{list}
  165. vspace{0.5em} % Some space after the list of bullet points
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement