|
249 | 249 | #let pause = {
|
250 | 250 | // We need two separate `locate`s because `repetitions` needs to be updated
|
251 | 251 | // using the new value of `pause-counter`.
|
252 |
| - locate( loc => { |
253 |
| - if not handout-mode.at(loc) { |
| 252 | + context { |
| 253 | + if not handout-mode.get() { |
254 | 254 | pause-counter.step()
|
255 | 255 | }
|
256 |
| - }) |
257 |
| - locate( loc => { |
258 |
| - repetitions.update(rep => calc.max(rep, pause-counter.at(loc).first() + 1)) |
259 |
| - }) |
| 256 | + } |
| 257 | + context { |
| 258 | + repetitions.update(rep => calc.max(rep, pause-counter.get().first() + 1)) |
| 259 | + } |
260 | 260 | }
|
261 | 261 |
|
262 | 262 | #let paused-content(body) = locate( loc => {
|
|
271 | 271 | })
|
272 | 272 |
|
273 | 273 | #let polylux-slide(body) = {
|
274 |
| - locate( loc => { |
275 |
| - if logical-slide.at(loc).first() > 0 { |
| 274 | + context { |
| 275 | + if logical-slide.get().first() > 0 { |
276 | 276 | pagebreak(weak: true)
|
277 | 277 | }
|
278 |
| - }) |
| 278 | + } |
279 | 279 | logical-slide.step()
|
280 | 280 | subslide.update(1)
|
281 | 281 | repetitions.update(1)
|
282 | 282 | pause-counter.update(0)
|
283 | 283 |
|
284 | 284 | // Having this here is a bit unfortunate concerning separation of concerns
|
285 | 285 | // but I'm not comfortable with logic depending on pdfpc...
|
286 |
| - let pdfpc-slide-markers(curr-subslide) = locate( loc => [ |
| 286 | + let pdfpc-slide-markers(curr-subslide) = context [ |
287 | 287 | #metadata((t: "NewSlide")) <pdfpc>
|
288 |
| - #metadata((t: "Idx", v: counter(page).at(loc).first() - 1)) <pdfpc> |
| 288 | + #metadata((t: "Idx", v: counter(page).get().first() - 1)) <pdfpc> |
289 | 289 | #metadata((t: "Overlay", v: curr-subslide - 1)) <pdfpc>
|
290 |
| - #metadata((t: "LogicalSlide", v: logical-slide.at(loc).first())) <pdfpc> |
291 |
| - ]) |
| 290 | + #metadata((t: "LogicalSlide", v: logical-slide.get().first())) <pdfpc> |
| 291 | + ] |
292 | 292 |
|
293 | 293 | pdfpc-slide-markers(1)
|
294 | 294 |
|
|
297 | 297 | subslide.step()
|
298 | 298 | set heading(outlined: false)
|
299 | 299 |
|
300 |
| - locate( loc => { |
301 |
| - let reps = repetitions.at(loc).first() |
| 300 | + context { |
| 301 | + let reps = repetitions.get().first() |
302 | 302 | for curr-subslide in range(2, reps + 1) {
|
303 | 303 | pause-counter.update(0)
|
304 | 304 | pagebreak(weak: true)
|
|
308 | 308 | body
|
309 | 309 | subslide.step()
|
310 | 310 | }
|
311 |
| - }) |
| 311 | + } |
312 | 312 | }
|
0 commit comments