Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/_latex/my-doc-style.sty @ 299:11f4f4d2ec03 default tip
Update to latest Sphinx customizations
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 06 Jun 2026 12:12:06 +0200 |
| parents | 0052d12ec437 |
| children |
comparison
equal
deleted
inserted
replaced
| 298:0052d12ec437 | 299:11f4f4d2ec03 |
|---|---|
| 17 % - \SuppressSubsubsectionNumbering | 17 % - \SuppressSubsubsectionNumbering |
| 18 % - \EndSuppressNumbering | 18 % - \EndSuppressNumbering |
| 19 % | 19 % |
| 20 \NeedsTeXFormat{LaTeX2e} | 20 \NeedsTeXFormat{LaTeX2e} |
| 21 \ProvidesPackage{my-doc-style}[% | 21 \ProvidesPackage{my-doc-style}[% |
| 22 2026/06/02 rv:c7ae4cfc2c5c (Franz Glasner) Some style customizations (title et al.)] | 22 2026/06/06 rv:ddd6d2bb4fdb (Franz Glasner) Some style customizations (title et al.)] |
| 23 \RequirePackage{xkeyval} | 23 \RequirePackage{xkeyval} |
| 24 \RequirePackage{hologo} | 24 \RequirePackage{hologo} |
| 25 | 25 |
| 26 % A key compatible with options processing but bool (because DeclareBoolOptionX) | 26 % A key compatible with options processing but bool (because DeclareBoolOptionX) |
| 27 % If given than the Sphinx standard titlepage is used without changes. | 27 % If given than the Sphinx standard titlepage is used without changes. |
| 35 % | 35 % |
| 36 \DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}} | 36 \DeclareRobustCommand*\vcsrevision[1]{\gdef\mds@vcs@revision{#1}} |
| 37 \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}} | 37 \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}} |
| 38 \vcsrevision{} | 38 \vcsrevision{} |
| 39 \builddate{} | 39 \builddate{} |
| 40 | |
| 41 % \textsf consumes an argument! | |
| 42 \newcommand{\mds@titlefont}{\textsf} | |
| 43 \newcommand{\mds@titlefontsize}{\small} | |
| 40 % | 44 % |
| 41 % If the option "stdtitle" was not enabled augment the titlepage with | 45 % If the option "stdtitle" was not enabled augment the titlepage with |
| 42 % the documentation build date and the VCS revision id. | 46 % the documentation build date and the VCS revision id. |
| 43 % | 47 % |
| 44 \csname ifKV@my-doc-style.sty@stdtitle\endcsname | 48 \csname ifKV@my-doc-style.sty@stdtitle\endcsname |
| 47 % \sphinxmaketitle calls the macro \@thanks: (ab)use this | 51 % \sphinxmaketitle calls the macro \@thanks: (ab)use this |
| 48 \gdef\@thanks{% | 52 \gdef\@thanks{% |
| 49 \ifx\mds@builddate\@empty\relax% | 53 \ifx\mds@builddate\@empty\relax% |
| 50 \ifx\mds@vcs@revision\@empty\relax% | 54 \ifx\mds@vcs@revision\@empty\relax% |
| 51 \else% | 55 \else% |
| 52 \hfill\normalsize\textsf{(rev\ \mds@vcs@revision )}% | 56 \hfill\mds@titlefontsize\mds@titlefont{(rev\ \mds@vcs@revision )}% |
| 53 \fi% | 57 \fi% |
| 54 \else% | 58 \else% |
| 55 \hfill\normalsize\textsf{Last updated on \mds@builddate% | 59 \hfill\mds@titlefontsize\mds@titlefont{Last updated on \mds@builddate% |
| 56 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rev\ \mds@vcs@revision )\fi} | 60 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rev\ \mds@vcs@revision )\fi} |
| 57 \fi% | 61 \fi% |
| 58 } | 62 } |
| 59 \fi | 63 \fi |
| 60 | 64 |
| 115 \addtocontents{toc}{\setcounter{tocdepth}{\the@mds@stored@tocdepth}}% Default | 119 \addtocontents{toc}{\setcounter{tocdepth}{\the@mds@stored@tocdepth}}% Default |
| 116 \endgroup | 120 \endgroup |
| 117 } | 121 } |
| 118 | 122 |
| 119 % | 123 % |
| 124 % Use the installed sans font as document body font and let all headings | |
| 125 % use the main/serif font. | |
| 126 % | |
| 127 \newcommand{\SwitchFamilyDefaultToSans}{% | |
| 128 \renewcommand*{\familydefault}{\sfdefault} | |
| 129 \@ifpackageloaded{fncychap}{% | |
| 130 \ChNameVar{\Large\rm} | |
| 131 \ChTitleVar{\large\rm} | |
| 132 }{} | |
| 133 \renewcommand{\mds@titlefont}{\textrm} | |
| 134 \renewcommand{\mds@titlefontsize}{\footnotesize} | |
| 135 \renewcommand{\DUroletextother}{\textrm} | |
| 136 } | |
| 137 | |
| 138 % | |
| 120 % For SmallCaps support and/or custom reST roles: | 139 % For SmallCaps support and/or custom reST roles: |
| 121 % see also: https://docutils.sourceforge.io/docs/user/latex.html | 140 % see also: https://docutils.sourceforge.io/docs/user/latex.html |
| 122 % | 141 % |
| 123 | 142 |
| 124 % | 143 % |
| 131 % Testing sans serif fonts with ":textsf:" role | 150 % Testing sans serif fonts with ":textsf:" role |
| 132 % Here without argument declaration because \textsf | 151 % Here without argument declaration because \textsf |
| 133 % expects one and will consume it instead. | 152 % expects one and will consume it instead. |
| 134 \newcommand{\DUroletextsf}{\textsf} | 153 \newcommand{\DUroletextsf}{\textsf} |
| 135 | 154 |
| 155 % Testing serif fonts with ":textrm:" role | |
| 156 % Here without argument declaration because \textrm | |
| 157 % expects one and will consume it instead. | |
| 158 \newcommand{\DUroletextrm}{\textrm} | |
| 136 | 159 |
| 137 % TeX logos using hologo | 160 % Testing serif fonts with ":textother:" role |
| 161 % Here without argument declaration because \textrm or \textsf | |
| 162 % expect one and will consume it instead. | |
| 163 \newcommand{\DUroletextother}{\textsf} | |
| 164 | |
| 165 | |
| 166 % TeX logos using hologo. | |
| 167 % The role argument will consumed by the \hologo command. | |
| 138 \newcommand*{\DUrolehologo}{\hologo} | 168 \newcommand*{\DUrolehologo}{\hologo} |
| 139 | 169 |
| 140 \endinput | 170 \endinput |
