improve templates

This commit is contained in:
Sina Atalay 2024-02-17 18:46:19 +01:00
parent 079cb1cf5b
commit 3c661af49c
3 changed files with 35 additions and 4 deletions

View File

@ -38,10 +38,15 @@
((* if disable_page_numbering *))
\pagenumbering{gobble} % no page numbering
((* endif *))
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\thepage",
"TOTAL_PAGES": "\pageref*{LastPage}"
} *))
\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}}
\color{gray}\textit{\small <<design.page_numbering_style|replace_placeholders_with_actual_values(page_numbering_style_placeholders)>>}
}{}{} % replace number by desired string
\makeatother
\pagestyle{customFooterStyle}

View File

@ -1,6 +1,10 @@
((* if design.show_last_updated_date *))
\placelastupdatedtext
((* endif *))
{
\centering
\textbf{\fontsize{<<design.header_font_size>>}{<<design.header_font_size>>}\scshape <<cv.name>>} \\ \vspace{3pt}
\textbf{\fontsize{<<design.header_font_size>>}{<<design.header_font_size>>}\selectfont <<cv.name>>} \\ \vspace{3pt}
\small
\vspace{<<design.margins.header.vertical_between_name_and_connections>>}

View File

@ -16,7 +16,7 @@
% showframe % for debugging
]{geometry} % for adjusting page geometry
\usepackage{latexsym}
\usepackage{titlesec}
\usepackage[nobottomtitles*]{titlesec}
\usepackage{marvosym}
\usepackage{verbatim}
\usepackage{setspace}
@ -29,11 +29,22 @@
\usepackage{ifthen}
\usepackage{fontawesome5}
\usepackage{calc} % for calculating lengths
\usepackage[pscoord]{eso-pic} % for floating text on the page
\usepackage{lastpage} % for getting the total number of pages
\input{glyphtounicode}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
((* if disable_page_numbering *))
\pagenumbering{} % no page numbering
((* else *))
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\\thepage{}",
"TOTAL_PAGES": "\pageref*{LastPage}"
} *))
\fancyfoot[CO]{\color{gray}\textit{\small <<design.page_numbering_style|replace_placeholders_with_actual_values(page_numbering_style_placeholders)>>}}
((* endif *))
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
@ -76,6 +87,17 @@
%-------------------------
% Custom commands
\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>>}}
}}}%
}%
}%
\newcommand{\resumeItem}[2]{
\item\small{
\ifthenelse{\equal{#1}{}}{#2}{\textbf{#1}{: #2}}