Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/_latex/my-doc-style.sty @ 216:8ef73270beae
Make my-doc-style.sty more flexible by providing the "stdtitle" option to switch off the customized titlepage content
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 15 May 2026 14:34:11 +0200 |
| parents | d470250f8451 |
| children | 3777eb7dbf4a |
comparison
equal
deleted
inserted
replaced
| 215:0d6eb4209714 | 216:8ef73270beae |
|---|---|
| 3 % Some font hacks for my Sphinx PDF documents | 3 % Some font hacks for my Sphinx PDF documents |
| 4 % | 4 % |
| 5 \NeedsTeXFormat{LaTeX2e} | 5 \NeedsTeXFormat{LaTeX2e} |
| 6 \ProvidesPackage{my-doc-style}[% | 6 \ProvidesPackage{my-doc-style}[% |
| 7 2026/05/14 v0.1 (Franz Glasner) Some style customizations] | 7 2026/05/14 v0.1 (Franz Glasner) Some style customizations] |
| 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 | |
| 8 | 16 |
| 9 % | 17 % |
| 10 % For the title page: "Last updated on ..." | 18 % For the title page: "Last updated on ..." |
| 11 % | 19 % |
| 12 \DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}} | 20 \DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}} |
| 13 \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}} | 21 \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}} |
| 14 \vcsrevision{} | 22 \vcsrevision{} |
| 15 \builddate{} | 23 \builddate{} |
| 16 % \sphinxmaketitle references \@thanks: abuse this | 24 % |
| 17 \gdef\@thanks{% | 25 % If the option "stdtitle" was not enabled augment the titlepage with |
| 18 \ifx\mds@builddate\@empty\relax% | 26 % the documentation build date and the VCS revision id. |
| 19 \else% | 27 % |
| 20 \hfill\normalsize\textsf{Last updated on \mds@builddate% | 28 \csname ifKV@my-doc-style.sty@stdtitle\endcsname |
| 21 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rv:\mds@vcs@revision )\fi} | 29 \relax |
| 22 \fi | 30 \else |
| 23 } | 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 | |
| 24 \endinput | 45 \endinput |
