add page numbering

This commit is contained in:
Sina Atalay 2023-11-17 18:50:47 +01:00
parent 72a8acfa96
commit 7cbfe6cace
1 changed files with 13 additions and 4 deletions

View File

@ -11,7 +11,8 @@
bottom=<<theme_options.margins.page.bottom>>, % seperation between body and page edge from the bottom bottom=<<theme_options.margins.page.bottom>>, % seperation between body and page edge from the bottom
left=<<theme_options.margins.page.left>>, % seperation between body and page edge from the left left=<<theme_options.margins.page.left>>, % seperation between body and page edge from the left
right=<<theme_options.margins.page.right>>, % seperation between body and page edge from the right right=<<theme_options.margins.page.right>>, % seperation between body and page edge from the right
% showframe % for debugging footskip=<<theme_options.margins.page.bottom|divide_length_by(2)>>, % seperation between body and footer
% showframe % for debugging
]{geometry} % for adjusting page geometry ]{geometry} % for adjusting page geometry
\usepackage{fontspec} % for loading fonts \usepackage{fontspec} % for loading fonts
\usepackage[explicit]{titlesec} % for customizing section titles \usepackage[explicit]{titlesec} % for customizing section titles
@ -29,14 +30,22 @@
]{hyperref} % for links, metadata and bookmarks ]{hyperref} % for links, metadata and bookmarks
\usepackage[pscoord]{eso-pic} % for floating text on the page \usepackage[pscoord]{eso-pic} % for floating text on the page
\usepackage{calc} % for calculating lengths \usepackage{calc} % for calculating lengths
\usepackage{bookmark} % for bookmarks
\usepackage{lastpage} % for getting the total number of pages
% Some settings: % Some settings:
\pagestyle{empty} % no header or footer \pagestyle{empty} % no header or footer
\setcounter{secnumdepth}{0} % no section numbering \setcounter{secnumdepth}{0} % no section numbering
\setlength{\parindent}{0pt} % no indentation \setlength{\parindent}{0pt} % no indentation
\setlength{\topskip}{0pt} % no top skip \setlength{\topskip}{0pt} % no top skip
\pagenumbering{gobble} % no page numbering ((# \pagenumbering{gobble} % no page numbering #))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle
\patchcmd{\ps@customFooterStyle}{\thepage}{
\color{gray}\textit{<<cv.name>> | Page \thepage{} of \pageref*{LastPage}}
}{}{} % replace number by desired string
\makeatother
\pagestyle{customFooterStyle}
\setmainfont{<<design.font>>}[ \setmainfont{<<design.font>>}[
Path= fonts/, Path= fonts/,
@ -105,7 +114,7 @@
\LenToUnit{\paperwidth-<<theme_options.margins.page.right>>-<<theme_options.margins.entry_area.left_and_right>>+0.05cm}, \LenToUnit{\paperwidth-<<theme_options.margins.page.right>>-<<theme_options.margins.entry_area.left_and_right>>+0.05cm},
\LenToUnit{\paperheight-<<theme_options.margins.page.top|divide_length_by(2)>>} \LenToUnit{\paperheight-<<theme_options.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{ ){\vtop{{\null}\makebox[0pt][c]{
\small\color{gray}\emph{Last updated on <<today>>}\hspace{\widthof{Last updated on <<today>>}} \small\color{gray}\textit{Last updated on <<today>>}\hspace{\widthof{Last updated on <<today>>}}
}}}% }}}%
}% }%
}% }%