diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/_latex/my-doc-style.sty	Sat May 16 01:52:49 2026 +0200
@@ -0,0 +1,45 @@
+% -*- coding: utf-8 -*-
+%
+% Some font hacks for my Sphinx PDF documents
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{my-doc-style}[%
+  2026/05/15 v0.2 (Franz Glasner) Some style customizations (title et al.)]
+\RequirePackage{xkeyval}
+
+% A key compatible with options processing but bool (because DeclareBoolOptionX)
+% If given than the Sphinx standard titlepage is used without changes.
+\define@boolkey{my-doc-style.sty}{stdtitle}[true]{}
+
+\ExecuteOptionsX{stdtitle=false}
+\ProcessOptionsX\relax
+
+%
+% For the title page: "Last updated on ..."
+%
+\DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}}
+\DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}}
+\vcsrevision{}
+\builddate{}
+%
+% If the option "stdtitle" was not enabled augment the titlepage with
+% the documentation build date and the VCS revision id.
+%
+\csname ifKV@my-doc-style.sty@stdtitle\endcsname
+  \relax
+\else
+  % \sphinxmaketitle calls the macro \@thanks: abuse this
+  \gdef\@thanks{%
+    \ifx\mds@builddate\@empty\relax%
+      \ifx\mds@vcs@revision\@empty\relax%
+      \else%
+        \hfill\normalsize\textsf{(rv:\mds@vcs@revision )}%
+      \fi%
+    \else%
+      \hfill\normalsize\textsf{Last updated on \mds@builddate%
+      \ifx\mds@vcs@revision\@empty\relax\else\enspace(rv:\mds@vcs@revision )\fi}
+    \fi%
+  }
+\fi
+
+\endinput