1111 theme-color . update (_theme-colors . at (theme ))
1212
1313 set text (font : " Fira Sans" )
14-
1514 set page (paper : " presentation-" + ratio , fill : white )
1615
1716 show ref : it => (
3938
4039// *************************************** Aux functions ***************************************\\
4140
42- # let stress (body ) = (
43- context {
44- text (fill : theme-color . get (), weight : " semibold" )[# body ]
45- }
46- )
41+ // Theme colors
4742
4843# let bluey (body ) = (text (fill : rgb (" 3059AB" ))[# body ])
4944# let greeny (body ) = (text (fill : rgb (" BF3D3D" ))[# body ])
5449
5550// ***************************************************\\
5651
52+ # let stress (body ) = (
53+ context {
54+ text (fill : theme-color . get (), weight : " semibold" )[# body ]
55+ }
56+ )
57+
58+ // ***************************************************\\
59+
5760# let framed (
5861 title : none ,
5962 back-color : none ,
113116
114117// ***************************************************\\
115118
119+ // Source: https://github.com/polylux-typ/polylux/blob/main/src/toolbox/toolbox-impl.typ
120+
121+ # let cols (columns : none , gutter : 1em , .. bodies ) = {
122+ let bodies = bodies . pos ()
123+
124+ let columns = if columns == none {
125+ (1fr ,) * bodies . len ()
126+ } else {
127+ columns
128+ }
129+
130+ if columns . len () != bodies . len () {
131+ panic (" Number of columns must match number of content arguments" )
132+ }
133+
134+ grid (columns : columns , gutter : gutter , .. bodies )
135+ }
136+
137+ // ***************************************************\\
138+
116139# let grayed (
117140 text-size : 24pt ,
118141 content ,
180203 show linebreak : none
181204
182205 let sections = sections . final ()
183- pad (
184- enum (
185- .. sections . map (section => link (section . loc , section . body )),
186- ),
187- )
188-
189- // Using the default outline() function...
190- //
191- // set outline(title: none)
192- //
193- // show outline.entry: it => (
194- // context {
195- // show linebreak: none
196- // let num = text(weight: "bold", fill: theme-color.get())[#it.body.fields().at("children").first()]
197- // let title = text(style: "normal")[#it.body.fields().at("children").last()]
198- // [#num #title]
199- // }
200- // )
201- //
202- // outline()
206+ pad (enum (.. sections . map (section => link (section . loc , section . body ))))
203207
204208 pagebreak ()
205209 }
234238 body ,
235239) = (
236240 context {
237- set page (
238- fill : theme-color . get (),
239- )
241+ set page (fill : theme-color . get ())
240242
241243 set text (
242244 weight : " semibold" ,
285287 } else {
286288 (x : 1.6cm , top : 1.75cm , bottom : 1.2cm )
287289 },
288- background : place (
289- _slide-header (title , theme-color . get ()),
290- ),
290+ background : place (_slide-header (title , theme-color . get ())),
291291 )
292292
293- set list (
294- marker : text (theme-color . get (), [•]),
295- )
293+ set list (marker : text (theme-color . get (), [•]))
296294
297295 set enum (numbering : (it => context text (fill : theme-color . get ())[*# it .* ]))
298296
314312 both : true ,
315313 )
316314
317- set page (header : [
318- # align (right )[
319- # text (
320- fill : theme-color . get (),
321- weight : " semibold" ,
322- size : 12pt ,
323- )[# page-num ]
324- ]
325- ])
326-
327- set list (
328- marker : text (theme-color . get (), [•]),
315+ set page (
316+ header : [
317+ # align (right )[
318+ # text (
319+ fill : theme-color . get (),
320+ weight : " semibold" ,
321+ size : 12pt ,
322+ )[# page-num ]
323+ ]
324+ ],
329325 )
330326
327+ set list (marker : text (theme-color . get (), [•]))
328+
331329 set enum (numbering : (it => context text (fill : theme-color . get ())[*# it .* ]))
332330
333331 set text (size : 20pt )
339337
340338// **************************************** Bibliography ***************************************\\
341339
342- // You can use this locally...
343- // #let bibliography-slide(
344- // bib-path,
345- // title: "References",
346- // style: "ieee",
347- // ) = (
348- // context {
349-
350- // set text(size: 17pt)
351- // set par(justify: true)
352-
353- // bibliography(
354- // bib-path,
355- // title: text(size: 30pt)[
356- // #smallcaps(title)
357- // #v(-.85cm)
358- // #_divider(color: theme-color.get())
359- // #v(.5cm)],
360- // style: style,
361- // )
362- // }
363- // )
364- //
365-
366340# let bibliography-slide (
367341 bib-call ,
368342 title : " References" ,
371345 set text (size : 19pt )
372346 set par (justify : true )
373347
374- set bibliography (
375- title : text (size : 30pt )[# smallcaps (title ) # v (- .85cm ) # _divider (color : theme-color . get ()) # v (.5cm )],
376- )
348+ set bibliography (title : text (size : 30pt )[# smallcaps (title ) # v (- .85cm ) # _divider (color : theme-color . get ()) # v (.5cm )])
377349
378350 bib-call
379351 }
380- )
352+ )
0 commit comments