Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff 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 |
line wrap: on
line diff
--- a/docs/_latex/my-doc-style.sty Tue Jun 02 12:33:54 2026 +0200 +++ b/docs/_latex/my-doc-style.sty Sat Jun 06 12:12:06 2026 +0200 @@ -19,7 +19,7 @@ % \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{my-doc-style}[% - 2026/06/02 rv:c7ae4cfc2c5c (Franz Glasner) Some style customizations (title et al.)] + 2026/06/06 rv:ddd6d2bb4fdb (Franz Glasner) Some style customizations (title et al.)] \RequirePackage{xkeyval} \RequirePackage{hologo} @@ -37,6 +37,10 @@ \DeclareRobustCommand*\builddate[1]{\gdef\mds@builddate{#1}} \vcsrevision{} \builddate{} + +% \textsf consumes an argument! +\newcommand{\mds@titlefont}{\textsf} +\newcommand{\mds@titlefontsize}{\small} % % If the option "stdtitle" was not enabled augment the titlepage with % the documentation build date and the VCS revision id. @@ -49,10 +53,10 @@ \ifx\mds@builddate\@empty\relax% \ifx\mds@vcs@revision\@empty\relax% \else% - \hfill\normalsize\textsf{(rev\ \mds@vcs@revision )}% + \hfill\mds@titlefontsize\mds@titlefont{(rev\ \mds@vcs@revision )}% \fi% \else% - \hfill\normalsize\textsf{Last updated on \mds@builddate% + \hfill\mds@titlefontsize\mds@titlefont{Last updated on \mds@builddate% \ifx\mds@vcs@revision\@empty\relax\else\enspace(rev\ \mds@vcs@revision )\fi} \fi% } @@ -117,6 +121,21 @@ } % +% Use the installed sans font as document body font and let all headings +% use the main/serif font. +% +\newcommand{\SwitchFamilyDefaultToSans}{% + \renewcommand*{\familydefault}{\sfdefault} + \@ifpackageloaded{fncychap}{% + \ChNameVar{\Large\rm} + \ChTitleVar{\large\rm} + }{} + \renewcommand{\mds@titlefont}{\textrm} + \renewcommand{\mds@titlefontsize}{\footnotesize} + \renewcommand{\DUroletextother}{\textrm} +} + +% % For SmallCaps support and/or custom reST roles: % see also: https://docutils.sourceforge.io/docs/user/latex.html % @@ -133,8 +152,19 @@ % expects one and will consume it instead. \newcommand{\DUroletextsf}{\textsf} +% Testing serif fonts with ":textrm:" role +% Here without argument declaration because \textrm +% expects one and will consume it instead. +\newcommand{\DUroletextrm}{\textrm} -% TeX logos using hologo +% Testing serif fonts with ":textother:" role +% Here without argument declaration because \textrm or \textsf +% expect one and will consume it instead. +\newcommand{\DUroletextother}{\textsf} + + +% TeX logos using hologo. +% The role argument will consumed by the \hologo command. \newcommand*{\DUrolehologo}{\hologo} \endinput
