mirror of https://github.com/eyhc1/rendercv.git
improve templates
This commit is contained in:
parent
a43ef83e98
commit
9abd3c9de1
|
@ -2,15 +2,16 @@
|
|||
((* from "components/classic/section_contents.tex.j2" import section_contents with context *))
|
||||
((* from "components/classic/header.tex.j2" import header with context *))
|
||||
|
||||
\documentclass[10pt, a4paper]{memoir}
|
||||
\documentclass[10pt, a4paper]{article}
|
||||
|
||||
% Packages:
|
||||
\usepackage[
|
||||
ignoreheadfoot, % set margins without considering header and footer
|
||||
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
|
||||
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
|
||||
top=<<design.margins.page.top>>, % seperation between body and page edge from the top
|
||||
bottom=<<design.margins.page.bottom>>, % seperation between body and page edge from the bottom
|
||||
left=<<design.margins.page.left>>, % seperation between body and page edge from the left
|
||||
right=<<design.margins.page.right>>, % seperation between body and page edge from the right
|
||||
showframe % for debugging
|
||||
]{geometry} % for adjusting page geometry
|
||||
\usepackage{fontspec} % for loading fonts
|
||||
\usepackage[explicit]{titlesec} % for customizing section titles
|
||||
|
@ -44,7 +45,7 @@
|
|||
|
||||
\titleformat{\section}{
|
||||
% make the font size of the section title large and color it with the primary color
|
||||
\LARGE\color{primaryColor}
|
||||
\Large\color{primaryColor}
|
||||
}{
|
||||
}{
|
||||
}{
|
||||
|
@ -58,10 +59,10 @@
|
|||
0pt
|
||||
}{
|
||||
% top space:
|
||||
<<design.section_title_top_margin>>
|
||||
<<design.margins.section_title.top>>
|
||||
}{
|
||||
% bottom space:
|
||||
<<design.section_title_bottom_margin>>
|
||||
<<design.margins.section_title.bottom>>
|
||||
} % section title spacing
|
||||
|
||||
\newcolumntype{L}[1]{
|
||||
|
@ -70,15 +71,18 @@
|
|||
\newcolumntype{R}[1]{
|
||||
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
|
||||
} % right-aligned fixed width column type
|
||||
\newcolumntype{K}[1]{
|
||||
>{\raggedright\let\newline\\\arraybackslash\hspace{-0.2cm}\hspace{#1}}X
|
||||
} % left-aligned flexible width column type
|
||||
|
||||
\newenvironment{highlights}{
|
||||
\begin{itemize}[
|
||||
topsep=0pt,
|
||||
parsep=<<design.vertical_margin_between_bullet_points>>,
|
||||
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
|
||||
partopsep=0pt,
|
||||
itemsep=0pt,
|
||||
after=\vspace*{-\baselineskip},
|
||||
leftmargin=<<design.bullet_point_left_margin>>
|
||||
after=\vspace*{-1\baselineskip},
|
||||
leftmargin=<<design.margins.highlights_area.left>> + 3pt
|
||||
]
|
||||
}{
|
||||
\end{itemize}
|
||||
|
@ -95,28 +99,9 @@
|
|||
\begin{document}
|
||||
<<header(name=cv.name, connections=cv.connections)|indent(4)>>
|
||||
|
||||
\section{Education}
|
||||
<<section_contents(data = cv.education, entry_type="education")|indent(4)>>
|
||||
|
||||
\section{Work Experience}
|
||||
<<section_contents(data = cv.work_experience, entry_type="experience", disableTimeSpan=False)|indent(4)>>
|
||||
|
||||
\section{Academic Projects}
|
||||
<<section_contents(data = cv.academic_projects, entry_type="normal")|indent(4)>>
|
||||
|
||||
\section{Certificates}
|
||||
<<section_contents(data = cv.certificates, entry_type="normal", link_text="view the certificate")|indent(4)>>
|
||||
|
||||
\section{Skills}
|
||||
<<section_contents(data = cv.skills, entry_type="one_line")|indent(4)>>
|
||||
|
||||
\section{Test Scores}
|
||||
<<section_contents(data = cv.test_scores, entry_type="one_line", link_text="view the score report")|indent(4)>>
|
||||
|
||||
\section{Personal Projects}
|
||||
<<section_contents(data = cv.personal_projects, entry_type="normal")|indent(4)>>
|
||||
|
||||
\section{Extracurricular Activities}
|
||||
<<section_contents(data = cv.extracurricular_activities, entry_type="experience")|indent(4)>>
|
||||
((* for section in cv.sections *))
|
||||
\section{<<section.title>>}
|
||||
<<section_contents(entries=section.entries, entry_type=section.entry_type)|indent(4)>>
|
||||
((* endfor *))
|
||||
|
||||
\end{document}
|
|
@ -1,9 +1,9 @@
|
|||
((* macro date_and_location_strings(date_and_location_strings) *))
|
||||
((* for item in date_and_location_strings *))
|
||||
((* if loop.last *))
|
||||
<<item>>
|
||||
<<item>> \hspace*{-0.2cm + <<design.margins.entry_area.right>>}
|
||||
((* else *))
|
||||
<<item>>\newline
|
||||
<<item>> \hspace*{-0.2cm + <<design.margins.entry_area.right>>} \newline
|
||||
((* endif *))
|
||||
((* endfor *))
|
||||
((* endmacro *))
|
|
@ -1,21 +1,20 @@
|
|||
((* from "components/classic/highlights.tex.j2" import highlights as print_higlights with context *))
|
||||
((* from "components/classic/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 with context *))
|
||||
|
||||
((* macro education(study_type, institution, area, highlights, date_and_location_strings)*))
|
||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||
((# width: \textwidth #))
|
||||
((# preamble: first column, second column, third column #))
|
||||
((# first column: p{0.55cm}; constant width, ragged left column #))
|
||||
((# second column: X; variable width, ragged left column #))
|
||||
((# second column: K{<<design.margins.entry_area.left>>}; variable width, ragged left column #))
|
||||
((# third column: R{<<design.date_and_location_width>>}; constant widthm ragged right column #))
|
||||
\begin{tabularx}{\textwidth}{p{0.55cm} X R{<<design.date_and_location_width>>}}
|
||||
\begin{tabularx}{\textwidth}{p{0.55cm} K{<<design.margins.entry_area.left>>} R{<<design.date_and_location_width>>}}
|
||||
\textbf{<<study_type if study_type is not none>>}
|
||||
&
|
||||
\textbf{<<institution>>}, <<area>>
|
||||
|
||||
<<print_higlights(highlights)|indent(4)>>
|
||||
<<print_higlights(highlights)|indent(4)->>
|
||||
&
|
||||
<<print_date_and_locations(date_and_location_strings)|indent(4)>>
|
||||
<<print_date_and_locations(date_and_location_strings)|indent(4)->>
|
||||
\end{tabularx}
|
||||
((* endmacro *))
|
||||
|
||||
|
@ -23,9 +22,9 @@
|
|||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||
((# width: \textwidth #))
|
||||
((# preamble: first column, second column #))
|
||||
((# first column:: X; variable width, ragged left column #))
|
||||
((# first column:: K{<<design.margins.entry_area.left>>}; variable width, ragged left 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}{K{<<design.margins.entry_area.left>>} R{<<design.date_and_location_width>>}}
|
||||
\textbf{<<company>>}, <<position>>
|
||||
<<print_higlights(highlights)|indent(4)->>
|
||||
&
|
||||
|
@ -37,9 +36,9 @@
|
|||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||
((# width: \textwidth #))
|
||||
((# preamble: first column, second column #))
|
||||
((# first column:: X; variable width, ragged left column #))
|
||||
((# first column:: K{<<design.margins.entry_area.left>>}; variable width, ragged left 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}{K{<<design.margins.entry_area.left>>} R{<<design.date_and_location_width>>}}
|
||||
((* if markdown_url is not none *))
|
||||
((* if link_text is not none *))
|
||||
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
|
||||
|
@ -57,12 +56,8 @@
|
|||
((* endmacro *))
|
||||
|
||||
((* macro one_line(name, details, markdown_url=none, link_text=none)*))
|
||||
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
|
||||
((# width: \textwidth #))
|
||||
((# preamble: first column, second column #))
|
||||
((# first column:: X; variable width, ragged left column #))
|
||||
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
|
||||
\setlength{\leftskip}{0.2cm}
|
||||
|
||||
((* if markdown_url is not none *))
|
||||
((* if link_text is not none *))
|
||||
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
|
||||
|
@ -73,5 +68,6 @@
|
|||
((* else *))
|
||||
\textbf{<<name>>:} <<details>>
|
||||
((* endif *))
|
||||
|
||||
\setlength{\leftskip}{0cm}
|
||||
((* endmacro *))
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
\normalsize
|
||||
((* for connection in connections *))
|
||||
<<print_connections[connection.name](connection.value)>>
|
||||
<<print_connections[connection.name|replace(" ", "")](connection.value)>>
|
||||
((* if not loop.last *))
|
||||
\hspace{0.5cm}
|
||||
((* endif *))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
((* macro highlights(highlights) *))
|
||||
\vspace{<<design.vertical_margin_between_entries_and_highlights>>}
|
||||
\vspace*{<<design.margins.highlights_area.top>>}
|
||||
\begin{highlights}
|
||||
((* for item in highlights *))
|
||||
\item <<item|markdown_to_latex>>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
((* import "components/classic/entry.tex.j2" as entry with context *))
|
||||
|
||||
((* macro section_contents(data, entry_type, link_text=none, disableTimeSpan=True)*))
|
||||
((* for value in data *))
|
||||
((* macro section_contents(entries, entry_type, link_text=none, disableTimeSpan=True)*))
|
||||
((* for value in entries *))
|
||||
((* if disableTimeSpan *))
|
||||
((* set date_and_location_strings = value.date_and_location_strings_without_time_span *))
|
||||
((* else *))
|
||||
((* set date_and_location_strings = value.date_and_location_strings *))
|
||||
((* endif *))
|
||||
((* if entry_type == "education" *))
|
||||
((* if entry_type == "EducationEntry" *))
|
||||
<<entry["education"](
|
||||
study_type=value.study_type,
|
||||
institution=value.institution,
|
||||
|
@ -15,14 +15,14 @@
|
|||
highlights=value.highlight_strings,
|
||||
date_and_location_strings=date_and_location_strings
|
||||
)|indent(4)>>
|
||||
((* elif entry_type == "experience" *))
|
||||
((* elif entry_type == "ExperienceEntry" *))
|
||||
<<entry["experience"](
|
||||
company=value.company,
|
||||
position=value.position,
|
||||
highlights=value.highlight_strings,
|
||||
date_and_location_strings=date_and_location_strings
|
||||
)|indent(4)>>
|
||||
((* elif entry_type == "normal" *))
|
||||
((* elif entry_type == "NormalEntry" *))
|
||||
<<entry["normal"](
|
||||
name=value.name,
|
||||
highlights=value.highlight_strings,
|
||||
|
@ -30,7 +30,7 @@
|
|||
markdown_url=value.markdown_url,
|
||||
link_text=link_text,
|
||||
)|indent(4)>>
|
||||
((* elif entry_type == "one_line" *))
|
||||
((* elif entry_type == "OneLineEntry" *))
|
||||
<<entry["one_line"](
|
||||
name=value.name,
|
||||
details=value.details,
|
||||
|
@ -39,7 +39,7 @@
|
|||
)|indent(4)>>
|
||||
((* endif *))
|
||||
((* if not loop.last *))
|
||||
\vspace*{<<design.vertical_margin_between_entries>>}
|
||||
\vspace*{<<design.margins.entry_area.vertical_between>>}
|
||||
|
||||
((* endif *))
|
||||
((* endfor *))
|
||||
|
|
Loading…
Reference in New Issue