comparison docs/_latex/my-doc-style.sty @ 785:42f7caa89253

Update to recent my-doc-style.sty
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 17 May 2026 11:42:40 +0200
parents 47ae57d92ed3
children 5f0ee44825b1
comparison
equal deleted inserted replaced
784:16f040434598 785:42f7caa89253
2 % 2 %
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/16 v0.2.1 (Franz Glasner) Some style customizations (title et al.)] 7 2026/05/17 v0.3 (Franz Glasner) Some style customizations (title et al.)]
8 \RequirePackage{xkeyval} 8 \RequirePackage{xkeyval}
9 9
10 % A key compatible with options processing but bool (because DeclareBoolOptionX) 10 % A key compatible with options processing but bool (because DeclareBoolOptionX)
11 % If given than the Sphinx standard titlepage is used without changes. 11 % If given than the Sphinx standard titlepage is used without changes.
12 \define@boolkey{my-doc-style.sty}{stdtitle}[true]{} 12 \define@boolkey{my-doc-style.sty}{stdtitle}[true]{}
40 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rev\ \mds@vcs@revision )\fi} 40 \ifx\mds@vcs@revision\@empty\relax\else\enspace(rev\ \mds@vcs@revision )\fi}
41 \fi% 41 \fi%
42 } 42 }
43 \fi 43 \fi
44 44
45 %
46 % Allow to suppress section numbering for some parts of the document
47 % (e.g. in changelog entries).
48 %
49 % Sphinx employs the "titlesec" package to style its chapter and section
50 % headings and uses its \titleformat command with a 0.5em separation
51 % (see \titleformat calls in sphinxlatexstyleheadings.sty).
52 % So make \the<section> output nothing (e.g. the section number)
53 % but just a compensation for this whitespace.
54 %
55 % Each suppress command suppresses its level and all levels below
56 % (compare with the \titleformat calls in sphinxlatexstyleheadings.sty).
57 %
58 % \EndSuppressNumbering ends exactly one preceding
59 % \SuppressSubsectionNumbering or \SuppressSubsubsectionNumbering.
60 %
61 \def\SuppressSectionNumbering{%
62 \begingroup
63 \renewcommand\thesection{\hspace{-0.5em}}
64 \renewcommand\thesubsection{\hspace{-0.5em}}
65 \renewcommand\thesubsubsection{\hspace{-0.5em}}
66 \renewcommand\theparagraph{\hspace{-0.5em}}
67 \renewcommand\thesubparagraph{\hspace{-0.5em}}
68 }
69 \def\SuppressSubsectionNumbering{%
70 \begingroup
71 \renewcommand\thesubsection{\hspace{-0.5em}}
72 \renewcommand\thesubsubsection{\hspace{-0.5em}}
73 \renewcommand\theparagraph{\hspace{-0.5em}}
74 \renewcommand\thesubparagraph{\hspace{-0.5em}}
75 }
76 \def\SuppressSubsubsectionNumbering{%
77 \begingroup
78 \renewcommand\thesubsubsection{\hspace{-0.5em}}
79 \renewcommand\theparagraph{\hspace{-0.5em}}
80 \renewcommand\thesubparagraph{\hspace{-0.5em}}
81 }
82 \def\EndSuppressNumbering{%
83 \endgroup
84 }
85
45 \endinput 86 \endinput