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

@ -93,13 +93,16 @@
%------------------------- %-------------------------
% Custom commands % Custom commands
((* set last_updated_date_style_placeholders = {
"TODAY": today,
} *))
\newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>} \newcommand{\placelastupdatedtext}{% \placetextbox{<horizontal pos>}{<vertical pos>}{<stuff>}
\AddToShipoutPictureFG*{% Add <stuff> to current page foreground \AddToShipoutPictureFG*{% Add <stuff> to current page foreground
\put( \put(
\LenToUnit{\paperwidth-<<design.margins.page.right>>-<<design.margins.entry_area.left_and_right>>+0.05cm}, \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)>>} \LenToUnit{\paperheight-<<design.margins.page.top|divide_length_by(2)>>}
){\vtop{{\null}\makebox[0pt][c]{ ){\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)>>}}
}}}% }}}%
}% }%
}% }%