diff --git a/rendercv/templates/classic/classic.tex.j2 b/rendercv/templates/classic.tex.j2 similarity index 91% rename from rendercv/templates/classic/classic.tex.j2 rename to rendercv/templates/classic.tex.j2 index 03ee14d..add0e91 100644 --- a/rendercv/templates/classic/classic.tex.j2 +++ b/rendercv/templates/classic.tex.j2 @@ -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=<>, % seperation between body and page edge from the top - bottom=<>, % seperation between body and page edge from the bottom - left=<>, % seperation between body and page edge from the left - right=<>, % 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}{<>} % define primary color -\usepackage{enumitem} % for customizing lists -\usepackage{fontawesome5} % for using icons -\usepackage[ - pdftitle={<>'s CV}, - pdfauthor={<>}, - 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: - <> - }{ - % bottom space: - <> - } % 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=<>, - partopsep=0pt, - itemsep=0pt, - after=\vspace*{-\baselineskip}, - leftmargin=<> - ] - }{ - \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} - <> - - \section{Education} - <> - - \section{Work Experience} - <> - - \section{Academic Projects} - <> - - \section{Certificates} - <> - - \section{Skills} - <> - - \section{Test Scores} - <> - - \section{Personal Projects} - <> - - \section{Extracurricular Activities} - <> - +((# 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=<>, % seperation between body and page edge from the top + bottom=<>, % seperation between body and page edge from the bottom + left=<>, % seperation between body and page edge from the left + right=<>, % 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}{<>} % define primary color +\usepackage{enumitem} % for customizing lists +\usepackage{fontawesome5} % for using icons +\usepackage[ + pdftitle={<>'s CV}, + pdfauthor={<>}, + 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: + <> + }{ + % bottom space: + <> + } % 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=<>, + partopsep=0pt, + itemsep=0pt, + after=\vspace*{-\baselineskip}, + leftmargin=<> + ] + }{ + \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} + <> + + \section{Education} + <> + + \section{Work Experience} + <> + + \section{Academic Projects} + <> + + \section{Certificates} + <> + + \section{Skills} + <> + + \section{Test Scores} + <> + + \section{Personal Projects} + <> + + \section{Extracurricular Activities} + <> + \end{document} \ No newline at end of file diff --git a/rendercv/templates/classic/components/date_and_location_strings.tex.j2 b/rendercv/templates/components/classic/date_and_location_strings.tex.j2 similarity index 90% rename from rendercv/templates/classic/components/date_and_location_strings.tex.j2 rename to rendercv/templates/components/classic/date_and_location_strings.tex.j2 index bc0d0a7..0308348 100644 --- a/rendercv/templates/classic/components/date_and_location_strings.tex.j2 +++ b/rendercv/templates/components/classic/date_and_location_strings.tex.j2 @@ -1,9 +1,9 @@ -((* macro date_and_location_strings(date_and_location_strings) *)) - ((* for item in date_and_location_strings *)) - ((* if loop.last *)) -<> - ((* else *)) -<>\newline - ((* endif *)) - ((* endfor *)) +((* macro date_and_location_strings(date_and_location_strings) *)) + ((* for item in date_and_location_strings *)) + ((* if loop.last *)) +<> + ((* else *)) +<>\newline + ((* endif *)) + ((* endfor *)) ((* endmacro *)) \ No newline at end of file diff --git a/rendercv/templates/classic/components/entry.tex.j2 b/rendercv/templates/components/classic/entry.tex.j2 similarity index 82% rename from rendercv/templates/classic/components/entry.tex.j2 rename to rendercv/templates/components/classic/entry.tex.j2 index e3627f8..b7d19a1 100644 --- a/rendercv/templates/classic/components/entry.tex.j2 +++ b/rendercv/templates/components/classic/entry.tex.j2 @@ -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{<>}; constant width ragged right column #)) \begin{tabularx}{\textwidth}{X R{<>}} ((* 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{<>}, <> ((* else *)) \textbf{<>}, <> @@ -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{<>}; 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{<>:} <
> (<>) ((* else *)) \textbf{<>:} <
> (<>) diff --git a/rendercv/templates/classic/components/header.tex.j2 b/rendercv/templates/components/classic/header.tex.j2 similarity index 73% rename from rendercv/templates/classic/components/header.tex.j2 rename to rendercv/templates/components/classic/header.tex.j2 index 5952510..e0542db 100644 --- a/rendercv/templates/classic/components/header.tex.j2 +++ b/rendercv/templates/components/classic/header.tex.j2 @@ -1,15 +1,15 @@ -((* import "components/header_connections.tex.j2" as print_connections *)) -((* macro header(name, connections) *)) -\begin{header} - \Huge - \textbf{<>} - - \normalsize -((* for connection in connections *)) - <> - ((* 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{<>} + + \normalsize +((* for connection in connections *)) + <> + ((* if not loop.last *)) + \hspace{0.5cm} + ((* endif *)) +((* endfor *)) +\end{header} ((* endmacro *)) \ No newline at end of file diff --git a/rendercv/templates/classic/components/header_connections.tex.j2 b/rendercv/templates/components/classic/header_connections.tex.j2 similarity index 99% rename from rendercv/templates/classic/components/header_connections.tex.j2 rename to rendercv/templates/components/classic/header_connections.tex.j2 index 396a459..2c6df99 100644 --- a/rendercv/templates/classic/components/header_connections.tex.j2 +++ b/rendercv/templates/components/classic/header_connections.tex.j2 @@ -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/<>}{{\small\faLinkedinIn}\hspace{0.13cm}<>}((* endmacro *)) -((* macro GitHub(username) *))\href{https://www.github.com/<>}{{\small\faGithub}\hspace{0.13cm}<>}((* endmacro *)) -((* macro Instagram(username) *))\href{https://www.instagram.com/<>}{{\small\faInstagram}\hspace{0.13cm}<>}((* endmacro *)) -((* macro phone(number) *)){\footnotesize\faPhone*}\hspace{0.13cm}<>((* endmacro *)) -((* macro email(email) *))\href{mailto:<>}{{\small\faEnvelope[regular]}\hspace{0.13cm}<>}((* endmacro *)) -((* macro website(url) *))\href{<>}{{\small\faLink}\hspace{0.13cm}<>}((* endmacro *)) - +((# Each macro in here is a link with an icon for header. #)) +((* macro LinkedIn(username) *))\href{https://www.linkedin.com/in/<>}{{\small\faLinkedinIn}\hspace{0.13cm}<>}((* endmacro *)) +((* macro GitHub(username) *))\href{https://www.github.com/<>}{{\small\faGithub}\hspace{0.13cm}<>}((* endmacro *)) +((* macro Instagram(username) *))\href{https://www.instagram.com/<>}{{\small\faInstagram}\hspace{0.13cm}<>}((* endmacro *)) +((* macro phone(number) *)){\footnotesize\faPhone*}\hspace{0.13cm}<>((* endmacro *)) +((* macro email(email) *))\href{mailto:<>}{{\small\faEnvelope[regular]}\hspace{0.13cm}<>}((* endmacro *)) +((* macro website(url) *))\href{<>}{{\small\faLink}\hspace{0.13cm}<>}((* endmacro *)) + diff --git a/rendercv/templates/classic/components/highlights.tex.j2 b/rendercv/templates/components/classic/highlights.tex.j2 similarity index 90% rename from rendercv/templates/classic/components/highlights.tex.j2 rename to rendercv/templates/components/classic/highlights.tex.j2 index e77d5da..536a024 100644 --- a/rendercv/templates/classic/components/highlights.tex.j2 +++ b/rendercv/templates/components/classic/highlights.tex.j2 @@ -1,8 +1,8 @@ -((* macro highlights(highlights) *)) -\vspace{<>} -\begin{highlights} -((* for item in highlights *)) - \item <> -((* endfor *)) -\end{highlights} +((* macro highlights(highlights) *)) +\vspace{<>} +\begin{highlights} +((* for item in highlights *)) + \item <> +((* endfor *)) +\end{highlights} ((* endmacro *)) \ No newline at end of file diff --git a/rendercv/templates/classic/components/section_contents.tex.j2 b/rendercv/templates/components/classic/section_contents.tex.j2 similarity index 87% rename from rendercv/templates/classic/components/section_contents.tex.j2 rename to rendercv/templates/components/classic/section_contents.tex.j2 index dd016ec..f1aea28 100644 --- a/rendercv/templates/classic/components/section_contents.tex.j2 +++ b/rendercv/templates/components/classic/section_contents.tex.j2 @@ -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" *)) <> ((* endif *)) ((* if not loop.last *))