improve sb2nov templates

This commit is contained in:
Sina Atalay
2024-02-17 18:08:19 +01:00
parent 873f66c661
commit 8a1ec8b3bd
3 changed files with 60 additions and 45 deletions

View File

@@ -1,22 +1,26 @@
\begin{center}
{
\centering
\textbf{\fontsize{<<design.header_font_size>>}{<<design.header_font_size>>}\scshape <<cv.name>>} \\ \vspace{3pt}
\small
\vspace{<<design.margins.header.vertical_between_name_and_connections>>}
\begin{spacing}{1.6}
((* if cv.phone *))
\mbox{\href{<<cv.phone|replace("-","")>>}{{\footnotesize\faPhone*}\hspace{4pt}<<cv.phone|replace("tel:", "")|replace("-"," ")>>}}
\hspace{<<design.space_between_connection_objects>>}
\hspace{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.email *))
\mbox{\href{mailto:<<cv.email>>}{{\small\faEnvelope[regular]}\hspace{4pt}<<cv.email>>}}
\hspace{<<design.space_between_connection_objects>>}
\hspace{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.location *))
\mbox{{\small\faMapMarker*}\hspace{4pt}<<cv.location>>}
\hspace{<<design.space_between_connection_objects>>}
\hspace{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* if cv.website *))
\mbox{\href{<<cv.website>>}{{\small\faLink}\hspace{4pt}<<cv.website|replace("https://","")|reverse|replace("/", "", 1)|reverse>>}}
\hspace{<<design.space_between_connection_objects>>}
\hspace{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((*
set icon_dictionary = {
@@ -30,13 +34,17 @@
((* for network in cv.social_networks *))
((* if network.network in icon_dictionary *))
\mbox{\href{<<network.url>>}{{\small<<icon_dictionary[network.network]>>}\hspace{4pt}<<network.username>>}}
\hspace{<<design.space_between_connection_objects>>}
\hspace*{<<design.margins.header.horizontal_between_connections>>}
((* endif *))
((* endfor *))
((* endif *))
\end{center}
\end{spacing}
\par
}
\vspace{<<design.margins.header.bottom>>}
% save the original href command in a new command:
\let\hrefWithoutArrow\href
% new command for external links:
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\color{<<design.link_color>>}\mbox{#2 \raisebox{.15ex}{\footnotesize \faExternalLink*}}}}
% new command for external links:
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{\color{primaryColor}\mbox{\ifthenelse{\equal{#2}{}}{}{#2 }\raisebox{.15ex}{\footnotesize \faExternalLink*}}}}

View File

@@ -1,2 +1,5 @@
((* if is_first_entry *))
\vspace{0.08cm}
((* endif *))
\resumeSubItem{<<entry.name>>}
{<<entry.details>>}

View File

@@ -8,26 +8,27 @@
\usepackage[
ignoreheadfoot, % set margins without considering header and footer
top=<<design.margins.top>>, % seperation between body and page edge from the top
bottom=<<design.margins.bottom>>, % seperation between body and page edge from the bottom
left=<<design.margins.left>>, % seperation between body and page edge from the left
right=<<design.margins.right>>, % 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
footskip=<<design.margins.page.bottom|divide_length_by(2)>>, % seperation between body and footer
% showframe % for debugging
]{geometry} % for adjusting page geometry
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{setspace}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{tabularx}
\usepackage{ifthen}
\usepackage{enumitem}
\usepackage{fontawesome5}
\usepackage{calc} % for calculating lengths
\input{glyphtounicode}
\pagestyle{fancy}
@@ -36,68 +37,71 @@
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\definecolor{primaryColor}{RGB}{<<design.color.as_rgb_tuple()|join(", ")>>} % define primary color
\urlstyle{same}
\raggedbottom
\raggedright
\setcounter{secnumdepth}{0} % no section numbering
\setlength{\parindent}{0pt} % no indentation
\setlength{\topskip}{0pt} % no top skip
% \raggedbottom
% \raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}]
\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule]
% Ensure that generate pdf is machine readable/ATS parsable
\pdfgentounicode=1
\setlist{rightmargin=5pt}
\setlist{rightmargin=<<design.margins.entry_area.left_and_right>>}
\newcolumntype{R}[1]{
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}
} % right-aligned fixed width column type
\titlespacing{\section}{
% left space:
0pt
}{
% top space:
<<design.margins.section_title.top>> - 0.1cm
}{
% bottom space:
<<design.margins.section_title.bottom>>
} % section title spacing
%-------------------------
% Custom commands
\newcommand{\resumeItem}[2]{
\item\small{
\ifthenelse{\equal{#1}{}}{#2 \vspace{-2pt}}{\textbf{#1}{: #2 \vspace{-2pt}}}
\ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}}
}
}
% Just in case someone needs a heading that does not need to be in a list
\newcommand{\resumeSubheading}[4]{
\vspace{-1pt}\item
\begin{tabularx}{0.97\textwidth}[t]{X R{<<design.date_and_location_width>>}}
\item
\begin{tabularx}{0.98\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>}[t]{X R{<<design.margins.entry_area.date_and_location_width>>}}
\textbf{#1} & \textit{\small\ifthenelse{\equal{#2}{}}{#4}{#2}} \\
\textit{\small#3} & \textit{\small\ifthenelse{\equal{#2}{}}{}{#4}} \\
\end{tabularx}\vspace{-5pt}
\end{tabularx}
}
\newcommand{\resumeNormalSubheading}[2]{
\vspace{-1pt}\item
\begin{tabularx}{0.97\textwidth}[t]{X R{<<design.date_and_location_width>>}}
\item
\begin{tabularx}{0.97\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>}[t]{X R{<<design.margins.entry_area.date_and_location_width>>}}
\textbf{#1} & \textit{\small #2}
\end{tabularx}\vspace{-5pt}
\end{tabularx}
}
\newcommand{\resumeSubSubheading}[2]{
\begin{tabularx}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
\textit{\small#1} & \textit{\small #2} \\
\end{tabularx}\vspace{-5pt}
}
\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}
\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}}
\renewcommand{\labelitemii}{$\circ$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[left=<<design.margins.entry_area.left_and_right>>, topsep=0pt, parsep=<<design.margins.entry_area.vertical_between>>, partopsep=0pt]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}
\newcommand{\resumeItemListStart}{\vspace{<<design.margins.highlights_area.top>>}\begin{itemize}[left=<<design.margins.highlights_area.left>>, topsep=-<<design.margins.entry_area.vertical_between>>, itemsep=<<design.margins.highlights_area.vertical_between_bullet_points>>, partopsep=0pt]}
\newcommand{\resumeItemListEnd}{\end{itemize}}