comparison docs/_latex/my-doc-style.sty @ 776:48deafc1fd2f

Use the new implementations of my-doc-fonts.sty and my-doc-style.sty. Changed titlepage to contain build date the VCS revision. Needed some conf.py variable changes: today is now the logical date (revision date) and today is the build date.
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 16 May 2026 01:52:49 +0200
parents
children 47ae57d92ed3
comparison
equal deleted inserted replaced
775:ac7e98fe3e14 776:48deafc1fd2f
1 % -*- coding: utf-8 -*-
2 %
3 % Some font hacks for my Sphinx PDF documents
4 %
5 \NeedsTeXFormat{LaTeX2e}
6 \ProvidesPackage{my-doc-style}[%
7 2026/05/15 v0.2 (Franz Glasner) Some style customizations (title et al.)]
8 \RequirePackage{xkeyval}
9
10 % A key compatible with options processing but bool (because DeclareBoolOptionX)
11 % If given than the Sphinx standard titlepage is used without changes.
12 \define@boolkey{my-doc-style.sty}{stdtitle}[true]{}
13
14 \ExecuteOptionsX{stdtitle=false}
15 \ProcessOptionsX\relax
16
17 %
18 % For the title page: "Last updated on ..."
19 %
20 \DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}}
21 \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}}
22 \vcsrevision{}
23 \builddate{}
24 %
25 % If the option "stdtitle" was not enabled augment the titlepage with
26 % the documentation build date and the VCS revision id.
27 %
28 \csname ifKV@my-doc-style.sty@stdtitle\endcsname
29 \relax
30 \else
31 % \sphinxmaketitle calls the macro \@thanks: abuse this
32 \gdef\@thanks{%
33 \ifx\mds@builddate\@empty\relax%
34 \ifx\mds@vcs@revision\@empty\relax%
35 \else%
36 \hfill\normalsize\textsf{(rv:\mds@vcs@revision )}%
37 \fi%
38 \else%
39 \hfill\normalsize\textsf{Last updated on \mds@builddate%
40 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rv:\mds@vcs@revision )\fi}
41 \fi%
42 }
43 \fi
44
45 \endinput