|
44 | 44 | #let font-size-small = 14pt |
45 | 45 |
|
46 | 46 | #let font-size-tiny = 12pt |
| 47 | +#let font-size-large = 22pt |
| 48 | +#let font-size-huge = 26pt |
47 | 49 |
|
48 | 50 | // Regular heading styling |
49 | 51 | #let font-size-heading-1 = 20pt |
|
54 | 56 | #let font-color-heading-2 = bips-blue |
55 | 57 | #let font-weight-heading-2 = "bold" |
56 | 58 |
|
57 | | -#let font-size-heading-3 = 17pt |
58 | | -#let font-color-heading-3 = bips-blue |
| 59 | +#let font-size-heading-3 = 18pt |
| 60 | +#let font-color-heading-3 = bips-text-gray |
59 | 61 | #let font-weight-heading-3 = "bold" |
60 | 62 |
|
61 | 63 | // Slide title and subtitle styling |
|
153 | 155 | page-number: font-size-page-number, |
154 | 156 | small: font-size-small, |
155 | 157 | tiny: font-size-tiny, |
| 158 | + large: font-size-large, |
| 159 | + huge: font-size-huge, |
156 | 160 | title-align: left, |
157 | 161 | )) |
158 | 162 |
|
|
162 | 166 | /// Render content at the smallest size (scales with base-size) |
163 | 167 | #let tiny(body) = context text(size: _bips-sizes.get().tiny)[#body] |
164 | 168 |
|
| 169 | +/// Render content at a larger size (scales with base-size) |
| 170 | +#let large(body) = context text(size: _bips-sizes.get().large)[#body] |
| 171 | + |
| 172 | +/// Render content at the largest size (scales with base-size) |
| 173 | +#let huge(body) = context text(size: _bips-sizes.get().huge)[#body] |
| 174 | + |
165 | 175 | // =================================================================== |
166 | 176 | // BACKGROUND UTILITY FUNCTIONS |
167 | 177 | // =================================================================== |
|
202 | 212 | heading-3-size: none, |
203 | 213 | small-size: none, |
204 | 214 | tiny-size: none, |
| 215 | + large-size: none, |
| 216 | + huge-size: none, |
205 | 217 | page-number-size: none, |
206 | 218 | code-block-scale: none, |
207 | 219 | code-inline-scale: none, |
|
216 | 228 | let effective-code-inline-scale = pick-first( |
217 | 229 | code-inline-scale, |
218 | 230 | font-scale-code-inline, |
219 | | - ) |
220 | | - |
221 | | - // Resolve font families |
| 231 | + ) // Resolve font families |
222 | 232 | let effective-font = pick-first(font, font-family-text) |
223 | 233 | let effective-code-font = pick-first(code-font, font-family-code) |
224 | | - let effective-math-font = pick-first(math-font, font-family-math) |
225 | | - |
226 | | - // Global text and styling configuration |
| 234 | + let effective-math-font = pick-first(math-font, font-family-math) // Global text and styling configuration |
227 | 235 | show: set text( |
228 | 236 | font: effective-font, |
229 | 237 | size: effective-font-size-base, |
230 | 238 | fill: font-color-base, |
231 | 239 | ) |
232 | | - show math.equation: set text(font: effective-math-font) |
233 | | - |
234 | | - // Heading styles use em-based defaults so they scale proportionally with base-size. |
| 240 | + show math.equation: set text(font: effective-math-font) // Heading styles use em-based defaults so they scale proportionally with base-size. |
235 | 241 | // Explicit pt overrides take precedence over the em-based defaults. |
236 | 242 | show heading.where(level: 1): set text( |
237 | 243 | size: pick-first(heading-1-size, 1.11em), |
|
247 | 253 | size: pick-first(heading-3-size, 0.89em), |
248 | 254 | weight: font-weight-heading-3, |
249 | 255 | fill: font-color-heading-3, |
250 | | - ) |
251 | | - |
252 | | - // Publish effective sizes via state so slide functions can read them. |
| 256 | + ) // Publish effective sizes via state so slide functions can read them. |
253 | 257 | // Sizes that aren't overridden explicitly use the module-level defaults, |
254 | 258 | // which means they don't auto-scale with base-size. Use em-based values |
255 | 259 | // in the state to get proportional scaling where appropriate. |
|
260 | 264 | page-number: pick-first(page-number-size, font-size-page-number), |
261 | 265 | small: pick-first(small-size, font-size-small), |
262 | 266 | tiny: pick-first(tiny-size, font-size-tiny), |
| 267 | + large: pick-first(large-size, font-size-large), |
| 268 | + huge: pick-first(huge-size, font-size-huge), |
263 | 269 | title-align: title-align, |
264 | | - )) |
265 | | - |
266 | | - // Emphasis (_text_) in BIPS blue (color only, no italic) |
| 270 | + )) // Emphasis (_text_) in BIPS blue (color only, no italic) |
267 | 271 | show emph: it => text( |
268 | 272 | fill: font-color-emphasis, |
269 | 273 | style: "italic", |
270 | 274 | weight: "regular", |
271 | | - )[#it.body] |
272 | | - |
273 | | - // Strong text (*text*) in BIPS blue (color only, no bold) |
274 | | - show strong: it => text(fill: font-color-strong, weight: "bold")[#it.body] |
275 | | - |
276 | | - // Links in BIPS blue with thin underline to distinguish from emphasis |
277 | | - show link: it => underline(text(fill: bips-blue)[#it]) |
278 | | - |
279 | | - // Table styling - set elegant defaults |
| 275 | + )[#it.body] // Strong text (*text*) in BIPS blue (color only, no bold) |
| 276 | + show strong: it => text(fill: font-color-strong, weight: "bold")[#it.body] // Links in BIPS blue with thin underline to distinguish from emphasis |
| 277 | + show link: it => underline(text(fill: bips-blue)[#it]) // Table styling - set elegant defaults |
280 | 278 | set table( |
281 | 279 | stroke: none, |
282 | 280 | fill: (_, y) => if y == 0 { bips-blue.lighten(85%) } else { none }, |
283 | 281 | inset: (x: 0.7em, y: 0.6em), |
284 | | - ) |
285 | | - |
286 | | - // Add subtle borders around tables |
| 282 | + ) // Add subtle borders around tables |
287 | 283 | show table: it => block( |
288 | 284 | stroke: ( |
289 | 285 | top: 1pt + bips-blue.lighten(50%), |
290 | 286 | bottom: 1pt + bips-blue.lighten(50%), |
291 | 287 | ), |
292 | 288 | inset: 0pt, |
293 | 289 | it, |
294 | | - ) |
295 | | - |
296 | | - // List styling with configurable spacing |
| 290 | + ) // List styling with configurable spacing |
297 | 291 | // Spacing uses `set` (not `show`) so users can override with local `#set list(spacing: ...)` |
298 | 292 | set list(spacing: list-spacing) |
299 | 293 | set enum(spacing: enum-spacing) |
|
322 | 316 | show enum: set enum(spacing: 0.4em) |
323 | 317 | show list: set list(spacing: 0.4em) |
324 | 318 | it |
325 | | - } |
326 | | - |
327 | | - // Code styling - Fira Mono pairs with Fira Sans for consistent metrics |
| 319 | + } // Code styling - Fira Mono pairs with Fira Sans for consistent metrics |
328 | 320 | show raw: set text(font: effective-code-font) |
329 | 321 | show raw.where(block: true): set text(size: effective-code-block-scale * 1em) |
330 | 322 | show raw.where(block: false): set text( |
331 | 323 | size: effective-code-inline-scale * 1em, |
332 | | - ) |
333 | | - |
334 | | - // Use Touying's infrastructure with BIPS customizations |
| 324 | + ) // Use Touying's infrastructure with BIPS customizations |
335 | 325 | touying-slides( |
336 | 326 | config-page( |
337 | 327 | ..utils.page-args-from-aspect-ratio(aspect-ratio), |
|
959 | 949 | /// |
960 | 950 | /// Example: #compact[- Item A \ - Item B \ - Item C] |
961 | 951 | #let compact(spacing: 0.4em, leading: 0.4em, body) = { |
962 | | - set list(spacing: spacing) |
963 | | - set enum(spacing: spacing) |
| 952 | + show list: set list(spacing: spacing) |
| 953 | + show enum: set enum(spacing: spacing) |
964 | 954 | set par(leading: leading) |
965 | 955 | show list: set text(top-edge: "cap-height", bottom-edge: "baseline") |
966 | 956 | show enum: set text(top-edge: "cap-height", bottom-edge: "baseline") |
|
0 commit comments