Mercurial > hgrepos > Python > libs > ConfigMix
comparison docs/_latex/my-doc-style.sty @ 794:57de2981f589 default tip
Update to the latest Sphinx customizations
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 02 Jun 2026 12:35:24 +0200 |
| parents | 46578f03a7cb |
| children |
comparison
equal
deleted
inserted
replaced
| 793:46578f03a7cb | 794:57de2981f589 |
|---|---|
| 1 % -*- coding: utf-8 -*- | 1 % -*- coding: utf-8 -*- |
| 2 % SPDX-FileCopyrightText: © 2026 Franz Glasner | 2 % SPDX-FileCopyrightText: © 2026 Franz Glasner |
| 3 % SPDX-License-Identifier: BSD-3-Clause | 3 % SPDX-License-Identifier: BSD-3-Clause OR MIT |
| 4 % | 4 % |
| 5 % Some font hacks for my Sphinx PDF documents | 5 % Some font hacks for my Sphinx PDF documents. |
| 6 % | |
| 7 % Options: | |
| 8 % - stdtitle=<bool>: Use the Sphinx standard title when `true' or an | |
| 9 % augmented title (build date, VCS revision id). | |
| 10 % Default: false. | |
| 11 % | |
| 12 % Commands: | |
| 13 % - \vcsrevision#1 | |
| 14 % - \builddate#1 | |
| 15 % - \SuppressSectionNumbering | |
| 16 % - \SuppressSubsectionNumbering | |
| 17 % - \SuppressSubsubsectionNumbering | |
| 18 % - \EndSuppressNumbering | |
| 6 % | 19 % |
| 7 \NeedsTeXFormat{LaTeX2e} | 20 \NeedsTeXFormat{LaTeX2e} |
| 8 \ProvidesPackage{my-doc-style}[% | 21 \ProvidesPackage{my-doc-style}[% |
| 9 2026/05/17 v0.3.1 (Franz Glasner) Some style customizations (title et al.)] | 22 2026/06/02 rv:c7ae4cfc2c5c (Franz Glasner) Some style customizations (title et al.)] |
| 10 \RequirePackage{xkeyval} | 23 \RequirePackage{xkeyval} |
| 24 \RequirePackage{hologo} | |
| 11 | 25 |
| 12 % A key compatible with options processing but bool (because DeclareBoolOptionX) | 26 % A key compatible with options processing but bool (because DeclareBoolOptionX) |
| 13 % If given than the Sphinx standard titlepage is used without changes. | 27 % If given than the Sphinx standard titlepage is used without changes. |
| 14 \define@boolkey{my-doc-style.sty}{stdtitle}[true]{} | 28 \define@boolkey{my-doc-style.sty}{stdtitle}[true]{} |
| 15 | 29 |
| 28 % the documentation build date and the VCS revision id. | 42 % the documentation build date and the VCS revision id. |
| 29 % | 43 % |
| 30 \csname ifKV@my-doc-style.sty@stdtitle\endcsname | 44 \csname ifKV@my-doc-style.sty@stdtitle\endcsname |
| 31 \relax | 45 \relax |
| 32 \else | 46 \else |
| 33 % \sphinxmaketitle calls the macro \@thanks: abuse this | 47 % \sphinxmaketitle calls the macro \@thanks: (ab)use this |
| 34 \gdef\@thanks{% | 48 \gdef\@thanks{% |
| 35 \ifx\mds@builddate\@empty\relax% | 49 \ifx\mds@builddate\@empty\relax% |
| 36 \ifx\mds@vcs@revision\@empty\relax% | 50 \ifx\mds@vcs@revision\@empty\relax% |
| 37 \else% | 51 \else% |
| 38 \hfill\normalsize\textsf{(rev\ \mds@vcs@revision )}% | 52 \hfill\normalsize\textsf{(rev\ \mds@vcs@revision )}% |
| 100 % Reset the tocdepth to the previous value | 114 % Reset the tocdepth to the previous value |
| 101 \addtocontents{toc}{\setcounter{tocdepth}{\the@mds@stored@tocdepth}}% Default | 115 \addtocontents{toc}{\setcounter{tocdepth}{\the@mds@stored@tocdepth}}% Default |
| 102 \endgroup | 116 \endgroup |
| 103 } | 117 } |
| 104 | 118 |
| 119 % | |
| 120 % For SmallCaps support and/or custom reST roles: | |
| 121 % see also: https://docutils.sourceforge.io/docs/user/latex.html | |
| 122 % | |
| 123 | |
| 124 % | |
| 125 % SmallCaps role support (:smallcaps:). | |
| 126 % Here without argument declaration because \textsc | |
| 127 % expects one and will consume it instead. | |
| 128 % | |
| 129 \newcommand{\DUrolesmallcaps}{\textsc} | |
| 130 | |
| 131 % Testing sans serif fonts with ":textsf:" role | |
| 132 % Here without argument declaration because \textsf | |
| 133 % expects one and will consume it instead. | |
| 134 \newcommand{\DUroletextsf}{\textsf} | |
| 135 | |
| 136 | |
| 137 % TeX logos using hologo | |
| 138 \newcommand*{\DUrolehologo}{\hologo} | |
| 139 | |
| 105 \endinput | 140 \endinput |
