change templates' folder structure

This commit is contained in:
Sina Atalay 2023-09-12 19:41:09 +02:00
parent 1dab52d229
commit fc366a7fd0
7 changed files with 170 additions and 170 deletions

View File

@ -1,122 +1,122 @@
((# IMPORT MACROS #))
((* from "components/section_contents.tex.j2" import section_contents with context *))
((* from "components/header.tex.j2" import header with context *))
\documentclass[10pt, a4paper]{memoir}
% 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
]{geometry} % for adjusting page geometry
\usepackage{fontspec} % for loading fonts
\usepackage[explicit]{titlesec} % for customizing section titles
\usepackage{tabularx} % for making tables with fixed width columns
\usepackage{array} % tabularx requires this
\usepackage{xifthen} % for if-then-else statements
\usepackage[dvipsnames]{xcolor} % for coloring text
\definecolor{primaryColor}{RGB}{<<design.primary_color.as_rgb_tuple()|join(", ")>>} % define primary color
\usepackage{enumitem} % for customizing lists
\usepackage{fontawesome5} % for using icons
\usepackage[
pdftitle={<<cv.name>>'s CV},
pdfauthor={<<cv.name>>},
colorlinks=true,
urlcolor=primaryColor
]{hyperref} % for links, metadata and bookmarks
% Some settings:
\pagestyle{empty} % no header or footer
\setcounter{secnumdepth}{0} % no section numbering
\setlength{\parindent}{0pt} % no indentation
\setlength{\topskip}{0pt} % no top skip
\pagenumbering{gobble} % no page numbering
\setmainfont{SourceSans3}[
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic] % set main font
\titleformat{\section}{
% make the font size of the section title large and color it with the primary color
\LARGE\color{primaryColor}
}{
}{
}{
% 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
\textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]
}[] % section title formatting
\titlespacing{\section}{
% left space:
0pt
}{
% top space:
<<design.section_title_top_margin>>
}{
% bottom space:
<<design.section_title_bottom_margin>>
} % section title spacing
\newcolumntype{L}[1]{
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % left-aligned fixed width column type
\newcolumntype{R}[1]{
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % right-aligned fixed width column type
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
parsep=<<design.vertical_margin_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
after=\vspace*{-\baselineskip},
leftmargin=<<design.bullet_point_left_margin>>
]
}{
\end{itemize}
} % new environment for highlights
\newenvironment{header}{
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
}{
\par\kern\topsep
} % new environment for the header
\newcommand{\hrefExternal}[2]{\href{#1}{#2\, \raisebox{.1ex}{\footnotesize \faExternalLink*}}} % new command for external links
\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", text_url="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", text_url="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)>>
((# IMPORT MACROS #))
((* 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}
% 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
]{geometry} % for adjusting page geometry
\usepackage{fontspec} % for loading fonts
\usepackage[explicit]{titlesec} % for customizing section titles
\usepackage{tabularx} % for making tables with fixed width columns
\usepackage{array} % tabularx requires this
\usepackage{xifthen} % for if-then-else statements
\usepackage[dvipsnames]{xcolor} % for coloring text
\definecolor{primaryColor}{RGB}{<<design.primary_color.as_rgb_tuple()|join(", ")>>} % define primary color
\usepackage{enumitem} % for customizing lists
\usepackage{fontawesome5} % for using icons
\usepackage[
pdftitle={<<cv.name>>'s CV},
pdfauthor={<<cv.name>>},
colorlinks=true,
urlcolor=primaryColor
]{hyperref} % for links, metadata and bookmarks
% Some settings:
\pagestyle{empty} % no header or footer
\setcounter{secnumdepth}{0} % no section numbering
\setlength{\parindent}{0pt} % no indentation
\setlength{\topskip}{0pt} % no top skip
\pagenumbering{gobble} % no page numbering
\setmainfont{SourceSans3}[
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic] % set main font
\titleformat{\section}{
% make the font size of the section title large and color it with the primary color
\LARGE\color{primaryColor}
}{
}{
}{
% 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
\textbf{#1}\hspace{0.15cm}\titlerule[0.8pt]
}[] % section title formatting
\titlespacing{\section}{
% left space:
0pt
}{
% top space:
<<design.section_title_top_margin>>
}{
% bottom space:
<<design.section_title_bottom_margin>>
} % section title spacing
\newcolumntype{L}[1]{
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % left-aligned fixed width column type
\newcolumntype{R}[1]{
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % right-aligned fixed width column type
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
parsep=<<design.vertical_margin_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
after=\vspace*{-\baselineskip},
leftmargin=<<design.bullet_point_left_margin>>
]
}{
\end{itemize}
} % new environment for highlights
\newenvironment{header}{
\setlength{\topsep}{0pt}\par\kern\topsep\centering\color{primaryColor}\linespread{1.5}
}{
\par\kern\topsep
} % new environment for the header
\newcommand{\hrefExternal}[2]{\href{#1}{#2\, \raisebox{.1ex}{\footnotesize \faExternalLink*}}} % new command for external links
\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)>>
\end{document}

View File

@ -1,9 +1,9 @@
((* macro date_and_location_strings(date_and_location_strings) *))
((* for item in date_and_location_strings *))
((* if loop.last *))
<<item>>
((* else *))
<<item>>\newline
((* endif *))
((* endfor *))
((* macro date_and_location_strings(date_and_location_strings) *))
((* for item in date_and_location_strings *))
((* if loop.last *))
<<item>>
((* else *))
<<item>>\newline
((* endif *))
((* endfor *))
((* endmacro *))

View File

@ -1,5 +1,5 @@
((* from "components/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/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 *))
((* macro education(study_type, institution, area, highlights, date_and_location_strings)*))
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
@ -33,7 +33,7 @@
\end{tabularx}
((* 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⟩} #))
((# width: \textwidth #))
((# preamble: first column, second column #))
@ -41,8 +41,8 @@
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
\begin{tabularx}{\textwidth}{X R{<<design.date_and_location_width>>}}
((* if markdown_url is not none *))
((* if text_url is not none *))
((* set markdown_url = "["+text_url+"]("+ markdown_url|markdown_url_to_url +")" *))
((* if link_text is not none *))
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
((* else *))
\textbf{<<name>>}, <<markdown_url|markdown_to_latex>>
@ -56,7 +56,7 @@
\end{tabularx}
((* 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⟩} #))
((# width: \textwidth #))
((# preamble: first column, second column #))
@ -64,8 +64,8 @@
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
\setlength{\leftskip}{0.2cm}
((* if markdown_url is not none *))
((* if text_url is not none *))
((* set markdown_url = "["+text_url+"]("+ markdown_url|markdown_url_to_url +")" *))
((* if link_text is not none *))
((* set markdown_url = "["+link_text+"]("+ markdown_url|markdown_url_to_url +")" *))
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)
((* else *))
\textbf{<<name>>:} <<details>> (<<markdown_url|markdown_to_latex>>)

View File

@ -1,15 +1,15 @@
((* import "components/header_connections.tex.j2" as print_connections *))
((* macro header(name, connections) *))
\begin{header}
\Huge
\textbf{<<name>>}
\normalsize
((* for connection in connections *))
<<print_connections[connection.name](connection.value)>>
((* if not loop.last *))
\hspace{0.5cm}
((* endif *))
((* endfor *))
\end{header}
((* import "components/classic/header_connections.tex.j2" as print_connections *))
((* macro header(name, connections) *))
\begin{header}
\Huge
\textbf{<<name>>}
\normalsize
((* for connection in connections *))
<<print_connections[connection.name](connection.value)>>
((* if not loop.last *))
\hspace{0.5cm}
((* endif *))
((* endfor *))
\end{header}
((* endmacro *))

View File

@ -1,8 +1,8 @@
((# 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 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 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 website(url) *))\href{<<url>>}{{\small\faLink}\hspace{0.13cm}<<url|replace("https://","")|replace("/","")>>}((* endmacro *))
((# 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 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 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 website(url) *))\href{<<url>>}{{\small\faLink}\hspace{0.13cm}<<url|replace("https://","")|replace("/","")>>}((* endmacro *))

View File

@ -1,8 +1,8 @@
((* macro highlights(highlights) *))
\vspace{<<design.vertical_margin_between_entries_and_highlights>>}
\begin{highlights}
((* for item in highlights *))
\item <<item|markdown_to_latex>>
((* endfor *))
\end{highlights}
((* macro highlights(highlights) *))
\vspace{<<design.vertical_margin_between_entries_and_highlights>>}
\begin{highlights}
((* for item in highlights *))
\item <<item|markdown_to_latex>>
((* endfor *))
\end{highlights}
((* endmacro *))

View File

@ -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 *))
((* if disableTimeSpan *))
((* set date_and_location_strings = value.date_and_location_strings_without_time_span *))
@ -28,14 +28,14 @@
highlights=value.highlight_strings,
date_and_location_strings=date_and_location_strings,
markdown_url=value.markdown_url,
text_url=text_url,
link_text=link_text,
)|indent(4)>>
((* elif entry_type == "one_line" *))
<<entry["one_line"](
name=value.name,
details=value.details,
markdown_url=value.markdown_url,
text_url=text_url,
link_text=link_text,
)|indent(4)>>
((* endif *))
((* if not loop.last *))