themes: allow TODAY placeholder in `page_numbering_style`

This commit is contained in:
Sina Atalay 2024-06-20 15:56:09 +03:00
parent c8f33e9553
commit 93d2b3db4e
4 changed files with 11 additions and 7 deletions

View File

@ -242,10 +242,11 @@ class ThemeOptions(pydantic.BaseModel):
default="NAME - Page PAGE_NUMBER of TOTAL_PAGES",
title="Page Numbering Style",
description=(
"The style of the page numbering. The following placeholders can be used:"
"\n- NAME: The name of the person\n- PAGE_NUMBER: The current page number"
"\n- TOTAL_PAGES: The total number of pages\nThe default value is"
" NAME - Page PAGE_NUMBER of TOTAL_PAGES."
"The style of the page numbering. The following placeholders can be"
" used:\n- NAME: The name of the person\n- PAGE_NUMBER: The current page"
" number\n- TOTAL_PAGES: The total number of pages\n- TODAY: Today's month"
" and year (April 2024)\nThe default value is NAME - Page PAGE_NUMBER of"
" TOTAL_PAGES."
),
)
disable_last_updated_date: bool = pydantic.Field(

View File

@ -75,7 +75,8 @@
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\\thepage{}",
"TOTAL_PAGES": "\pageref*{LastPage}"
"TOTAL_PAGES": "\pageref*{LastPage}",
"TODAY": today
} *))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle

View File

@ -75,7 +75,8 @@
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\\thepage{}",
"TOTAL_PAGES": "\pageref*{LastPage}"
"TOTAL_PAGES": "\pageref*{LastPage}",
"TODAY": today
} *))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle

View File

@ -75,7 +75,8 @@
((* set page_numbering_style_placeholders = {
"NAME": cv.name,
"PAGE_NUMBER": "\\thepage{}",
"TOTAL_PAGES": "\pageref*{LastPage}"
"TOTAL_PAGES": "\pageref*{LastPage}",
"TODAY": today
} *))
\makeatletter
\let\ps@customFooterStyle\ps@plain % Copy the plain style to customFooterStyle