upgrade templates of the classic theme

This commit is contained in:
Sina Atalay 2024-01-30 19:48:10 +01:00
parent d5f37e9cdc
commit b9c7523fac
9 changed files with 303 additions and 0 deletions

View File

@ -0,0 +1,39 @@
((# \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: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# third column: R{<<design.date_and_location_width>>}; constant widthm ragged right column #))
\begin{tabularx}{
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
}{
L{0.85cm}
K{<<design.margins.entry_area.left_and_right>>}
R{<<design.date_and_location_width>>}
}
\textbf{<<entry.study_type>>}
&
\textbf{<<entry.institution>>}, <<entry.area>>
\vspace{<<design.margins.highlights_area.top>>}
((* for item in entry.highlights *))
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))
&
((*set date_and_location_strings = [entry.location, entry.date_string, entry.time_span_string]*))
((* for item in date_and_location_strings *))
((* if loop.last *))
<<item>>
((* else *))
<<item>> \newline
((* endif *))
((* endfor *))
\end{tabularx}

View File

@ -0,0 +1,35 @@
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
((# width: \textwidth #))
((# preamble: first column, second column #))
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
\begin{tabularx}{
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
}{
K{<<design.margins.entry_area.left_and_right>>}
R{<<design.date_and_location_width>>}
}
\textbf{<<entry.company>>}, <<entry.position>>
\vspace{<<design.margins.highlights_area.top>>}
((* for item in entry.highlights *))
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))
&
((*set date_and_location_strings = [entry.location, entry.date_string, entry.time_span_string]*))
((* for item in date_and_location_strings *))
((* if loop.last *))
<<item>>
((* else *))
<<item>> \newline
((* endif *))
((* endfor *))
\end{tabularx}

View File

@ -0,0 +1,40 @@
\begin{header}
\fontsize{<<design.header_font_size>>}{<<design.header_font_size>>}
\textbf{<<cv.name>>}
\vspace{<<design.margins.header.vertical_between_name_and_connections>>}
\normalsize
((* if cv.phone *))
\mbox{\hrefWithoutArrow{<<cv.phone|replace("-","")>>}{{\footnotesize\faPhone*}\hspace{0.13cm}<<cv.phone|replace("tel:", "")|replace("-"," ")>>}}
\hspace{0.5cm}
((* endif *))
((* if cv.email *))
\mbox{\hrefWithoutArrow{mailto:<<cv.email>>}{{\small\faEnvelope[regular]}\hspace{0.13cm}<<cv.email>>}}
\hspace{0.5cm}
((* endif *))
((* if cv.location *))
\mbox{{\small\faMapMarker*}\hspace{0.13cm}<<cv.location>>}
\hspace{0.5cm}
((* endif *))
((* if cv.website *))
\mbox{\hrefWithoutArrow{<<cv.website>>}{{\small\faLink}\hspace{0.13cm}<<cv.website|replace("https://","")|replace("/","")>>}}
\hspace{0.5cm}
((* endif *))
((*
set icon_dictionary = {
"LinkedIn": "\\faLinkedinIn",
"GitHub": "\\faGithub",
"Instagram": "\\faInstagram",
"Orcid": "\\faOrcid",
"Mastodon": "\\faMastodon",
}
*))
((* for network in cv.social_networks *))
\mbox{\hrefWithoutArrow{network.url}{{\small<<icon_dictionary[network.network]>>}\hspace{0.13cm}<<network.username>>}}
\hspace{0.5cm}
((* endfor *))
\end{header}
\vspace{<<design.margins.header.bottom>>}

View File

@ -0,0 +1,35 @@
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
((# width: \textwidth #))
((# preamble: first column, second column #))
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
\begin{tabularx}{
\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm
}{
K{<<design.margins.entry_area.left_and_right>>}
R{<<design.date_and_location_width>>}
}
\textbf{<<entry.name>>}
\vspace{<<design.margins.highlights_area.top>>}
((* for item in entry.highlights *))
((* if loop.first *))
\begin{highlights}
((* endif *))
\item <<item>>
((* if loop.last *))
\end{highlights}
((* endif *))
((* endfor *))
&
((*set date_and_location_strings = [entry.location, entry.date_string, entry.time_span_string]*))
((* for item in date_and_location_strings *))
((* if loop.last *))
<<item>>
((* else *))
<<item>> \newline
((* endif *))
((* endfor *))
\end{tabularx}

View File

@ -0,0 +1,7 @@
\begingroup((* if design.text_alignment == "left-aligned" *))\raggedright((* endif *))
\leftskip=<<design.margins.entry_area.left_and_right>>
\advance\csname @rightskip\endcsname <<design.margins.entry_area.left_and_right>>
\advance\rightskip <<design.margins.entry_area.left_and_right>>
\textbf{<<entry.name>>:} <<entry.details>> ((* if entry.url *)) (\href{<<entry.url>>}{<<entry.url_text>>}) ((* endif *))
\par\endgroup

View File

@ -0,0 +1,126 @@
\documentclass[<<design.font_size>>, <<design.page_size>>]{article}
% Packages:
\usepackage[
ignoreheadfoot, % set margins without considering header and footer
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{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[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
\usepackage[pscoord]{eso-pic} % for floating text on the page
\usepackage{calc} % for calculating lengths
\usepackage{bookmark} % for bookmarks
\usepackage{lastpage} % for getting the total number of pages
% 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 #))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle
\patchcmd{\ps@customFooterStyle}{\thepage}{
\color{gray}\textit{\small <<cv.name>> | Page \thepage{} of \pageref*{LastPage}}
}{}{} % replace number by desired string
\makeatother
\pagestyle{customFooterStyle}
\setmainfont{<<design.font>>}[
Path= fonts/,
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic
]
\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]\hspace{-0.1cm}
}[] % section title formatting
\titlespacing{\section}{
% left space:
0pt
}{
% top space:
<<design.margins.section_title.top>>
}{
% bottom space:
<<design.margins.section_title.bottom>>
} % 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
((* if design.text_alignment == "justified" *))
\newcolumntype{K}[1]{
>{\let\newline\\\arraybackslash\hspace{0pt}}X
} % justified flexible width column type
((* elif design.text_alignment == "left-aligned" *))
\newcolumntype{K}[1]{
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}X
} % left-aligned flexible width column type
((* endif *))
\setlength\tabcolsep{-1.5pt} % no space between columns
\newenvironment{highlights}{
\begin{itemize}[
topsep=0pt,
parsep=<<design.margins.highlights_area.vertical_between_bullet_points>>,
partopsep=0pt,
itemsep=0pt,
after=\vspace{-1\baselineskip},
leftmargin=<<design.margins.highlights_area.left>> + 3pt
]
}{
\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{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>}
\AddToShipoutPictureFG*{% Add <stuff> to current page foreground
\put(
\LenToUnit{\paperwidth-<<design.margins.page.right>>-<<design.margins.entry_area.left_and_right>>+0.05cm},
\LenToUnit{\paperheight-<<design.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\textit{Last updated in <<today>>}\hspace{\widthof{Last updated in <<today>>}}
}}}%
}%
}%
% save the original href command in a new command:
\let\hrefWithoutArrow\href
% new command for external links:
\renewcommand{\href}[2]{\hrefWithoutArrow{#1}{#2 \raisebox{.15ex}{\footnotesize \faExternalLink*}}}

View File

@ -0,0 +1,19 @@
((# \begin{tabularx}{⟨width⟩}[⟨pos⟩]{⟨preamble⟩} #))
((# width: \textwidth #))
((# preamble: first column, second column #))
((# first column:: K{<<design.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# second column: R{<<design.date_and_location_width>>}; constant width ragged right column #))
\begin{tabularx}{\textwidth-<<design.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm}{K{<<design.margins.entry_area.left_and_right>>} R{<<design.date_and_location_width>>}}
\textbf{<<title>>}
\vspace{<<design.margins.highlights_area.vertical_between_bullet_points>>}
<<entry.authors|map("abbreviate_name")|map("make_it_nolinebreak")|join(", ")|make_it_bold(cv.name|abbreviate_name)|make_it_italic(cv.name|abbreviate_name)>>
\vspace{<<design.margins.highlights_area.vertical_between_bullet_points>>}
\href{<<entry.doi_url>>}{<<entry.doi>>} (<<entry.journal>>)
&
<<entry.date_string>>
\end{tabularx}

View File

@ -0,0 +1 @@
\section{<<section_title>>}

View File

@ -0,0 +1 @@
<<entry>>