mpi-theme 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mpi_theme/__init__.py +1 -0
- mpi_theme/assets/book-callouts.css +92 -0
- mpi_theme/assets/book-header.css +230 -0
- mpi_theme/assets/book-objective-tags.css +91 -0
- mpi_theme/assets/book-publication.css +337 -0
- mpi_theme/assets/brand/field-mark-span.svg +9 -0
- mpi_theme/assets/django-header.css +60 -0
- mpi_theme/assets/fonts.css +72 -0
- mpi_theme/assets/inventory.json +26 -0
- mpi_theme/assets/marp.css +45 -0
- mpi_theme/assets/mermaid.json +27 -0
- mpi_theme/assets/mermaid.lua +42 -0
- mpi_theme/assets/print-book.tex +192 -0
- mpi_theme/assets/print-values.json +3 -0
- mpi_theme/assets/print.tex +6 -0
- mpi_theme/assets/slides.css +21 -0
- mpi_theme/assets/tokens.json +21 -0
- mpi_theme/assets/vendor/fonts/FONTS_LICENSE.txt +40 -0
- mpi_theme/assets/vendor/fonts/ibm-plex/IBMPlexMono-Bold.otf +494 -0
- mpi_theme/assets/vendor/fonts/ibm-plex/IBMPlexMono-BoldItalic.otf +494 -0
- mpi_theme/assets/vendor/fonts/ibm-plex/IBMPlexMono-Italic.otf +494 -0
- mpi_theme/assets/vendor/fonts/ibm-plex/IBMPlexMono-Regular.otf +494 -0
- mpi_theme/assets/vendor/fonts/linux-libertine/LinLibertine-Bold.otf +0 -0
- mpi_theme/assets/vendor/fonts/linux-libertine/LinLibertine-BoldItalic.otf +0 -0
- mpi_theme/assets/vendor/fonts/linux-libertine/LinLibertine-Italic.otf +0 -0
- mpi_theme/assets/vendor/fonts/linux-libertine/LinLibertine-Regular.otf +0 -0
- mpi_theme/cli.py +232 -0
- mpi_theme/fonts.py +106 -0
- mpi_theme/presentation.py +61 -0
- mpi_theme-0.2.0.dist-info/METADATA +100 -0
- mpi_theme-0.2.0.dist-info/RECORD +33 -0
- mpi_theme-0.2.0.dist-info/WHEEL +4 -0
- mpi_theme-0.2.0.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
\usepackage{bookmark}
|
|
2
|
+
\usepackage{microtype}
|
|
3
|
+
\usepackage{needspace}
|
|
4
|
+
\usepackage{xurl}
|
|
5
|
+
\usepackage{enumitem}
|
|
6
|
+
\usepackage{float}
|
|
7
|
+
\usepackage{colortbl}
|
|
8
|
+
\usepackage{fvextra}
|
|
9
|
+
\usepackage[automark]{scrlayer-scrpage}
|
|
10
|
+
\usepackage{tikz}
|
|
11
|
+
\usepackage[skins,breakable]{tcolorbox}
|
|
12
|
+
|
|
13
|
+
% Publication palette shared with the HTML projection. The monochrome profile
|
|
14
|
+
% maps every semantic text color to true black before the complete PDF is
|
|
15
|
+
% converted to grayscale, so colored text never becomes weak gray text.
|
|
16
|
+
\ifdefined\MPIMonochrome
|
|
17
|
+
\definecolor{MPICanvas}{HTML}{FFFFFF}
|
|
18
|
+
\definecolor{MPISurface}{HTML}{FFFFFF}
|
|
19
|
+
\definecolor{MPIInk}{HTML}{000000}
|
|
20
|
+
\definecolor{MPIMuted}{HTML}{000000}
|
|
21
|
+
\definecolor{MPIBorder}{HTML}{000000}
|
|
22
|
+
\definecolor{MPIPrimary}{HTML}{000000}
|
|
23
|
+
\definecolor{MPIStripe}{HTML}{FFFFFF}
|
|
24
|
+
\definecolor{MPITableRule}{HTML}{000000}
|
|
25
|
+
\else
|
|
26
|
+
\definecolor{MPICanvas}{HTML}{{canvas}}
|
|
27
|
+
\definecolor{MPISurface}{HTML}{{surface}}
|
|
28
|
+
\definecolor{MPIInk}{HTML}{{ink}}
|
|
29
|
+
\definecolor{MPIMuted}{HTML}{{muted}}
|
|
30
|
+
\definecolor{MPIBorder}{HTML}{{border}}
|
|
31
|
+
\definecolor{MPIPrimary}{HTML}{{primary}}
|
|
32
|
+
\definecolor{MPIStripe}{HTML}{{table-stripe}}
|
|
33
|
+
\definecolor{MPITableRule}{HTML}{{table-rule}}
|
|
34
|
+
\fi
|
|
35
|
+
|
|
36
|
+
% Vector Span Field mark and restrained publication cover. The subtitle macro
|
|
37
|
+
% used by Pandoc appends the belt designation to \@title, so both remain inside
|
|
38
|
+
% the title lockup without duplicating release-status language.
|
|
39
|
+
\newcommand{\MPIFieldMark}{%
|
|
40
|
+
\begin{tikzpicture}[x=1.45cm,y=1.45cm,baseline=(current bounding box.center)]
|
|
41
|
+
\draw[color=MPIPrimary,line width=1.4pt] (0,0) rectangle (1,1);
|
|
42
|
+
\draw[color=MPIPrimary,line width=1.4pt] (0,0.5) -- (1,0.5);
|
|
43
|
+
\draw[color=MPIPrimary,line width=1.4pt] (0.5,0.5) -- (0.5,1);
|
|
44
|
+
\node[color=MPIPrimary,font=\sffamily\bfseries\large] at (0.25,0.75) {M};
|
|
45
|
+
\node[color=MPIPrimary,font=\sffamily\bfseries\large] at (0.75,0.75) {P};
|
|
46
|
+
\node[color=MPIPrimary,font=\sffamily\bfseries\large] at (0.5,0.25) {I};
|
|
47
|
+
\end{tikzpicture}%
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
% Comfortable block paragraphs. LuaLaTeX supplies justification and
|
|
53
|
+
% language-aware hyphenation; microtype refines spacing and protrusion.
|
|
54
|
+
\setlength{\parindent}{0pt}
|
|
55
|
+
\setlength{\parskip}{0.55\baselineskip plus 0.1\baselineskip minus 0.05\baselineskip}
|
|
56
|
+
|
|
57
|
+
% Quiet running furniture: chapter title above, outside folio below, and no
|
|
58
|
+
% running title on chapter-opening pages.
|
|
59
|
+
\clearpairofpagestyles
|
|
60
|
+
\automark{chapter}
|
|
61
|
+
\ihead{\headmark}
|
|
62
|
+
\ofoot*{\pagemark}
|
|
63
|
+
\setkomafont{pageheadfoot}{\sffamily\small\color{MPIMuted}}
|
|
64
|
+
\setkomafont{pagenumber}{\sffamily\small\color{MPIMuted}}
|
|
65
|
+
\renewcommand*{\chapterpagestyle}{plain.scrheadings}
|
|
66
|
+
\pagestyle{scrheadings}
|
|
67
|
+
|
|
68
|
+
% Source Sans supplies the hierarchy while the restrained palette leaves the
|
|
69
|
+
% body text dominant. Part openers are explicit rather than inherited KOMA
|
|
70
|
+
% defaults, so they share the cover and chapter-opening visual language.
|
|
71
|
+
\setkomafont{partnumber}{\sffamily\bfseries\fontsize{17}{20}\selectfont\color{MPIPrimary}}
|
|
72
|
+
\setkomafont{part}{\sffamily\bfseries\fontsize{34}{40}\selectfont\color{MPIInk}}
|
|
73
|
+
\renewcommand{\partlineswithprefixformat}[3]{%
|
|
74
|
+
\parbox{\textwidth}{%
|
|
75
|
+
\centering
|
|
76
|
+
#2\par\nobreak
|
|
77
|
+
\vspace{0.30in}%
|
|
78
|
+
#3\par\nobreak
|
|
79
|
+
\vspace{0.34in}%
|
|
80
|
+
{\color{MPIPrimary}\rule{1.65in}{1.4pt}}%
|
|
81
|
+
}%
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
% Chapter openings use an oversized number as the clearest possible
|
|
85
|
+
% orientation cue; the title remains large enough to read as a title, not as
|
|
86
|
+
% another section heading.
|
|
87
|
+
\setkomafont{chapter}{\sffamily\bfseries\fontsize{25}{29}\selectfont\color{MPIInk}}
|
|
88
|
+
\renewcommand*{\chapterformat}{%
|
|
89
|
+
{\fontsize{58}{58}\selectfont\color{MPIPrimary}\thechapter\autodot}%
|
|
90
|
+
}
|
|
91
|
+
\renewcommand*{\chapterlinesformat}[3]{%
|
|
92
|
+
\parbox{\textwidth}{%
|
|
93
|
+
\raggedchapter
|
|
94
|
+
\IfUseNumber{%
|
|
95
|
+
#2\par\nobreak
|
|
96
|
+
\vspace{0.28\baselineskip}%
|
|
97
|
+
}{}%
|
|
98
|
+
#3\par\nobreak
|
|
99
|
+
\vspace{0.45\baselineskip}%
|
|
100
|
+
{\color{MPIPrimary}\rule{\textwidth}{1.2pt}}%
|
|
101
|
+
}%
|
|
102
|
+
}
|
|
103
|
+
\setkomafont{section}{\sffamily\bfseries\color{MPIInk}}
|
|
104
|
+
\setkomafont{subsection}{\sffamily\bfseries\color{MPIInk}}
|
|
105
|
+
\setkomafont{subsubsection}{\sffamily\bfseries\color{MPIInk}}
|
|
106
|
+
\setkomafont{caption}{\small}
|
|
107
|
+
\setkomafont{captionlabel}{\sffamily\bfseries\color{MPIPrimary}}
|
|
108
|
+
|
|
109
|
+
% Preserve the HTML Bloom-taxonomy pills in the LaTeX projection. The labels
|
|
110
|
+
% carry the meaning, while the palette remains distinguishable in color and
|
|
111
|
+
% usable when printed in grayscale.
|
|
112
|
+
\ifdefined\MPIMonochrome
|
|
113
|
+
\definecolor{bloomremembertext}{HTML}{000000}
|
|
114
|
+
\definecolor{bloomrememberback}{HTML}{FFFFFF}
|
|
115
|
+
\definecolor{bloomrememberframe}{HTML}{000000}
|
|
116
|
+
\definecolor{bloomunderstandtext}{HTML}{000000}
|
|
117
|
+
\definecolor{bloomunderstandback}{HTML}{FFFFFF}
|
|
118
|
+
\definecolor{bloomunderstandframe}{HTML}{000000}
|
|
119
|
+
\definecolor{bloomapplytext}{HTML}{000000}
|
|
120
|
+
\definecolor{bloomapplyback}{HTML}{FFFFFF}
|
|
121
|
+
\definecolor{bloomapplyframe}{HTML}{000000}
|
|
122
|
+
\definecolor{bloomanalyzetext}{HTML}{000000}
|
|
123
|
+
\definecolor{bloomanalyzeback}{HTML}{FFFFFF}
|
|
124
|
+
\definecolor{bloomanalyzeframe}{HTML}{000000}
|
|
125
|
+
\definecolor{bloomevaluatetext}{HTML}{000000}
|
|
126
|
+
\definecolor{bloomevaluateback}{HTML}{FFFFFF}
|
|
127
|
+
\definecolor{bloomevaluateframe}{HTML}{000000}
|
|
128
|
+
\definecolor{bloomcreatetext}{HTML}{000000}
|
|
129
|
+
\definecolor{bloomcreateback}{HTML}{FFFFFF}
|
|
130
|
+
\definecolor{bloomcreateframe}{HTML}{000000}
|
|
131
|
+
\else
|
|
132
|
+
\definecolor{bloomremembertext}{HTML}{7A1C1C}
|
|
133
|
+
\definecolor{bloomrememberback}{HTML}{FDE8E8}
|
|
134
|
+
\definecolor{bloomrememberframe}{HTML}{E8A3A3}
|
|
135
|
+
\definecolor{bloomunderstandtext}{HTML}{7A4010}
|
|
136
|
+
\definecolor{bloomunderstandback}{HTML}{FEF0DC}
|
|
137
|
+
\definecolor{bloomunderstandframe}{HTML}{F0C070}
|
|
138
|
+
\definecolor{bloomapplytext}{HTML}{5C4A00}
|
|
139
|
+
\definecolor{bloomapplyback}{HTML}{FEFAD6}
|
|
140
|
+
\definecolor{bloomapplyframe}{HTML}{DFC840}
|
|
141
|
+
\definecolor{bloomanalyzetext}{HTML}{1A4D2A}
|
|
142
|
+
\definecolor{bloomanalyzeback}{HTML}{DFF5E8}
|
|
143
|
+
\definecolor{bloomanalyzeframe}{HTML}{7DCF9A}
|
|
144
|
+
\definecolor{bloomevaluatetext}{HTML}{0D3D6E}
|
|
145
|
+
\definecolor{bloomevaluateback}{HTML}{DAEEFF}
|
|
146
|
+
\definecolor{bloomevaluateframe}{HTML}{80BCE8}
|
|
147
|
+
\definecolor{bloomcreatetext}{HTML}{4A1A7A}
|
|
148
|
+
\definecolor{bloomcreateback}{HTML}{F0E8FF}
|
|
149
|
+
\definecolor{bloomcreateframe}{HTML}{C0A0E8}
|
|
150
|
+
\fi
|
|
151
|
+
|
|
152
|
+
\newtcbox{\bloomremember}{on line,nobeforeafter,coltext=bloomremembertext,colback=bloomrememberback,colframe=bloomrememberframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
153
|
+
\newtcbox{\bloomunderstand}{on line,nobeforeafter,coltext=bloomunderstandtext,colback=bloomunderstandback,colframe=bloomunderstandframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
154
|
+
\newtcbox{\bloomapply}{on line,nobeforeafter,coltext=bloomapplytext,colback=bloomapplyback,colframe=bloomapplyframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
155
|
+
\newtcbox{\bloomanalyze}{on line,nobeforeafter,coltext=bloomanalyzetext,colback=bloomanalyzeback,colframe=bloomanalyzeframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
156
|
+
\newtcbox{\bloomevaluate}{on line,nobeforeafter,coltext=bloomevaluatetext,colback=bloomevaluateback,colframe=bloomevaluateframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
157
|
+
\newtcbox{\bloomcreate}{on line,nobeforeafter,coltext=bloomcreatetext,colback=bloomcreateback,colframe=bloomcreateframe,boxrule=0.45pt,arc=3pt,outer arc=3pt,boxsep=0pt,left=3pt,right=3pt,top=1pt,bottom=1pt,fontupper=\scriptsize\bfseries}
|
|
158
|
+
|
|
159
|
+
% Lists should scan cleanly without the cramped global `nosep` treatment.
|
|
160
|
+
\setlist[itemize,enumerate]{leftmargin=1.6em,labelsep=0.55em,topsep=0.45\baselineskip,itemsep=0.22\baselineskip,parsep=0pt,partopsep=0pt}
|
|
161
|
+
\setlist[itemize,enumerate,2]{topsep=0.25\baselineskip,itemsep=0.12\baselineskip}
|
|
162
|
+
% A small open square echoes the MPI field mark: visible on close inspection,
|
|
163
|
+
% quiet enough to read as normal book typography. It inherits the semantic
|
|
164
|
+
% primary color, which the monochrome preamble maps to true black.
|
|
165
|
+
\newcommand{\MPIListSquare}{%
|
|
166
|
+
\raisebox{0.15ex}{%
|
|
167
|
+
\begingroup
|
|
168
|
+
\setlength{\fboxsep}{0pt}%
|
|
169
|
+
\setlength{\fboxrule}{0.35pt}%
|
|
170
|
+
\fcolorbox{MPIPrimary}{white}{\rule{0.42ex}{0.42ex}}%
|
|
171
|
+
\endgroup
|
|
172
|
+
}%
|
|
173
|
+
}
|
|
174
|
+
\setlist[itemize,1]{label=\MPIListSquare}
|
|
175
|
+
\setlist[itemize,2]{label=\textendash}
|
|
176
|
+
\setlength{\emergencystretch}{3em}
|
|
177
|
+
\clubpenalty=10000
|
|
178
|
+
\widowpenalty=10000
|
|
179
|
+
\displaywidowpenalty=10000
|
|
180
|
+
\RedeclareSectionCommand[tocnumwidth=2.8em]{chapter}
|
|
181
|
+
\RedeclareSectionCommand[tocnumwidth=3.6em]{section}
|
|
182
|
+
|
|
183
|
+
% Subtle zebra striping aids row tracking without carrying semantic meaning.
|
|
184
|
+
% Pandoc's booktabs rules remain sparse and neutral. Apply the row-color state
|
|
185
|
+
% before longtable begins; changing it inside an active alignment is invalid.
|
|
186
|
+
\BeforeBeginEnvironment{longtable}{\begingroup\small\rowcolors{2}{MPIStripe}{white}}
|
|
187
|
+
\AfterEndEnvironment{longtable}{\endgroup}
|
|
188
|
+
|
|
189
|
+
% Preserve commands where practical and show a continuation marker when a PDF
|
|
190
|
+
% code line must wrap.
|
|
191
|
+
\fvset{fontsize=\small,breaklines=true,breakanywhere=true,breaksymbolleft=\tiny\ensuremath{\hookrightarrow}}
|
|
192
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.reveal {
|
|
2
|
+
--r-main-color: var(--mpi-ink);
|
|
3
|
+
--r-heading-color: var(--mpi-ink);
|
|
4
|
+
--r-main-font: var(--mpi-font-heading);
|
|
5
|
+
--r-heading-font: var(--mpi-font-heading);
|
|
6
|
+
--r-link-color: var(--mpi-primary);
|
|
7
|
+
--r-link-color-hover: var(--mpi-primary-hover);
|
|
8
|
+
--r-background-color: var(--mpi-canvas);
|
|
9
|
+
color: var(--mpi-ink);
|
|
10
|
+
font-family: var(--mpi-font-heading);
|
|
11
|
+
font-size: 32px;
|
|
12
|
+
}
|
|
13
|
+
.reveal-viewport { background: var(--mpi-canvas); }
|
|
14
|
+
.reveal h1, .reveal h2, .reveal h3, .reveal h4 { color: var(--mpi-ink); font-family: var(--mpi-font-heading); }
|
|
15
|
+
.reveal a { color: var(--mpi-primary); }
|
|
16
|
+
.reveal a:focus-visible { outline: 3px solid var(--mpi-focus); outline-offset: 3px; }
|
|
17
|
+
.reveal pre, .reveal code { font-family: var(--mpi-font-code); }
|
|
18
|
+
.reveal pre { font-size: 0.65em; }
|
|
19
|
+
@media (prefers-reduced-motion: reduce) {
|
|
20
|
+
.reveal .slides section { transition: none !important; }
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"--mpi-canvas": "#f6f7f5",
|
|
3
|
+
"--mpi-surface": "#ffffff",
|
|
4
|
+
"--mpi-ink": "#1f2933",
|
|
5
|
+
"--mpi-muted": "#5b6870",
|
|
6
|
+
"--mpi-border": "#cdd5d5",
|
|
7
|
+
"--mpi-primary": "#0b5d5a",
|
|
8
|
+
"--mpi-primary-hover": "#084946",
|
|
9
|
+
"--mpi-focus": "#0a7a75",
|
|
10
|
+
"--mpi-success": "#176b45",
|
|
11
|
+
"--mpi-warning": "#8a5a00",
|
|
12
|
+
"--mpi-danger": "#a43232",
|
|
13
|
+
"--mpi-info": "#1d5d88",
|
|
14
|
+
"--mpi-table-stripe": "#f1f4f3",
|
|
15
|
+
"--mpi-font-body": "\"Source Serif 4\", Georgia, serif",
|
|
16
|
+
"--mpi-font-heading": "\"Source Sans 3\", system-ui, sans-serif",
|
|
17
|
+
"--mpi-font-code": "\"Source Code Pro\", ui-monospace, monospace",
|
|
18
|
+
"--mpi-prose-size": "1.125rem",
|
|
19
|
+
"--mpi-prose-leading": "1.62",
|
|
20
|
+
"--mpi-prose-measure": "70ch"
|
|
21
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Fonts Vendored in MPI Theme
|
|
2
|
+
===========================
|
|
3
|
+
|
|
4
|
+
This directory contains font files vendored for deterministic builds and
|
|
5
|
+
consistent rendering across HTML, PDF, and presentations.
|
|
6
|
+
|
|
7
|
+
All fonts use permissive open-source licenses that allow redistribution.
|
|
8
|
+
|
|
9
|
+
Linux Libertine
|
|
10
|
+
===============
|
|
11
|
+
Location: linux-libertine/
|
|
12
|
+
License: GNU General Public License v2 with font exception
|
|
13
|
+
URL: https://github.com/skopenkov/linux-libertine
|
|
14
|
+
Attribution: Philipp H. Poll, Michael Sharpe, and contributors
|
|
15
|
+
Use: Primary serif font for body text across all outputs
|
|
16
|
+
|
|
17
|
+
IBM Plex Mono
|
|
18
|
+
=============
|
|
19
|
+
Location: ibm-plex/
|
|
20
|
+
License: SIL Open Font License 1.1
|
|
21
|
+
URL: https://github.com/IBM/plex
|
|
22
|
+
Attribution: IBM Type Foundry and contributors
|
|
23
|
+
Use: Monospace font for code snippets and notebooks
|
|
24
|
+
|
|
25
|
+
STIX Two Math
|
|
26
|
+
=============
|
|
27
|
+
License: Multiple (OFL 1.1 + Public Domain)
|
|
28
|
+
URL: https://github.com/stipub/stix-fonts
|
|
29
|
+
Attribution: Scientific and Technical Information Exchange (STIX) Type Committee
|
|
30
|
+
Note: Bundled with TeX Live; not vendored here (system font fallback)
|
|
31
|
+
Use: Mathematical typesetting for LaTeX/PDF output
|
|
32
|
+
|
|
33
|
+
Why Vendor Fonts?
|
|
34
|
+
=================
|
|
35
|
+
|
|
36
|
+
By including font files in the repository:
|
|
37
|
+
1. Deterministic builds across all machines
|
|
38
|
+
2. No external dependencies on system font installation
|
|
39
|
+
3. Exact same rendering in HTML, PDF, and presentations
|
|
40
|
+
4. Consistent branding across all MPI project outputs
|