From acb8cfdd755557ea3496a8db4099ba26ffefc70f Mon Sep 17 00:00:00 2001 From: Shengjiang Quan Date: Sun, 30 Jul 2023 22:28:04 +0900 Subject: [PATCH] option to show page num in currentPage/totalPage Signed-off-by: Shengjiang Quan --- awesome-cv.cls | 2 ++ examples/cv.tex | 6 +++++- examples/resume.tex | 6 +++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/awesome-cv.cls b/awesome-cv.cls index 961410e..cecf514 100644 --- a/awesome-cv.cls +++ b/awesome-cv.cls @@ -92,6 +92,8 @@ } % Solves issues Warning: File `cv.out' has changed \RequirePackage{bookmark} +% Use \pageref{LastPage} to get the number of total pages +\RequirePackage{lastpage} %------------------------------------------------------------------------------- % Configuration for directory locations diff --git a/examples/cv.tex b/examples/cv.tex index d055f79..4e6251e 100644 --- a/examples/cv.tex +++ b/examples/cv.tex @@ -44,6 +44,10 @@ % If you would like to change the social information separator from a pipe (|) to something else \renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} +\newtoggle{showpagetotal} +% toggle the boolean flag if you would like to use / page number +% \toggletrue{showpagetotal}% Need to compile twice +\togglefalse{showpagetotal} %------------------------------------------------------------------------------- % PERSONAL INFORMATION @@ -88,7 +92,7 @@ \makecvfooter {\today} {Claud D. Park~~~·~~~Curriculum Vitae} - {\thepage} + {\iftoggle{showpagetotal}{\thepage/\pageref*{LastPage}}{\thepage}} %------------------------------------------------------------------------------- diff --git a/examples/resume.tex b/examples/resume.tex index 415dcea..8fc5679 100644 --- a/examples/resume.tex +++ b/examples/resume.tex @@ -44,6 +44,10 @@ % If you would like to change the social information separator from a pipe (|) to something else \renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} +\newtoggle{showpagetotal} +% toggle the boolean flag if you would like to use / page number +% \toggletrue{showpagetotal}% Need to compile twice +\togglefalse{showpagetotal} %------------------------------------------------------------------------------- % PERSONAL INFORMATION @@ -88,7 +92,7 @@ \makecvfooter {\today} {Byungjin Park~~~·~~~Résumé} - {\thepage} + {\iftoggle{showpagetotal}{\thepage/\pageref*{LastPage}}{\thepage}} %-------------------------------------------------------------------------------