mirror of https://github.com/eyhc1/rendercv.git
change templates' folder structure
This commit is contained in:
parent
1dab52d229
commit
fc366a7fd0
|
@ -1,122 +1,122 @@
|
||||||
((# IMPORT MACROS #))
|
((# IMPORT MACROS #))
|
||||||
((* from "components/section_contents.tex.j2" import section_contents with context *))
|
((* from "components/classic/section_contents.tex.j2" import section_contents with context *))
|
||||||
((* from "components/header.tex.j2" import header with context *))
|
((* from "components/classic/header.tex.j2" import header with context *))
|
||||||
|
|
||||||
\documentclass[10pt, a4paper]{memoir}
|
\documentclass[10pt, a4paper]{memoir}
|
||||||
|
|
||||||
% Packages:
|
% Packages:
|
||||||
\usepackage[
|
\usepackage[
|
||||||
ignoreheadfoot, % set margins without considering header and footer
|
ignoreheadfoot, % set margins without considering header and footer
|
||||||
top=<<design.page_top_margin>>, % seperation between body and page edge from the top
|
top=<<design.page_top_margin>>, % seperation between body and page edge from the top
|
||||||
bottom=<<design.page_bottom_margin>>, % seperation between body and page edge from the bottom
|
bottom=<<design.page_bottom_margin>>, % seperation between body and page edge from the bottom
|
||||||
left=<<design.page_left_margin>>, % seperation between body and page edge from the left
|
left=<<design.page_left_margin>>, % seperation between body and page edge from the left
|
||||||
right=<<design.page_right_margin>>, % seperation between body and page edge from the right
|
right=<<design.page_right_margin>>, % seperation between body and page edge from the right
|
||||||
]{geometry} % for adjusting page geometry
|
]{geometry} % for adjusting page geometry
|
||||||
\usepackage{fontspec} % for loading fonts
|
\usepackage{fontspec} % for loading fonts
|
||||||
\usepackage[explicit]{titlesec} % for customizing section titles
|
\usepackage[explicit]{titlesec} % for customizing section titles
|
||||||
\usepackage{tabularx} % for making tables with fixed width columns
|
\usepackage{tabularx} % for making tables with fixed width columns
|
||||||
\usepackage{array} % tabularx requires this
|
\usepackage{array} % tabularx requires this
|
||||||
\usepackage{xifthen} % for if-then-else statements
|
\usepackage{xifthen} % for if-then-else statements
|
||||||
\usepackage[dvipsnames]{xcolor} % for coloring text
|
\usepackage[dvipsnames]{xcolor} % for coloring text
|
||||||
\definecolor{primaryColor}{RGB}{<<design.primary_color.as_rgb_tuple()|join(", ")>>} % define primary color
|
\definecolor{primaryColor}{RGB}{<<design.primary_color.as_rgb_tuple()|join(", ")>>} % define primary color
|
||||||
\usepackage{enumitem} % for customizing lists
|
\usepackage{enumitem} % for customizing lists
|
||||||
\usepackage{fontawesome5} % for using icons
|
\usepackage{fontawesome5} % for using icons
|
||||||
\usepackage[
|
\usepackage[
|
||||||
pdftitle={<<cv.name>>'s CV},
|
pdftitle={<<cv.name>>'s CV},
|
||||||
pdfauthor={<<cv.name>>},
|
pdfauthor={<<cv.name>>},
|
||||||
colorlinks=true,
|
colorlinks=true,
|
||||||
urlcolor=primaryColor
|
urlcolor=primaryColor
|
||||||
]{hyperref} % for links, metadata and bookmarks
|
]{hyperref} % for links, metadata and bookmarks
|
||||||
|
|
||||||
% Some settings:
|
% Some settings:
|
||||||
\pagestyle{empty} % no header or footer
|
\pagestyle{empty} % no header or footer
|
||||||
\setcounter{secnumdepth}{0} % no section numbering
|
\setcounter{secnumdepth}{0} % no section numbering
|
||||||
\setlength{\parindent}{0pt} % no indentation
|
\setlength{\parindent}{0pt} % no indentation
|
||||||
\setlength{\topskip}{0pt} % no top skip
|
\setlength{\topskip}{0pt} % no top skip
|
||||||
\pagenumbering{gobble} % no page numbering
|
\pagenumbering{gobble} % no page numbering
|
||||||
|
|
||||||
\setmainfont{SourceSans3}[
|
\setmainfont{SourceSans3}[
|
||||||
Extension = .ttf,
|
Extension = .ttf,
|
||||||
UprightFont = *-Regular,
|
UprightFont = *-Regular,
|
||||||
ItalicFont = *-Italic,
|
ItalicFont = *-Italic,
|
||||||
BoldFont = *-Bold,
|
BoldFont = *-Bold,
|
||||||
BoldItalicFont = *-BoldItalic] % set main font
|
BoldItalicFont = *-BoldItalic] % set main font
|
||||||
|
|
||||||
\titleformat{\section}{
|
\titleformat{\section}{
|
||||||
% make the font size of the section title large and color it with the primary color
|
% make the font size of the section title large and color it with the primary color
|
||||||
\LARGE\color{primaryColor}
|
\LARGE\color{primaryColor}
|
||||||
}{
|
}{
|
||||||
}{
|
}{
|
||||||
}{
|
}{
|
||||||
% print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness
|
% print bold title, give 0.15 cm space and draw a line of 0.8 pt thickness
|
||||||
% from the end of the title to the end of the body
|
% from the end of the title to the end of the body
|
||||||
\textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]
|
\textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]
|
||||||
}[] % section title formatting
|
}[] % section title formatting
|
||||||
|
|
||||||
\titlespacing{\section}{
|
\titlespacing{\section}{
|
||||||
% left space:
|
% left space:
|
||||||
0pt
|
0pt
|
||||||
}{
|
}{
|
||||||
% top space:
|
% top space:
|
||||||
<<design.section_title_top_margin>>
|
<<design.section_title_top_margin>>
|
||||||
}{
|
}{
|
||||||
% bottom space:
|
% bottom space:
|
||||||
<<design.section_title_bottom_margin>>
|
<<design.section_title_bottom_margin>>
|
||||||
} % section title spacing
|
} % section title spacing
|
||||||
|
|
||||||
\newcolumntype{L}[1]{
|
\newcolumntype{L}[1]{
|
||||||
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
||||||
} % left-aligned fixed width column type
|
} % left-aligned fixed width column type
|
||||||
\newcolumntype{R}[1]{
|
\newcolumntype{R}[1]{
|
||||||
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
||||||
} % right-aligned fixed width column type
|
} % right-aligned fixed width column type
|
||||||
|
|
||||||
\newenvironment{highlights}{
|
\newenvironment{highlights}{
|
||||||
\begin{itemize}[
|
\begin{itemize}[
|
||||||
topsep=0pt,
|
topsep=0pt,
|
||||||
parsep=<<design.vertical_margin_between_bullet_points>>,
|
parsep=<<design.vertical_margin_between_bullet_points>>,
|
||||||
partopsep=0pt,
|
partopsep=0pt,
|
||||||
itemsep=0pt,
|
itemsep=0pt,
|
||||||
after=\vspace*{-\baselineskip},
|
after=\vspace*{-\baselineskip},
|
||||||
leftmargin=<<design.bullet_point_left_margin>>
|
leftmargin=<<design.bullet_point_left_margin>>
|
||||||
]
|
]
|
||||||
}{
|
}{
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
} % new environment for highlights
|
} % new environment for highlights
|
||||||
|
|
||||||
\newenvironment{header}{
|
\newenvironment{header}{
|
||||||
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
|
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
|
||||||
}{
|
}{
|
||||||
\par\kern\topsep
|
\par\kern\topsep
|
||||||
} % new environment for the header
|
} % new environment for the header
|
||||||
|
|
||||||
\newcommand{\hrefExternal}[2]{\href{#1}{#2\, \raisebox{.1ex}{\footnotesize \faExternalLink*}}} % new command for external links
|
\newcommand{\hrefExternal}[2]{\href{#1}{#2\, \raisebox{.1ex}{\footnotesize \faExternalLink*}}} % new command for external links
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
||||||
|
|
||||||
\section{Education}
|
\section{Education}
|
||||||
<<section_contents(data = cv.education, entry_type="education")|indent(4)>>
|
<<section_contents(data = cv.education, entry_type="education")|indent(4)>>
|
||||||
|
|
||||||
\section{Work Experience}
|
\section{Work Experience}
|
||||||
<<section_contents(data = cv.work_experience, entry_type="experience", disableTimeSpan=False)|indent(4)>>
|
<<section_contents(data = cv.work_experience, entry_type="experience", disableTimeSpan=False)|indent(4)>>
|
||||||
|
|
||||||
\section{Academic Projects}
|
\section{Academic Projects}
|
||||||
<<section_contents(data = cv.academic_projects, entry_type="normal")|indent(4)>>
|
<<section_contents(data = cv.academic_projects, entry_type="normal")|indent(4)>>
|
||||||
|
|
||||||
\section{Certificates}
|
\section{Certificates}
|
||||||
<<section_contents(data = cv.certificates, entry_type="normal", text_url="View the certificate")|indent(4)>>
|
<<section_contents(data = cv.certificates, entry_type="normal", link_text="view the certificate")|indent(4)>>
|
||||||
|
|
||||||
\section{Skills}
|
\section{Skills}
|
||||||
<<section_contents(data = cv.skills, entry_type="one_line")|indent(4)>>
|
<<section_contents(data = cv.skills, entry_type="one_line")|indent(4)>>
|
||||||
|
|
||||||
\section{Test Scores}
|
\section{Test Scores}
|
||||||
<<section_contents(data = cv.test_scores, entry_type="one_line", text_url="View the score report")|indent(4)>>
|
<<section_contents(data = cv.test_scores, entry_type="one_line", link_text="view the score report")|indent(4)>>
|
||||||
|
|
||||||
\section{Personal Projects}
|
\section{Personal Projects}
|
||||||
<<section_contents(data = cv.personal_projects, entry_type="normal")|indent(4)>>
|
<<section_contents(data = cv.personal_projects, entry_type="normal")|indent(4)>>
|
||||||
|
|
||||||
\section{Extracurricular Activities}
|
\section{Extracurricular Activities}
|
||||||
<<section_contents(data = cv.extracurricular_activities, entry_type="experience")|indent(4)>>
|
<<section_contents(data = cv.extracurricular_activities, entry_type="experience")|indent(4)>>
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
|
@ -1,9 +1,9 @@
|
||||||
((* macro date_and_location_strings(date_and_location_strings) *))
|
((* macro date_and_location_strings(date_and_location_strings) *))
|
||||||
((* for item in date_and_location_strings *))
|
((* for item in date_and_location_strings *))
|
||||||
((* if loop.last *))
|
((* if loop.last *))
|
||||||
<<item>>
|
<<item>>
|
||||||
((* else *))
|
((* else *))
|
||||||
<<item>>\newline
|
<<item>>\newline
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
((* endmacro *))
|
((* endmacro *))
|
|
@ -1,5 +1,5 @@
|
||||||
((* from "components/highlights.tex.j2" import highlights as print_higlights with context *))
|
((* from "components/classic/highlights.tex.j2" import highlights as print_higlights with context *))
|
||||||
((* from "components/date_and_location_strings.tex.j2" import date_and_location_strings as print_date_and_locations *))
|
((* from "components/classic/date_and_location_strings.tex.j2" import date_and_location_strings as print_date_and_locations *))
|
||||||
|
|
||||||
((* macro education(study_type, institution, area, highlights, date_and_location_strings)*))
|
((* macro education(study_type, institution, area, highlights, date_and_location_strings)*))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
\end{tabularx}
|
\end{tabularx}
|
||||||
((* endmacro *))
|
((* endmacro *))
|
||||||
|
|
||||||
((* macro normal(name, highlights, date_and_location_strings, markdown_url=none, text_url=none)*))
|
((* macro normal(name, highlights, date_and_location_strings, markdown_url=none, link_text=none)*))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||||
((# width: \textwidth #))
|
((# width: \textwidth #))
|
||||||
((# preamble: first column, second column #))
|
((# preamble: first column, second column #))
|
||||||
|
@ -41,8 +41,8 @@
|
||||||
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
|
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
|
||||||
\begin{tabularx}{\textwidth}{X R{<<design.date_and_location_width>>}}
|
\begin{tabularx}{\textwidth}{X R{<<design.date_and_location_width>>}}
|
||||||
((* if markdown_url is not none *))
|
((* if markdown_url is not none *))
|
||||||
((* if text_url is not none *))
|
((* if link_text is not none *))
|
||||||
((* set markdown_url = "["+text_url+"]("+ markdown_url|markdown_url_to_url +")" *))
|
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
|
||||||
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
|
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
|
||||||
((* else *))
|
((* else *))
|
||||||
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
|
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
\end{tabularx}
|
\end{tabularx}
|
||||||
((* endmacro *))
|
((* endmacro *))
|
||||||
|
|
||||||
((* macro one_line(name, details, markdown_url=none, text_url=none)*))
|
((* macro one_line(name, details, markdown_url=none, link_text=none)*))
|
||||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||||
((# width: \textwidth #))
|
((# width: \textwidth #))
|
||||||
((# preamble: first column, second column #))
|
((# preamble: first column, second column #))
|
||||||
|
@ -64,8 +64,8 @@
|
||||||
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
|
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
|
||||||
\setlength{\leftskip}{0.2cm}
|
\setlength{\leftskip}{0.2cm}
|
||||||
((* if markdown_url is not none *))
|
((* if markdown_url is not none *))
|
||||||
((* if text_url is not none *))
|
((* if link_text is not none *))
|
||||||
((* set markdown_url = "["+text_url+"]("+ markdown_url|markdown_url_to_url +")" *))
|
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
|
||||||
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)
|
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)
|
||||||
((* else *))
|
((* else *))
|
||||||
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)
|
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)
|
|
@ -1,15 +1,15 @@
|
||||||
((* import "components/header_connections.tex.j2" as print_connections *))
|
((* import "components/classic/header_connections.tex.j2" as print_connections *))
|
||||||
((* macro header(name, connections) *))
|
((* macro header(name, connections) *))
|
||||||
\begin{header}
|
\begin{header}
|
||||||
\Huge
|
\Huge
|
||||||
\textbf{<<name>>}
|
\textbf{<<name>>}
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
((* for connection in connections *))
|
((* for connection in connections *))
|
||||||
<<print_connections[connection.name](connection.value)>>
|
<<print_connections[connection.name](connection.value)>>
|
||||||
((* if not loop.last *))
|
((* if not loop.last *))
|
||||||
\hspace{0.5cm}
|
\hspace{0.5cm}
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{header}
|
\end{header}
|
||||||
((* endmacro *))
|
((* endmacro *))
|
|
@ -1,8 +1,8 @@
|
||||||
((# Each macro in here is a link with an icon for header. #))
|
((# Each macro in here is a link with an icon for header. #))
|
||||||
((* macro LinkedIn(username) *))\href{https://www.linkedin.com/in/<<username>>}{{\small\faLinkedinIn}\hspace{0.13cm}<<username>>}((* endmacro *))
|
((* macro LinkedIn(username) *))\href{https://www.linkedin.com/in/<<username>>}{{\small\faLinkedinIn}\hspace{0.13cm}<<username>>}((* endmacro *))
|
||||||
((* macro GitHub(username) *))\href{https://www.github.com/<<username>>}{{\small\faGithub}\hspace{0.13cm}<<username>>}((* endmacro *))
|
((* macro GitHub(username) *))\href{https://www.github.com/<<username>>}{{\small\faGithub}\hspace{0.13cm}<<username>>}((* endmacro *))
|
||||||
((* macro Instagram(username) *))\href{https://www.instagram.com/<<username>>}{{\small\faInstagram}\hspace{0.13cm}<<username>>}((* endmacro *))
|
((* macro Instagram(username) *))\href{https://www.instagram.com/<<username>>}{{\small\faInstagram}\hspace{0.13cm}<<username>>}((* endmacro *))
|
||||||
((* macro phone(number) *)){\footnotesize\faPhone*}\hspace{0.13cm}<<number|replace("tel:", "")|replace("-"," ")>>((* endmacro *))
|
((* macro phone(number) *)){\footnotesize\faPhone*}\hspace{0.13cm}<<number|replace("tel:", "")|replace("-"," ")>>((* endmacro *))
|
||||||
((* macro email(email) *))\href{mailto:<<email>>}{{\small\faEnvelope[regular]}\hspace{0.13cm}<<email>>}((* endmacro *))
|
((* macro email(email) *))\href{mailto:<<email>>}{{\small\faEnvelope[regular]}\hspace{0.13cm}<<email>>}((* endmacro *))
|
||||||
((* macro website(url) *))\href{<<url>>}{{\small\faLink}\hspace{0.13cm}<<url|replace("https://","")|replace("/","")>>}((* endmacro *))
|
((* macro website(url) *))\href{<<url>>}{{\small\faLink}\hspace{0.13cm}<<url|replace("https://","")|replace("/","")>>}((* endmacro *))
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
((* macro highlights(highlights) *))
|
((* macro highlights(highlights) *))
|
||||||
\vspace{<<design.vertical_margin_between_entries_and_highlights>>}
|
\vspace{<<design.vertical_margin_between_entries_and_highlights>>}
|
||||||
\begin{highlights}
|
\begin{highlights}
|
||||||
((* for item in highlights *))
|
((* for item in highlights *))
|
||||||
\item <<item|markdown_to_latex>>
|
\item <<item|markdown_to_latex>>
|
||||||
((* endfor *))
|
((* endfor *))
|
||||||
\end{highlights}
|
\end{highlights}
|
||||||
((* endmacro *))
|
((* endmacro *))
|
|
@ -1,6 +1,6 @@
|
||||||
((* import "components/entry.tex.j2" as entry with context *))
|
((* import "components/classic/entry.tex.j2" as entry with context *))
|
||||||
|
|
||||||
((* macro section_contents(data, entry_type, text_url=none, disableTimeSpan=True)*))
|
((* macro section_contents(data, entry_type, link_text=none, disableTimeSpan=True)*))
|
||||||
((* for value in data *))
|
((* for value in data *))
|
||||||
((* if disableTimeSpan *))
|
((* if disableTimeSpan *))
|
||||||
((* set date_and_location_strings = value.date_and_location_strings_without_time_span *))
|
((* set date_and_location_strings = value.date_and_location_strings_without_time_span *))
|
||||||
|
@ -28,14 +28,14 @@
|
||||||
highlights=value.highlight_strings,
|
highlights=value.highlight_strings,
|
||||||
date_and_location_strings=date_and_location_strings,
|
date_and_location_strings=date_and_location_strings,
|
||||||
markdown_url=value.markdown_url,
|
markdown_url=value.markdown_url,
|
||||||
text_url=text_url,
|
link_text=link_text,
|
||||||
)|indent(4)>>
|
)|indent(4)>>
|
||||||
((* elif entry_type == "one_line" *))
|
((* elif entry_type == "one_line" *))
|
||||||
<<entry["one_line"](
|
<<entry["one_line"](
|
||||||
name=value.name,
|
name=value.name,
|
||||||
details=value.details,
|
details=value.details,
|
||||||
markdown_url=value.markdown_url,
|
markdown_url=value.markdown_url,
|
||||||
text_url=text_url,
|
link_text=link_text,
|
||||||
)|indent(4)>>
|
)|indent(4)>>
|
||||||
((* endif *))
|
((* endif *))
|
||||||
((* if not loop.last *))
|
((* if not loop.last *))
|
Loading…
Reference in New Issue