sb2nov: implement `last_updated_date_style` option

This commit is contained in:
Sina Atalay 2024-04-08 19:27:12 +00:00 committed by GitHub
parent e0d441c5a7
commit 1464b503e4
1 changed files with 15 additions and 12 deletions

View File

@ -7,14 +7,14 @@
\documentclass[<<design.font_size>>, <<design.page_size>>]{article}
\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
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{latexsym}
\usepackage[nobottomtitles*]{titlesec}
\usepackage{marvosym}
@ -23,9 +23,9 @@
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[
hidelinks,
pdftitle={<<cv.name>>'s CV},
pdfauthor={<<cv.name>>}
hidelinks,
pdftitle={<<cv.name>>'s CV},
pdfauthor={<<cv.name>>}
]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
@ -93,13 +93,16 @@
%-------------------------
% Custom commands
((* set last_updated_date_style_placeholders = {
"TODAY": today,
} *))
\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>>}}
\small\color{gray}\textit{<<design.last_updated_date_style|replace_placeholders_with_actual_values(last_updated_date_style_placeholders)>>}\hspace{\widthof{<<design.last_updated_date_style|replace_placeholders_with_actual_values(last_updated_date_style_placeholders)>>}}
}}}%
}%
}%