Mercurial > hgrepos > Python > libs > ConfigMix
diff 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 |
line wrap: on
line diff
--- a/docs/_latex/my-doc-style.sty Wed May 20 12:57:36 2026 +0200 +++ b/docs/_latex/my-doc-style.sty Tue Jun 02 12:35:24 2026 +0200 @@ -1,13 +1,27 @@ % -*- coding: utf-8 -*- % SPDX-FileCopyrightText: © 2026 Franz Glasner -% SPDX-License-Identifier: BSD-3-Clause +% SPDX-License-Identifier: BSD-3-Clause OR MIT +% +% Some font hacks for my Sphinx PDF documents. % -% Some font hacks for my Sphinx PDF documents +% Options: +% - stdtitle=<bool>: Use the Sphinx standard title when `true' or an +% augmented title (build date, VCS revision id). +% Default: false. +% +% Commands: +% - \vcsrevision#1 +% - \builddate#1 +% - \SuppressSectionNumbering +% - \SuppressSubsectionNumbering +% - \SuppressSubsubsectionNumbering +% - \EndSuppressNumbering % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{my-doc-style}[% - 2026/05/17 v0.3.1 (Franz Glasner) Some style customizations (title et al.)] + 2026/06/02 rv:c7ae4cfc2c5c (Franz Glasner) Some style customizations (title et al.)] \RequirePackage{xkeyval} +\RequirePackage{hologo} % A key compatible with options processing but bool (because DeclareBoolOptionX) % If given than the Sphinx standard titlepage is used without changes. @@ -30,7 +44,7 @@ \csname ifKV@my-doc-style.sty@stdtitle\endcsname \relax \else - % \sphinxmaketitle calls the macro \@thanks: abuse this + % \sphinxmaketitle calls the macro \@thanks: (ab)use this \gdef\@thanks{% \ifx\mds@builddate\@empty\relax% \ifx\mds@vcs@revision\@empty\relax% @@ -102,4 +116,25 @@ \endgroup } +% +% For SmallCaps support and/or custom reST roles: +% see also: https://docutils.sourceforge.io/docs/user/latex.html +% + +% +% SmallCaps role support (:smallcaps:). +% Here without argument declaration because \textsc +% expects one and will consume it instead. +% +\newcommand{\DUrolesmallcaps}{\textsc} + +% Testing sans serif fonts with ":textsf:" role +% Here without argument declaration because \textsf +% expects one and will consume it instead. +\newcommand{\DUroletextsf}{\textsf} + + +% TeX logos using hologo +\newcommand*{\DUrolehologo}{\hologo} + \endinput
