Debian Codegraph @

texmf-dist/tex/latex/ltx-talk/ltx-talk.cls

raw
1 %%
2 %% This is file `ltx-talk.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltx-talk.dtx (with options: `class')
8 %% ltx-talk-color.dtx (with options: `class')
9 %% ltx-talk-decode.dtx (with options: `class')
10 %% ltx-talk-frame.dtx (with options: `class')
11 %% ltx-talk-frame-structure.dtx (with options: `class')
12 %% ltx-talk-mode.dtx (with options: `class')
13 %% ltx-talk-overlay.dtx (with options: `class')
14 %% ltx-talk-required.dtx (with options: `class')
15 %% ltx-talk-structure.dtx (with options: `class')
16 %% ltx-talk-title.dtx (with options: `class')
17 %%
18 \ProvidesExplClass {ltx-talk} {2026-04-30} {0.5.0}
19 {A class for typesetting presentations}
20 \prop_gput:Nnn \g_msg_module_name_prop { talk } { ltx-talk }
21 \prop_gput:Nnn \g_msg_module_type_prop { talk } { Class }
22 \IfFormatAtLeastF { 2025-11-01 }
23 {
24 \msg_new:nnnn { ltx-talk } { kernel-too-old }
25 { The~ltx-talk~class~requires~LaTeX~2025-11-01~or~later. }
26 {
27 You~have~tried~to~use~the~ltx-talk~class~with~a~LaTeX~kernel~release~
28 prior~to~2025-11-01;~the~required~functionality~is~missing.
29 }
30 \msg_fatal:nn { ltx-talk } { kernel-too-old }
31 }
32 \NeedsDocumentMetadata
33 \bool_lazy_or:nnF
34 { \sys_if_engine_luatex_p: }
35 { \sys_if_engine_pdftex_p: }
36 {
37 \msg_new:nnn { ltx-talk } { unsupported-engine }
38 {
39 The~engine~"\c_sys_engine_str"~
40 is~not~supported~by~the~ltx-talk~class.
41 }
42 \msg_warning:nn { ltx-talk } { unsupported-engine }
43 }
44 \cs_gset_protected:Npn \vbox_set_to_wd:Nnn #1#2#3
45 {
46 \tex_setbox:D #1 \tex_vbox:D
47 {
48 \tex_hsize:D \__box_dim_eval:n {#2}
49 \color_group_begin: #3 \par \color_group_end:
50 }
51 \box_dp:N #1 \__box_dim_eval:n {#2}
52 }
53 \cs_gset_protected:Npn \vbox_set_to_wd:Nnw #1#2
54 {
55 \cs_set_protected:Npn \__box_set_to_wd:
56 { \box_wd:N #1 \__box_dim_eval:n {#2} }
57 \tex_setbox:D #1 \tex_vbox:D
58 \c_group_begin_token
59 \tex_hsize:D \__box_dim_eval:n {#2}
60 \group_insert_after:N \__box_set_to_wd:
61 \color_group_begin:
62 }
63 \cs_gset_protected:Npn \rule:nnn #1#2#3
64 {
65 \tex_vrule:D
66 height \dim_eval:n {#2} \exp_stop_f:
67 depth \dim_eval:n {#3} \exp_stop_f:
68 width \dim_eval:n {#1} \exp_stop_f:
69 \scan_stop:
70 }
71 \cs_gset_protected:Npn \opacity_begin:n #1
72 { \__opacity_select:nN {#1} \__opacity_backend_begin:n }
73 \cs_gset_protected:Npn \opacity_end:
74 { \__opacity_backend_end: }
75 \AddToHook { begindocument }
76 {
77 \cs_gset_protected:Npe \__opacity_backend_begin:n #1
78 {
79 \bool_lazy_any:nTF
80 {
81 { \sys_if_engine_pdftex_p: }
82 { \sys_if_engine_luatex_p: }
83 { \sys_if_engine_xetex_p: }
84 }
85 {
86 \tl_set:Nn \exp_not:N \l__opacity_backend_fill_tl {#1}
87 \tl_set:Nn \exp_not:N \l__opacity_backend_stroke_tl {#1}
88 \pdfmanagement_add:nnn { Page / Resources / ExtGState }
89 { opacity #1 }
90 { << /ca ~ #1 /CA ~ #1 >> }
91 \sys_if_engine_xetex:TF
92 { \__kernel_backend_literal_pdf:n }
93 {
94 \__kernel_color_backend_stack_push:nn
95 \exp_not:N \c__opacity_backend_stack_int
96 }
97 { /opacity #1 ~ gs }
98 }
99 {
100 \__opacity_backend:nnn {#1} { fill } { ca }
101 \__opacity_backend:nnn {#1} { stroke } { ca }
102 }
103 }
104 \cs_gset_protected:Npe \__opacity_backend_end:
105 {
106 \bool_lazy_any:nTF
107 {
108 { \sys_if_engine_pdftex_p: }
109 { \sys_if_engine_luatex_p: }
110 { \sys_if_engine_xetex_p: }
111 }
112 { \__opacity_backend_reset: }
113 {
114 \__opacity_backend_reset_fill:
115 \__opacity_backend_reset_stroke:
116 }
117 }
118 }
119 \cs_generate_variant:Nn \clist_set:Nn { cv }
120 \cs_generate_variant:Nn \hook_gput_code:nnn { nne }
121 \exp_args_generate:n { nVv }
122 \cs_generate_variant:Nn \color_select:n { V }
123 \cs_generate_variant:Nn \dim_compare:nNnTF { v }
124 \cs_generate_variant:Nn \dim_compare_p:nNn { vNv }
125 \cs_generate_variant:Nn \dim_max:nn { v }
126 \cs_generate_variant:Nn \str_replace_all:Nnn { NnV }
127 \cs_generate_variant:Nn \text_purify:n { v }
128 \cs_generate_variant:Nn \vbox_to_ht:nn { v }
129 \cs_new_protected:Npn \__talk_tmp:w { }
130 \box_new:N \l__talk_tmp_box
131 \tl_new:N \l__talk_tmp_tl
132 \keys_define:nn { talk }
133 {
134 aspect-ratio .str_set:N =
135 \l__talk_aspect_ratio_str ,
136 font-size .dim_set:N =
137 \l__talk_fontsize_dim ,
138 frame-title-arg .bool_set:N =
139 \l__talk_frame_title_bool ,
140 handout .code:n =
141 { \str_set:Nn \l__talk_mode_str { handout } } ,
142 handout .value_forbidden:n = true ,
143 mode .choices:nn =
144 { handout , projector }
145 { \str_set:NV \l__talk_mode_str \l_keys_choice_tl }
146 }
147 \str_new:N \l__talk_mode_str
148 \keys_define:nn { talk }
149 {
150 aspect-ratio .usage:n = load ,
151 font-size .usage:n = load ,
152 frame-title-arg .usage:n = load ,
153 mode .usage:n = load
154 }
155 \clist_map_inline:nn { 10pt , 11pt , 12pt }
156 {
157 \keys_define:nn { talk }
158 {
159 #1 .meta:n = { font-size = #1 } ,
160 #1 .value_forbidden:n = true ,
161 #1. usage:n = load
162 }
163 }
164 \keys_set:nn { talk }
165 {
166 aspect-ratio = 16:9 ,
167 font-size = 11pt ,
168 frame-title-arg = false ,
169 mode = projector
170 }
171 \ProcessKeyOptions [ talk ]
172 \file_if_exist_input:nF { size \dim_to_decimal:n \l__talk_fontsize_dim .clo }
173 {
174 \file_input:n { size10.clo }
175 \RequirePackage { relsize }
176 \hook_gput_code:nne { begindocument } { talk }
177 { \exp_not:N \relsize { \fp_eval:n { \l__talk_fontsize_dim / 10pt } } }
178 }
179 \dim_const:Nn \c__talk_paper_height_dim { 100mm }
180 \use:e
181 {
182 \cs_set_protected:Npn \exp_not:N \__talk_tmp:w
183 #1 \tl_to_str:n { : } #2 \tl_to_str:n { : } #3 \exp_not:N \q_stop
184 {
185 \dim_const:Nn \exp_not:N \c__talk_paper_width_dim
186 {
187 \exp_not:N \fp_to_dim:n
188 { (#1 / #2) * \exp_not:N \c__talk_paper_height_dim }
189 }
190 }
191 \exp_not:N \__talk_tmp:w \l__talk_aspect_ratio_str
192 \tl_to_str:n { : } 100 \exp_not:N \q_stop
193 }
194 \use:e
195 {
196 \exp_not:N \RequirePackage
197 [
198 papersize =
199 {
200 \dim_use:N \c__talk_paper_width_dim ,
201 \dim_use:N \c__talk_paper_height_dim
202 } ,
203 tmargin = 10mm ,
204 bmargin = 8mm ,
205 lmargin = 10mm ,
206 rmargin = 10mm ,
207 headheight = 10mm ,
208 headsep = 2mm ,
209 footskip = 6mm
210 ]
211 { geometry }
212 }
213 \raggedright
214 \RequirePackage { amsmath }
215 \sys_if_engine_opentype:TF
216 {
217 \RequirePackage { fontspec }
218 \RequirePackage { mathtools }
219 \sys_if_engine_luatex:TF
220 {
221 \RequirePackage { lua-unicode-math }
222 \tagpdfsetup { math / mathml / luamml / load = true }
223 }
224 { \RequirePackage { unicode-math } }
225 \setmainfont { NewCMSans10-Regular.otf }
226 \setsansfont { NewCMSans10-Regular.otf }
227 \setmathfont { NewCMSansMath-Regular.otf }
228 }
229 {
230 \RequirePackage { sansmathfonts }
231 \RequirePackage [ nomath ] { lmodern }
232 \cs_set_eq:NN \rmdefault \sfdefault
233 }
234 \cs_set_nopar:Npn \textsubscript@offset { 0.48ex }
235 \cs_set_nopar:Npn \textsubscript@space { }
236 \cs_set_nopar:Npn \textsuperscript@offset { 0.86ex }
237 \cs_set_nopar:Npn \textsuperscript@space { }
238 \cs_new:Npn \thepage { \@arabic \c@page }
239 \RequirePackage { hyperref }
240 \hypersetup { hidelinks }
241 \tagpdfsetup
242 {
243 role / user-NS = ltx-talk ,
244 role / new-tag = frame / Sect ,
245 role / new-tag = frametitle / H4
246 }
247 \RequirePackage { xcolor }
248 \NewCommandCopy \stdcolor \color
249 \NewCommandCopy \stdmathcolor \mathcolor
250 \NewCommandCopy \stdtextcolor \textcolor
251 \cs_generate_variant:Nn \color_select:n { e }
252 \cs_generate_variant:Nn \color_select:nn { ne }
253 \cs_generate_variant:Nn \color_math:nn { e }
254 \cs_generate_variant:Nn \color_math:nnn { ne }
255 \RenewDocumentCommand \color { D <> { all } o m }
256 {
257 \__talk_if_overlay:nT {#1}
258 {
259 \IfNoValueTF {#2}
260 { \color_select:e {#3} }
261 { \color_select:ne {#2} {#3} }
262 }
263 \ignorespaces
264 }
265 \RenewDocumentCommand \mathcolor { D <> { all } o m +m }
266 {
267 \__talk_if_overlay:nT {#1}
268 {
269 \IfNoValueTF {#2}
270 { \color_math:en {#3} {#4} }
271 { \color_math:nen {#2} {#3} {#4} }
272 }
273 }
274 \RenewDocumentCommand \textcolor { D <> { all } o m +m }
275 {
276 \mode_leave_vertical:
277 \group_begin:
278 \__talk_if_overlay:nT {#1}
279 {
280 \IfNoValueTF {#2}
281 { \color_select:e {#3} }
282 { \color_select:ne {#2} {#3} }
283 }
284 #4
285 \group_end:
286 }
287 \RenewDocumentCommand \pagecolor { D <> { all } o m }
288 {
289 \__talk_if_overlay:nT {#1}
290 {
291 \IfNoValueTF {#2}
292 { \__talk_pagecolor:n { {#3} } }
293 { \__talk_pagecolor:n { [ {#2} ] {#3} } }
294 }
295 }
296 \cs_new_protected:Npn \__talk_pagecolor:n #1
297 {
298 \AddToHook { shipout / background }
299 {
300 \color #1
301 \put ( 0cm, -\paperheight )
302 { \rule { \paperwidth } { \paperheight } }
303 }
304 }
305 \cs_set_eq:NN \stdset@color \set@color
306 \cs_set_eq:NN \stdreset@color \reset@color
307 \cs_set_eq:NN \set@color \color_ensure_current:
308 \cs_set_eq:NN \reset@color \__color_backend_reset:
309 \NewDocumentCommand \DeclareColor { m o m }
310 {
311 \IfNoValueTF {#2}
312 { \colorlet {#1} {#3} }
313 { \definecolor {#1} {#2} {#3} }
314 }
315 \DeclareColor { alert } [ RGB ] { 200 , 0 , 0 }
316 \DeclareColor { example } { green!50!black }
317 \DeclareColor { structure } [ rgb ] { 0.2 , 0.2 , 0.7 }
318 \bool_new:N \l__talk_decode_overlays_bool
319 \int_new:N \g__talk_pauses_int
320 \cs_new_eq:NN \c@pauses \g__talk_pauses_int
321 \cs_new:Npn \thepauses { \@arabic \g__talk_pauses_int }
322 \bool_new:N \l__talk_decode_modes_bool
323 \bool_new:N \l__talk_decode_step_bool
324 \str_new:N \l__talk_decode_arg_str
325 \clist_new:N \l__talk_decode_overlays_clist
326 \str_new:N \l__talk_decode_overlays_str
327 \str_new:N \l__talk_decode_action_str
328 \bool_new:N \l__talk_decode_actions_bool
329 \clist_new:N \l__talk_decode_actions_clist
330 \str_new:N \l__talk_decode_actions_str
331 \cs_new_protected:Npn \__talk_decode_parse:n #1
332 { \exp_args:Ne \__talk_decode_parse_auxi:n {#1} }
333 \cs_new_protected:Npn \__talk_decode_parse_auxi:n #1
334 {
335 \str_clear:N \l__talk_decode_action_str
336 \bool_lazy_or:nnTF
337 { \tl_if_blank_p:n {#1} }
338 { \str_if_eq_p:nn {#1} { all } }
339 { \bool_set_true:N \l__talk_decode_overlays_bool }
340 {
341 \str_set:Nn \l__talk_decode_arg_str {#1}
342 \bool_set_false:N \l__talk_decode_actions_bool
343 \bool_set_false:N \l__talk_decode_overlays_bool
344 \bool_set_false:N \l__talk_decode_modes_bool
345 \exp_args:No \__talk_decode_parse_auxii:n { \l__talk_decode_arg_str }
346 }
347 }
348 \cs_new_protected:Npn \__talk_decode_parse_auxii:n #1
349 {
350 \bool_set_false:N \l__talk_decode_step_bool
351 \__talk_decode_parse:w #1 | \q_recursion_tail | \q_recursion_stop
352 \bool_if:NT \l__talk_decode_step_bool
353 {
354 \legacy_if:nF { measuring@ }
355 { \int_gincr:N \g__talk_pauses_int }
356 }
357 }
358 \cs_new_protected:Npn \__talk_decode_parse:w #1 |
359 {
360 \quark_if_recursion_tail_stop_do:nn {#1}
361 {
362 \bool_lazy_and:nnT
363 { \str_if_empty_p:N \l__talk_decode_overlays_str }
364 { ! \l__talk_decode_modes_bool }
365 { \bool_set_true:N \l__talk_decode_overlays_bool }
366 }
367 \exp_args:Ne \__talk_decode_mode:n
368 { \tl_trim_spaces:n {#1} }
369 \__talk_decode_parse:w
370 }
371 \clist_const:Ne \c__talk_modes_clist
372 {
373 \tl_to_str:n { article } ,
374 \tl_to_str:n { handout } ,
375 \tl_to_str:n { projector }
376 }
377 \cs_new_protected:Npe \__talk_decode_mode:n #1
378 {
379 \clist_if_in:NnTF \exp_not:N \c__talk_modes_clist {#1}
380 {
381 \bool_set_true:N \exp_not:N \l__talk_decode_modes_bool
382 \exp_not:N \str_if_eq:VnT
383 \exp_not:N \l__talk_mode_str {#1}
384 { \bool_set_true:N \exp_not:N \l__talk_decode_overlays_bool }
385 }
386 {
387 \exp_not:N \__talk_decode_mode:w #1 \tl_to_str:n { : : }
388 \exp_not:N \q_stop
389 }
390 }
391 \use:e
392 {
393 \cs_new_protected:Npe \exp_not:N \__talk_decode_mode:w
394 #1 \token_to_str:N :
395 #2 \token_to_str:N :
396 #3 \exp_not:N \q_stop
397 }
398 {
399 \exp_not:N \tl_if_blank:nTF {#2}
400 {
401 \exp_not:N \__talk_decode_mode:nn
402 { \tl_to_str:n { projector } } {#1}
403 }
404 { \exp_not:N \__talk_decode_mode:nn {#1} {#2} }
405 }
406 \cs_new_protected:Npn \__talk_decode_mode:nn #1#2
407 {
408 \str_if_eq:VnTF \l__talk_mode_str {#1}
409 {
410 \__talk_decode_action:n {#2}
411 \str_if_empty:NT \l__talk_decode_overlays_str
412 { \__talk_decode_overlays:nn { overlays } { * } }
413 }
414 {
415 \tl_if_blank:nT {#2}
416 { \bool_set_true:N \l__talk_decode_modes_bool }
417 }
418 }
419 \cs_new_protected:Npe \__talk_decode_action:n #1
420 {
421 \exp_not:N \__talk_decode_action:w
422 #1 \tl_to_str:n { @ @ } \exp_not:N \q_stop
423 }
424 \use:e
425 {
426 \cs_new_protected:Npn \exp_not:N \__talk_decode_action:w
427 #1 \tl_to_str:n { @ } #2 \tl_to_str:n { @ } #3 \exp_not:N \q_stop
428 }
429 {
430 \tl_if_blank:nTF {#2}
431 {
432 \str_if_empty:NTF \l__talk_decode_action_str
433 { \__talk_decode_overlays:nn { overlays } {#1} }
434 {
435 \msg_error:nnV { talk } { misplaced-action-spec }
436 \l__talk_decode_arg_str
437 }
438 }
439 {
440 \cs_if_exist:cTF { __talk_action_ #1 :N }
441 {
442 \str_if_empty:NTF \l__talk_decode_action_str
443 {
444 \str_set:Nn \l__talk_decode_action_str {#1}
445 \tl_if_blank:nF {#2}
446 { \__talk_decode_overlays:nn { actions } {#2} }
447 }
448 {
449 \msg_error:nnV { talk } { duplicate-action-spec }
450 \l__talk_decode_arg_str
451 }
452 }
453 {
454 \msg_error:nnV { talk } { bad-action-spec }
455 \l__talk_decode_arg_str
456 }
457 }
458 }
459 \cs_new_protected:Npn \__talk_decode_overlays:nn #1#2
460 {
461 \str_clear:c { l__talk_decode_ #1 _str }
462 \__talk_decode_overlays:nN {#1} #2 \q_recursion_tail \q_recursion_stop
463 \__talk_decode_check:n {#1}
464 }
465 \cs_new_protected:Npn \__talk_decode_overlays:nN #1#2
466 {
467 \quark_if_recursion_tail_stop:N #2
468 \cs_if_exist_use:cF { __talk_decode_overlay_ #2 :nw }
469 {
470 \str_put_right:cn { l__talk_decode_ #1 _str } {#2}
471 \__talk_decode_overlays:nN
472 }
473 {#1}
474 }
475 \cs_new_protected:cpn { __talk_decode_overlay_+:nw } #1
476 {
477 \bool_set_true:N \l__talk_decode_step_bool
478 \__talk_decode_overlay_aux:nNN {#1} 1
479 }
480 \cs_new_protected:cpn { __talk_decode_overlay_.:nw } #1
481 { \__talk_decode_overlay_aux:nNN {#1} 0 }
482 \cs_new_protected:Npn \__talk_decode_overlay_aux:nNN #1#2#3
483 {
484 \quark_if_recursion_tail_stop_do:Nn #3
485 {
486 \__talk_decode_overlay_offset:nNn {#1} #2 { 0 }
487 \q_recursion_tail \q_recursion_stop
488 }
489 \token_if_eq_meaning:NNTF #3 ( % )
490 { \__talk_decode_overlay_offset:nNnN {#1} #2 { } }
491 { \__talk_decode_overlay_offset:nNn {#1} #2 { 0 } #3 }
492 }
493 \cs_new_protected:Npn \__talk_decode_overlay_offset:nNnN #1#2#3#4
494 {
495 \quark_if_recursion_tail_stop_do:Nn #4
496 {
497 \msg_error:nnV { talk } { bad-action-spec }
498 \l__talk_decode_arg_str
499 } % (
500 \token_if_eq_meaning:NNTF #4 )
501 { \__talk_decode_overlay_offset:nNn {#1} #2 {#3} }
502 { \__talk_decode_overlay_offset:nNnN {#1} #2 {#3#4} }
503 }
504 \cs_new_protected:Npn \__talk_decode_overlay_offset:nNn #1#2#3
505 {
506 \str_put_right:ce { l__talk_decode_ #1 _str }
507 { \int_max:nn { 0 } { #3 + \g__talk_pauses_int + #2 } }
508 \__talk_decode_overlays:nN {#1}
509 }
510 \cs_new_protected:Npn \__talk_decode_check:n #1
511 {
512 \clist_set:cv { l__talk_decode_ #1 _clist } { l__talk_decode_ #1 _str }
513 \clist_if_in:cnTF { l__talk_decode_ #1 _clist } { * }
514 { \bool_set_true:c { l__talk_decode_ #1 _bool } }
515 {
516 \clist_map_inline:cn { l__talk_decode_ #1 _clist }
517 { \__talk_decode_check:nw {#1} 0 ##1 - - \q_stop }
518 }
519 }
520 \cs_new_protected:Npn \__talk_decode_check:nw #1#2 - #3 - #4 \q_stop
521 {
522 \tl_if_empty:nTF {#4}
523 { \__talk_decode_check_single:nn {#1} {#2} }
524 {
525 \tl_if_blank:nTF {#3}
526 { \__talk_decode_check_range:nnn {#1} {#2} { \c_max_int } }
527 { \__talk_decode_check_range:nnn {#1} {#2} {#3} }
528 }
529 }
530 \cs_new_protected:Npn \__talk_decode_check_single:nn #1#2
531 {
532 \int_compare:nNnTF \g__talk_slide_int = {#2}
533 { \bool_set_true:c { l__talk_decode_ #1 _bool } }
534 {
535 \int_compare:nNnT {#2} > \g__talk_slide_int
536 { \bool_gset_true:N \g__talk_slide_continue_bool }
537 }
538 }
539 \cs_set_protected:Npn \__talk_decode_check_range:nnn #1#2#3
540 {
541 \int_compare:nNnF \g__talk_slide_int > {#3}
542 {
543 \int_compare:nNnTF \g__talk_slide_int < {#2}
544 { \bool_gset_true:N \g__talk_slide_continue_bool }
545 {
546 \bool_set_true:c { l__talk_decode_ #1 _bool }
547 \bool_lazy_and:nnT
548 { \int_compare_p:nNn \g__talk_slide_int < {#3} }
549 { \int_compare_p:nNn {#3} < \c_max_int }
550 { \bool_gset_true:N \g__talk_slide_continue_bool }
551 \clist_map_break:
552 }
553 }
554 }
555 \msg_new:nnnn { talk } { bad-action-spec }
556 { Bad~overlay~specification~"#1". }
557 {
558 The~overlay~specification~given~doesn't~follow~the~pattern~described~in~
559 the~ltx-talk~manual:~it~has~been~ignored.
560 }
561 \msg_new:nnnn { talk } { duplicate-action-spec }
562 { Duplicate~action~in~overlay~specification~"#1". }
563 {
564 The~overlay~specification~contains~more~than~one~action:
565 ltx-talk~only~supports~a~single~action~in~one~overlay.
566 }
567 \msg_new:nnnn { talk } { misplaced-action-spec }
568 { Misplaced~action~in~overlay~specification~"#1". }
569 {
570 The~overlay~specification~contains~an~action~before~the~overlay~
571 part(s):~this~is~not~supported.
572 }
573 \bool_new:N \g__talk_slide_continue_bool
574 \bool_new:N \l__talk_slide_continue_bool
575 \box_new:N \l__talk_slide_box
576 \int_new:N \g__talk_slide_int
577 \cs_new_eq:NN \c@slide \g__talk_slide_int
578 \cs_new:Npn \theslide { \@arabic \c@slide }
579 \property_new:nnnn { slides } { now } { 1 } { \int_use:N \g__talk_slide_int }
580 \cs_new_protected:Npn \__talk_slide:nn #1#2
581 {
582 \group_begin:
583 \tl_set:Ne \l__talk_tmp_tl
584 {
585 \property_ref:ee { frame . \int_use:N \g__talk_frame_int }
586 { slides }
587 }
588 \str_if_eq:VnTF \l__talk_frame_tagging_str { n }
589 { \str_set:NV \l__talk_frame_tagging_str \l__talk_tmp_tl }
590 {
591 \str_replace_all:NnV \l__talk_frame_tagging_str { ,n }
592 \l__talk_tmp_tl
593 \str_replace_all:NnV \l__talk_frame_tagging_str { ,~n }
594 \l__talk_tmp_tl
595 }
596 \int_gzero:N \g__talk_slide_int
597 \RenewCommandCopy \frame \__talk_latexe_frame:n
598 \bool_do_while:Nn \g__talk_slide_continue_bool
599 {
600 \int_gincr:N \g__talk_slide_int
601 \bool_gset_false:N \g__talk_slide_continue_bool
602 \__talk_if_overlay:nT {#1}
603 {
604 \__talk_slide_begin:
605 \bool_set_eq:NN \l__talk_slide_continue_bool
606 \g__talk_slide_continue_bool
607 \__talk_if_overlay:VTF \l__talk_frame_tagging_str
608 {
609 \bool_gset_eq:NN \g__talk_slide_continue_bool
610 \l__talk_slide_continue_bool
611 \__talk_frame_tag:n
612 }
613 {
614 \bool_gset_eq:NN \g__talk_slide_continue_bool
615 \l__talk_slide_continue_bool
616 \__talk_frame_notag:n
617 }
618 {
619 \bool_if:NTF \l__talk_frame_verb_bool
620 { \__talk_slide_aux:n }
621 { \use:n }
622 {#2}
623 }
624 \__talk_slide_end:
625 }
626 }
627 \property_record:ee { frame . \int_use:N \g__talk_frame_int }
628 { slides }
629 \group_end:
630 }
631 \cs_new_protected:Npn \__talk_slide_aux:n #1
632 {
633 \group_begin:
634 \cs_set:Npn \obeyedline { ^^J }
635 \use:e
636 {
637 \group_end:
638 \tl_retokenize:n {#1}
639 }
640 }
641 \AddToHook { enddocument / afterlastpage }
642 {
643 \property_record:ee { frame . \int_use:N \g__talk_frame_int }
644 { slides }
645 }
646 \int_new:N \g__talk_frame_struct_int
647 \cs_new_protected:Npn \__talk_slide_begin:
648 {
649 \int_gzero:N \g__talk_pauses_int
650 \tl_gclear:N \g__talk_frame_title_tl
651 \tl_gclear:N \g__talk_frame_subtitle_tl
652 \box_gclear:N \g__talk_footnote_box
653 \__talk_cnt_save:
654 \vbox_set:Nw \l__talk_slide_box
655 \tl_gclear:N \g__talk_onslide_tl
656 }
657 \cs_new_protected:Npn \__talk_slide_end:
658 {
659 \tl_use:N \g__talk_onslide_tl
660 \vbox_set_end:
661 \bool_if:NT \g__talk_slide_continue_bool
662 { \__talk_cnt_restore: }
663 \vbox_to_ht:nn { \textheight }
664 {
665 \use:c { __talk_slide_align_ \l__talk_frame_alignment_tl :n }
666 { \vbox_unpack_drop:N \l__talk_slide_box }
667 \box_if_empty:NF \g__talk_footnote_box
668 {
669 \footnoterule
670 \vbox_unpack_drop:N \g__talk_footnote_box
671 }
672 }
673 \clearpage
674 }
675 \cs_new_protected:Npn \__talk_slide_align_bottom:n #1
676 {
677 \skip_vertical:n { 0pt~plus~1fil }
678 #1
679 \skip_vertical:n { 0pt }
680 }
681 \cs_new_protected:Npn \__talk_slide_align_center:n #1
682 {
683 \skip_vertical:n { 0pt~plus~0.5fil }
684 #1
685 \skip_vertical:n { 0pt~plus~0.5fil }
686 }
687 \cs_new_protected:Npn \__talk_slide_align_stretch:n #1
688 {
689 \skip_vertical:n { 0pt }
690 #1
691 \skip_vertical:n { 0pt }
692 }
693 \cs_new_protected:Npn \__talk_slide_align_top:n #1
694 {
695 \skip_vertical:n { 0pt }
696 #1
697 \skip_vertical:n { 0pt~plus~1fil }
698 }
699 \seq_new:N \g__talk_cnt_reset_seq
700 \seq_gset_from_clist:Nn \g__talk_cnt_reset_seq
701 {
702 equation ,
703 footnote ,
704 mpfootnote ,
705 parentequation
706 }
707 \seq_map_inline:Nn \g__talk_cnt_reset_seq
708 {
709 \int_new:c { g__talk_saved_ #1 _int }
710 \int_gset_eq:cc { g__talk_saved_ #1 _int } { c@ #1 }
711 }
712 \cs_new_protected:Npn \__talk_cnt_save:
713 {
714 \seq_map_inline:Nn \g__talk_cnt_reset_seq
715 { \int_gset_eq:cc { g__talk_saved_ ##1 _int } { c@ ##1 } }
716 }
717 \cs_new_protected:Npn \__talk_cnt_restore:
718 {
719 \seq_map_inline:Nn \g__talk_cnt_reset_seq
720 { \int_gset_eq:cc { c@ ##1 } { g__talk_saved_ ##1 _int } }
721 }
722 \cs_new_eq:NN \std@definecounter \@definecounter
723 \cs_gset_protected:Npn \@definecounter #1
724 {
725 \std@definecounter {#1}
726 \int_new:c { g__talk_saved_ #1 _int }
727 \seq_gput_right:Nn \g__talk_cnt_reset_seq {#1}
728 }
729 \tl_new:N \l__talk_frame_alignment_tl
730 \keys_define:nn { talk / frame }
731 {
732 action-spec .str_set:N =
733 \l__talk_action_spec_str ,
734 label .meta:n =
735 { name = {#1} } ,
736 name .str_set:N =
737 \l__talk_frame_name_str ,
738 tag-slides .str_set:N =
739 \l__talk_frame_tagging_str ,
740 vertical-alignment .choices:nn =
741 { bottom , center , stretch , top }
742 {
743 \tl_set_eq:NN \l__talk_frame_alignment_tl
744 \l_keys_value_tl
745 }
746 }
747 \keys_set:nn { talk / frame }
748 {
749 action-spec = ,
750 name = ,
751 tag-slides = n ,
752 vertical-alignment = center
753 }
754 \cs_new_protected:Npn \__talk_header_tag_begin:n #1
755 {
756 \tag_resume:n { header }
757 \tag_mc_end:
758 \tag_struct_begin:n {#1}
759 \tag_mc_begin:n { }
760 }
761 \cs_generate_variant:Nn \__talk_header_tag_begin:n { e }
762 \cs_new_protected:Npn \__talk_header_tag_end:
763 {
764 \tag_mc_end:
765 \tag_struct_end:
766 \tag_mc_begin:n { artifact }
767 \tag_suspend:n { header }
768 }
769 \NewTemplateType { footer-element } { 1 }
770 \DeclareTemplateInterface { footer-element } { talk } { 1 }
771 {
772 color : tokenlist ,
773 font : tokenlist = ,
774 left-hspace : length = 0em ,
775 right-hspace : length = 0em
776 }
777 \DeclareTemplateCode { footer-element } { talk } { 1 }
778 {
779 color = \l__talk_footelem_color_tl ,
780 font = \l__talk_footelem_font_tl ,
781 left-hspace = \l__talk_footelem_left_skip ,
782 right-hspace = \l__talk_footelem_right_skip
783 }
784 {
785 \tl_if_empty:nF {#1}
786 {
787 \hspace { \l__talk_footelem_left_skip }
788 \hbox:n
789 {
790 \tl_if_empty:NF \l__talk_footelem_color_tl
791 { \color_select:V \l__talk_footelem_color_tl }
792 \l__talk_footelem_font_tl
793 #1
794 }
795 \hspace { \l__talk_footelem_right_skip }
796 }
797 }
798 \DeclareInstance { footer-element } { date } { talk } { }
799 \DeclareInstance { footer-element } { author } { talk } { }
800 \DeclareInstance { footer-element } { title } { talk } { }
801 \DeclareInstance { footer-element } { subtitle } { talk } { }
802 \DeclareInstance { footer-element } { institute } { talk } { }
803 \DeclareInstance { footer-element } { framenumber } { talk } { }
804 \DeclareInstance { footer-element } { totalframes } { talk } { }
805 \NewTemplateType { header } { 0 }
806 \DeclareTemplateInterface { header } { talk } { 0 }
807 {
808 background-color : tokenlist,
809 color : tokenlist = structure ,
810 font : tokenlist = \normalfont ,
811 height : length = \Gm@tmargin + \headsep ,
812 left-hspace : skip = \Gm@lmargin ,
813 print-frame-title : boolean = true ,
814 right-hspace : skip = \Gm@rmargin
815 }
816 \DeclareTemplateCode { header } { talk } { 0 }
817 {
818 background-color = \l__talk_header_bg_tl ,
819 color = \l__talk_header_fg_tl ,
820 font = \l__talk_header_font_tl ,
821 height = \l__talk_header_ht_dim ,
822 left-hspace = \l__talk_header_left_skip ,
823 print-frame-title = \l__talk_header_frametitle_bool ,
824 right-hspace = \l__talk_header_right_skip
825 }
826 {
827 \noindent
828 \__talk_wallpaper_hrule:Nnn
829 \l__talk_header_bg_tl
830 { \l__talk_header_ht_dim - \headsep }
831 { \headsep }
832 \skip_horizontal:n { \l__talk_header_left_skip }
833 \group_begin:
834 \tl_if_empty:NF \l__talk_header_fg_tl
835 { \color_select:V \l__talk_header_fg_tl }
836 \l__talk_header_font_tl
837 \bool_if:NT \l__talk_header_frametitle_bool
838 {
839 \ExpandArgs { nnV }
840 \UseInstance { frametitle } { header }
841 \g__talk_frame_title_tl
842 }
843 \group_end:
844 }
845 \DeclareInstance { header } { std } { talk } { }
846 \AddToHook { begindocument }
847 {
848 \DeclareInstanceCopy { header } { wallpaper } { std }
849 \EditInstance { header } { wallpaper }
850 { print-frame-title = false }
851 }
852 \NewTemplateType { footer } { 0 }
853 \DeclareTemplateInterface { footer } { talk } { 0 }
854 {
855 background-color : tokenlist ,
856 color : tokenlist ,
857 element-order : commalist ,
858 font : tokenlist = \tiny ,
859 left-hspace : length = \Gm@lmargin ,
860 right-hspace : length = \Gm@rmargin ,
861 separator : tokenlist = \hfil
862 }
863 \DeclareTemplateCode { footer } { talk } { 0 }
864 {
865 background-color = \l__talk_footer_bg_tl ,
866 color = \l__talk_footer_fg_tl ,
867 element-order = \l__talk_footer_order_clist ,
868 font = \l__talk_footer_font_tl ,
869 left-hspace = \l__talk_footer_left_skip ,
870 right-hspace = \l__talk_footer_right_skip ,
871 separator = \l__talk_footer_sep_tl
872 }
873 {
874 \noindent
875 \__talk_wallpaper_hrule:Nnn
876 \l__talk_footer_bg_tl
877 { \footskip }
878 { \Gm@bmargin - \footskip }
879 \skip_horizontal:n { \l__talk_footer_left_skip }
880 \vbox_set_to_wd:Nnn \l__talk_tmp_box
881 {
882 \paperwidth
883 - \l__talk_footer_left_skip
884 - \l__talk_footer_right_skip
885 }
886 {
887 \tl_if_empty:NF \l__talk_footer_fg_tl
888 { \color_select:V \l__talk_footer_fg_tl }
889 \l__talk_footer_font_tl
890 \clist_pop:NNT \l__talk_footer_order_clist \l__talk_tmp_tl
891 {
892 \ExpandArgs { nVv } \UseInstance { footer-element } \l__talk_tmp_tl
893 { @ \__talk_metadata_name:n { \l__talk_tmp_tl } }
894 \clist_map_inline:Nn \l__talk_footer_order_clist
895 {
896 \tl_if_empty:cF { @ \__talk_metadata_name:n { ##1 } }
897 {
898 \l__talk_footer_sep_tl
899 \ExpandArgs { nnv }
900 \UseInstance { footer-element } {##1}
901 { @ \__talk_metadata_name:n { ##1 } }
902 }
903 }
904 }
905 \hfil
906 }
907 \box_use_drop:N \l__talk_tmp_box
908 \skip_horizontal:n { \l__talk_footer_right_skip - \Gm@rmargin }
909 }
910 \DeclareInstance { footer } { std } { talk } { }
911 \AddToHook { begindocument }
912 {
913 \DeclareInstanceCopy { footer } { wallpaper } { std }
914 \EditInstance { footer } { wallpaper }
915 { element-order = }
916 }
917 \cs_new:Npn \__talk_metadata_name:n #1
918 {
919 \tl_if_exist:cTF { @ short #1 }
920 { short #1 }
921 {#1}
922 }
923 \cs_new_protected:Npn \__talk_wallpaper_hrule:Nnn #1#2#3
924 {
925 \skip_horizontal:n { -\Gm@lmargin }
926 \tl_if_empty:NF #1
927 {
928 \group_begin:
929 \color_select:V #1
930 \rule:nnn { \paperwidth } {#2} {#3}
931 \skip_horizontal:n { -\paperwidth }
932 \group_end:
933 }
934 }
935 \cs_set_nopar:Npn \ps@plain
936 {
937 \cs_set_nopar:Npn \@oddhead
938 {
939 \hfil
940 }
941 \cs_set_nopar:Npn \@oddfoot { }
942 \cs_set_eq:NN \@evenhead \@oddhead
943 \cs_set_eq:NN \@evenfoot \@oddfoot
944 }
945 \cs_set_nopar:Npn \ps@wallpaper
946 {
947 \cs_set_nopar:Npn \@oddhead
948 {
949 \UseInstance { header } { wallpaper }
950 \hfil
951 }
952 \cs_set_nopar:Npn \@oddfoot
953 {
954 \UseInstance { footer } { wallpaper }
955 \hfil
956 }
957 \cs_set_eq:NN \@evenhead \@oddhead
958 \cs_set_eq:NN \@evenfoot \@oddfoot
959 }
960 \cs_new_nopar:Npn \ps@talk
961 {
962 \cs_set_nopar:Npn \@oddhead
963 {
964 \UseInstance { header } { std }
965 \hfil
966 }
967 \cs_set_nopar:Npn \@oddfoot { \UseInstance { footer } { std } }
968 \cs_set_eq:NN \@evenhead \@oddhead
969 \cs_set_eq:NN \@evenfoot \@oddfoot
970 }
971 \pagestyle { talk }
972 \bool_new:N \l__talk_frame_bool
973 \bool_new:N \g__talk_frame_tag_bool
974 \bool_new:N \l__talk_frame_verb_bool
975 \int_new:N \g__talk_frame_int
976 \cs_new_eq:NN \c@frame \g__talk_frame_int
977 \cs_new:Npn \theframe { \@arabic \c@frame }
978 \cs_new:Npn \@framenumber { \arabic { frame } }
979 \property_new:nnnn { totalframes } { shipout } { -1 }
980 { \int_use:N \g__talk_frame_int }
981 \AddToHook { enddocument / afterlastpage }
982 { \property_record:nn { lastpage } { totalframes } }
983 \cs_new:Npn \@totalframes { \property_ref:nn { lastpage } { totalframes } }
984 \NewCommandCopy \__talk_latexe_frame:n \frame
985 \cs_new_protected:Npn \__talk_frame_process:nn #1#2
986 {
987 \int_gincr:N \g__talk_frame_int
988 \bool_set_true:N \l__talk_frame_bool
989 \str_if_empty:NF \l__talk_frame_name_str
990 {
991 \tl_if_exist:cT { g__talk_frame_ \l__talk_frame_name_str _tl }
992 {
993 \msg_error:nnV { talk } { duplicate-frame-name }
994 \l__talk_frame_name_str
995 }
996 \tl_clear_new:c { g__talk_frame_ \l__talk_frame_name_str _tl }
997 \tl_gset:ce { g__talk_frame_ \l__talk_frame_name_str _tl }
998 {
999 {
1000 \bool_if:NTF \l__talk_frame_verb_bool
1001 { true }
1002 { false }
1003 }
1004 { \exp_not:n {#2} }
1005 }
1006 }
1007 \__talk_slide:nn {#1} {#2}
1008 }
1009 \cs_new_protected:Npn \__talk_frame_tag:n #1
1010 {
1011 \tag_struct_begin:n { tag = frame }
1012 \int_gset:Nn \g__talk_frame_struct_int { \tag_get:n { struct_num } }
1013 \bool_gset_true:N \g__talk_frame_tag_bool
1014 #1
1015 \tag_struct_end:
1016 }
1017 \cs_new_protected:Npn \__talk_frame_notag:n #1
1018 {
1019 \tag_mc_begin:n { artifact }
1020 \tag_suspend:n { frame }
1021 \bool_gset_false:N \g__talk_frame_tag_bool
1022 #1
1023 \par
1024 \tag_resume:n { frame }
1025 \tag_mc_end:
1026 }
1027 \bool_if:NTF \l__talk_frame_title_bool
1028 {
1029 \RenewDocumentEnvironment { frame }
1030 { D <> { all } = { action-spec } O { } +m +b }
1031 {
1032 \str_clear:N \l__talk_frame_name_str
1033 \keys_set:nn { talk / frame } {#2}
1034 \bool_set_false:N \l__talk_frame_verb_bool
1035 \__talk_frame_process:nn {#1} { \frametitle {#3} #4 }
1036 }
1037 { }
1038 \NewDocumentEnvironment { frame* }
1039 { D <> { all } = { action-spec } O { } +m c }
1040 {
1041 \str_clear:N \l__talk_frame_name_str
1042 \keys_set:nn { talk / frame } {#2}
1043 \bool_set_true:N \l__talk_frame_verb_bool
1044 \tl_gset:Nn \g__talk_frame_title_tl {#3}
1045 \exp_args:Nne \__talk_frame_process:nn {#1}
1046 { \tl_to_str:n { \frametitle } \exp_not:n { {#3} #4 } }
1047 }
1048 { }
1049 }
1050 {
1051 \RenewDocumentEnvironment { frame }
1052 { !D <> { all } = { action-spec } !O { } +b }
1053 {
1054 \str_clear:N \l__talk_frame_name_str
1055 \keys_set:nn { talk / frame } {#2}
1056 \bool_set_false:N \l__talk_frame_verb_bool
1057 \__talk_frame_process:nn {#1} {#3}
1058 }
1059 { }
1060 \NewDocumentEnvironment { frame* }
1061 { !D <> { all } = { action-spec } !O { } c }
1062 {
1063 \str_clear:N \l__talk_frame_name_str
1064 \keys_set:nn { talk / frame } {#2}
1065 \bool_set_true:N \l__talk_frame_verb_bool
1066 \__talk_frame_process:nn {#1} {#3}
1067 }
1068 { }
1069 }
1070 \cs_new_protected:Npn \__talk_frame_reuse:nn #1#2
1071 {
1072 \tl_if_exist:cTF { g__talk_frame_ #2 _tl }
1073 {
1074 \exp_args:Nv \__talk_frame_reuse_aux:nn
1075 { g__talk_frame_ #2 _tl } {#1}
1076 }
1077 { \msg_error:nnn { talk } { unknown-frame-name } {#2} }
1078 }
1079 \cs_new_protected:Npn \__talk_frame_reuse_aux:nn #1#2
1080 { \__talk_frame_reuse_aux:nnn #1 {#2} }
1081 \cs_new_protected:Npn \__talk_frame_reuse_aux:nnn #1#2#3
1082 {
1083 \use:c { bool_set_ #1 :N } \l__talk_frame_verb_bool
1084 \__talk_frame_process:nn {#3} {#2}
1085 }
1086 \NewDocumentCommand \reuseframe { D <> { all } = { action-spec } O { } m }
1087 {
1088 \group_begin:
1089 \keys_set:nn { talk / frame } {#2}
1090 \str_clear:N \l__talk_frame_name_str
1091 \__talk_frame_reuse:nn {#1} {#3}
1092 \group_end:
1093 }
1094 \NewCommandCopy \againframe \reuseframe
1095 \msg_new:nnnn { talk } { unknown-frame-name }
1096 { Unknown~frame~name~"#1"! }
1097 {
1098 You~asked~to~reuse~the~contents~of~a~frame~with~the~name~"#1",~
1099 but~that~name~was~never~defined.
1100 }
1101 \msg_new:nnnn { talk } { duplicate-frame-name }
1102 { Duplicate~frame~name~"#1"! }
1103 {
1104 You~asked~to~save~the~contents~of~this~frame~with~the~name~"#1",~
1105 but~that~name~has~already~been~used.
1106 }
1107 \keys_define:nn { talk }
1108 { columns .inherit:n = talk / column }
1109 \keys_define:nn { talk / columns }
1110 { width .tl_set:N = \l__talk_columns_wd_tl }
1111 \keys_set:nn { talk / columns }
1112 { width = \textwidth }
1113 \int_new:N \l__talk_column_int
1114 \int_new:N \g__talk_column_int
1115 \NewDocumentEnvironment { columns } { D <> { all } O { } }
1116 {
1117 \__talk_action_begin:n {#1}
1118 \par
1119 \int_set_eq:NN \l__talk_column_int \g__talk_column_int
1120 \int_gzero:N \g__talk_column_int
1121 \keys_set:nn { talk / columns } {#2}
1122 \hbox_set_to_wd:Nnw \l__talk_tmp_box { \l__talk_columns_wd_tl }
1123 \dim_set:Nn \textwidth { \l__talk_columns_wd_tl }
1124 \dim_set_eq:NN \columnwidth \textwidth
1125 \ignorespaces
1126 }
1127 {
1128 \unskip
1129 \hbox_set_end:
1130 \box_use_drop:N \l__talk_tmp_box
1131 \int_gset_eq:NN \g__talk_column_int \l__talk_column_int
1132 \par
1133 \__talk_action_end:
1134 }
1135 \keys_define:nn { talk / column }
1136 {
1137 b .meta:n =
1138 { vertical-alignment = bottom } ,
1139 b .value_forbidden:n = true ,
1140 c .meta:n =
1141 { vertical-alignment = center } ,
1142 c .value_forbidden:n = true ,
1143 t .meta:n =
1144 { vertical-alignment = top } ,
1145 t .value_forbidden:n = true ,
1146 vertical-alignment .choices:nn =
1147 { bottom , center , top }
1148 {
1149 \tl_set_eq:NN \l__talk_column_alignment_tl
1150 \l_keys_value_tl
1151 }
1152 }
1153 \tl_new:N \l__talk_column_alignment_tl
1154 \keys_set:nn { talk / column }
1155 {
1156 vertical-alignment = center
1157 }
1158 \cs_new_protected:Npn \__talk_column_align_bottom:n #1
1159 { \vbox:n {#1} }
1160 \cs_new_protected:Npn \__talk_column_align_center:n #1
1161 {
1162 \check@mathfonts
1163 \vbox_set:Nn \l__talk_tmp_box {#1}
1164 \box_set_ht:Nn \l__talk_tmp_box
1165 {
1166 0.5 \box_ht:N \l__talk_tmp_box
1167 + 0.5 \box_dp:N \l__talk_tmp_box
1168 + ( \l__talk_vcenter_offset_tl )
1169 }
1170 \box_set_dp:Nn \l__talk_tmp_box
1171 {
1172 \box_ht:N \l__talk_tmp_box
1173 - ( \l__talk_vcenter_offset_tl ) * 2
1174 }
1175 \box_use_drop:N \l__talk_tmp_box
1176 }
1177 \cs_new_protected:Npn \__talk_column_align_top:n #1
1178 { \vbox_top:n {#1} }
1179 \tl_new:N \l__talk_vcenter_offset_tl
1180 \tl_set:Nn \l__talk_vcenter_offset_tl
1181 { ( \fontcharht \font `\( - \fontchardp \font `\) ) / 2 }
1182 \NewDocumentEnvironment { column } { D <> { all } O { } m }
1183 {
1184 \par
1185 \int_gincr:N \g__talk_column_int
1186 \int_compare:nNnF \g__talk_column_int = 1
1187 { \hfil }
1188 \keys_set:nn { talk / column } {#2}
1189 \vbox_set_to_wd:Nnw \l__talk_tmp_box {#3}
1190 \dim_set:Nn \textwidth {#3}
1191 \dim_set_eq:NN \columnwidth \textwidth
1192 \@parboxrestore
1193 \leavevmode
1194 \raggedright
1195 \__talk_action_begin:n {#1}
1196 \ignorespaces
1197 }
1198 {
1199 \par
1200 \__talk_action_end:
1201 \vbox_set_end:
1202 \use:c { __talk_column_align_ \l__talk_column_alignment_tl :n }
1203 { \vbox_unpack_drop:N \l__talk_tmp_box }
1204 \par
1205 \@ignoretrue
1206 }
1207 \tl_new:N \l__talk_float_alignment_tl
1208 \NewTemplateType { floatenv } { 2 }
1209 \DeclareTemplateInterface { floatenv } { talk } { 2 }
1210 {
1211 float-placement : tokenlist ,
1212 horizontal-alignment : choice { left , center , right } = left
1213 }
1214 \DeclareTemplateCode { floatenv } { talk } { 2 }
1215 {
1216 float-placement = \l__talk_tmp_tl ,
1217 horizontal-alignment =
1218 {
1219 left = \tl_set:Nn \l__talk_float_alignment_tl { flushleft } ,
1220 center = \tl_set:Nn \l__talk_float_alignment_tl { center } ,
1221 right = \tl_set:Nn \l__talk_float_alignment_tl { flushright }
1222 }
1223 }
1224 {
1225 \SetTemplateKeys { floatenv } { talk } {#1}
1226 \begin { minipage } { \columnwidth }
1227 \use:e
1228 {
1229 \AssignStructureRole { para / semantic } { float }
1230 \begin { \l__talk_float_alignment_tl }
1231 \AssignStructureRole{ para / semantic }
1232 { \UseStructureName { para / semantic } }
1233 }
1234 \cs_set_nopar:Npn \@captype {#2}
1235 \@skiphyperreftrue
1236 }
1237 \DeclareInstance { floatenv } { std } { talk } { horizontal-alignment = left }
1238 \cs_new_protected:Npn \endfloatenv
1239 {
1240 \exp_args:Ne \end { \l__talk_float_alignment_tl }
1241 \end { minipage }
1242 }
1243 \clist_map_inline:nn { figure , table }
1244 {
1245 \NewDocumentEnvironment {#1} { D <> { all } = { float-placement } O { } }
1246 {
1247 \__talk_action_begin:n {##1}
1248 \UseInstance { floatenv } { std } {##2} {#1}
1249 }
1250 {
1251 \endfloatenv
1252 \__talk_action_end:
1253 }
1254 \newcounter {#1}
1255 \tl_new:c { #1 name }
1256 \tl_set:ce { #1 name } { \text_titlecase_first:n {#1} }
1257 \tl_new:c { fnum@ #1 }
1258 \tl_set_eq:cc { fnum@ #1 } { #1 name }
1259 }
1260 \newlength \abovecaptionskip
1261 \newlength \belowcaptionskip
1262 \setlength \abovecaptionskip { 7pt }
1263 \setlength \belowcaptionskip { 7pt }
1264 \cs_set_protected:Npn \@caption #1 [ #2 ] #3
1265 {
1266 \par
1267 \begingroup
1268 \@parboxrestore
1269 \if@minipage \@setminipage \fi
1270 \normalsize
1271 \@makecaption { \csname fnum@ #1 \endcsname } { \ignorespaces #3 }
1272 \par
1273 \endgroup
1274 }
1275 \box_new:N \g__talk_footnote_box
1276 \seq_new:N \g__talk_footnote_overlay_seq
1277 \NewCommandCopy \stdfootnote \footnote
1278 \RenewDocumentCommand \footnote { D <> { all } o +m }
1279 {
1280 \seq_gpush:Nn \g__talk_footnote_overlay_seq {#1}
1281 \IfNoValueTF {#2}
1282 { \stdfootnote {#3} }
1283 { \stdfootnote [ {#2} ] {#3} }
1284 }
1285 \NewSocketPlug { fntext / process } { talk }
1286 {
1287 \vbox_gset:Nn \g__talk_footnote_box
1288 {
1289 \vbox_unpack:N \g__talk_footnote_box
1290 \seq_gpop_left:NN \g__talk_footnote_overlay_seq
1291 \l__talk_tmp_tl
1292 \exp_args:NV \__talk_decode_parse:n \l__talk_tmp_tl
1293 \__talk_action_uncover:N \l__talk_decode_overlays_bool
1294 #1
1295 \__talk_action_uncover_end:N \l__talk_decode_overlays_bool
1296 }
1297 }
1298 \AssignSocketPlug { fntext / process } { talk }
1299 \cs_new_eq:NN \@makefntext \fnote_makefntext:n
1300 \prg_new_protected_conditional:Npnn \__talk_mode:n #1 { T }
1301 {
1302 \bool_lazy_or:nnTF
1303 { \str_if_eq_p:nn {#1} { all } }
1304 { \str_if_eq_p:Vn \l__talk_mode_str {#1} }
1305 \prg_return_true:
1306 \prg_return_false:
1307 }
1308 \NewDocumentCommand \mode { D <> { all } +m }
1309 { \__talk_mode:nT {#1} {#2} }
1310 \prg_new_protected_conditional:Npnn \__talk_if_overlay:n #1 { T , F , TF }
1311 {
1312 \__talk_decode_parse:n {#1}
1313 \bool_if:NTF \l__talk_decode_overlays_bool
1314 \prg_return_true:
1315 \prg_return_false:
1316 }
1317 \prg_generate_conditional_variant:Nnn \__talk_if_overlay:n { V } { T , F , TF }
1318 \cs_new_protected:Npn \__talk_overlay_arg:n #1
1319 {
1320 \__talk_if_overlay:nTF {#1}
1321 { \cs_set:Npn \ProcessedArgument { \c_true_bool } }
1322 { \cs_set:Npn \ProcessedArgument { \c_false_bool } }
1323 }
1324 \skip_new:N \l__talk_shuffle_skip
1325 \cs_new_protected:Npn \__talk_shuffle_skip:n #1
1326 {
1327 \skip_set_eq:NN \l__talk_shuffle_skip \tex_lastskip:D
1328 \bool_lazy_and:nnTF
1329 { ! \skip_if_eq_p:nn \l__talk_shuffle_skip { 0pt } }
1330 {
1331 \bool_lazy_or_p:nn
1332 { \mode_if_horizontal_p: }
1333 { \mode_if_vertical_p: }
1334 }
1335 {
1336 \tex_unskip:D
1337 #1
1338 \mode_if_horizontal:TF
1339 { \skip_horizontal:n }
1340 { \skip_vertical:n }
1341 \l__talk_shuffle_skip
1342 }
1343 {#1}
1344 }
1345 \cs_new_protected:Npn \__talk_opacity_begin:n #1
1346 { \__talk_shuffle_skip:n { \opacity_begin:n {#1} } }
1347 \cs_new_protected:Npn \__talk_opacity_end:
1348 { \__talk_shuffle_skip:n { \opacity_end: } }
1349 \cs_new_protected:Npn \__talk_action_alert:N #1
1350 {
1351 \bool_if:NTF #1
1352 { \color_select:n { alert } }
1353 { \color_select:n { . } }
1354 }
1355 \cs_new_protected:Npn \__talk_action_invisible:N #1
1356 {
1357 \bool_if:NTF #1
1358 { \__talk_opacity_begin:n { 0 } }
1359 { \__talk_opacity_begin:n { 1 } }
1360 }
1361 \cs_new_protected:Npn \__talk_action_invisible_end:N #1
1362 { \__talk_opacity_end: }
1363 \cs_new_protected:Npn \__talk_action_visible:N #1
1364 {
1365 \bool_if:NTF #1
1366 { \__talk_opacity_begin:n { 1 } }
1367 { \__talk_opacity_begin:n { 0 } }
1368 }
1369 \cs_new_protected:Npn \__talk_action_visible_end:N #1
1370 { \__talk_opacity_end: }
1371 \cs_new_protected:Npn \__talk_action_only:N #1
1372 {
1373 \bool_if:NF #1
1374 { \vbox_set:Nw \l__talk_tmp_box }
1375 }
1376 \cs_new_protected:Npn \__talk_action_only_end:N #1
1377 {
1378 \bool_if:NF #1
1379 { \vbox_set_end: }
1380 }
1381 \NewTemplateType { hidden } { 0 }
1382 \DeclareTemplateInterface { hidden } { talk } { 0 }
1383 { opacity : real = 0 }
1384 \DeclareTemplateCode { hidden } { talk } { 0 }
1385 { opacity = \l__talk_uncover_hidden_fp }
1386 { \__talk_opacity_begin:n { \l__talk_uncover_hidden_fp } }
1387 \DeclareInstance { hidden } { std } { talk } { }
1388 \cs_new_protected:Npn \__talk_action_uncover:N #1
1389 {
1390 \bool_if:NTF #1
1391 { \__talk_opacity_begin:n { 1 } }
1392 { \UseInstance { hidden } { std } }
1393 }
1394 \cs_new_protected:Npn \__talk_action_uncover_end:N #1
1395 { \__talk_opacity_end: }
1396 \clist_map_inline:nn { invisible , uncover , visible }
1397 {
1398 \ExpandArgs { cne } \NewDocumentCommand {#1}
1399 { > { \__talk_overlay_arg:n } D <> { all } +m }
1400 {
1401 \exp_not:c { __talk_action_ #1 :N } ##1
1402 ##2
1403 \exp_not:c { __talk_action_ #1 _end:N } ##1
1404 }
1405 \ExpandArgs { nnee } \NewDocumentEnvironment { #1 env }
1406 { > { \__talk_overlay_arg:n } D <> { all } }
1407 { \exp_not:c { __talk_action_ #1 :N } ##1 }
1408 { \exp_not:c { __talk_action_ #1 _end:N } ##1 }
1409 }
1410 \NewDocumentCommand \alert { > { \__talk_overlay_arg:n } D <> { all } +m }
1411 {
1412 \group_begin:
1413 \__talk_action_alert:N #1
1414 #2
1415 \group_end:
1416 }
1417 \NewDocumentEnvironment { alertenv } { > { \__talk_overlay_arg:n } D <> { all } }
1418 { \__talk_action_alert:N #1 }
1419 { }
1420 \NewDocumentCommand \only { D <> { all } +m }
1421 {
1422 \__talk_if_overlay:nT {#1}
1423 {#2}
1424 }
1425 \NewDocumentEnvironment { onlyenv } { > { \__talk_overlay_arg:n } D <> { all } }
1426 { \__talk_action_only:N #1 }
1427 { \__talk_action_only_end:N #1 }
1428 \bool_new:N \l__talk_saved_overlays_bool
1429 \str_new:N \l__talk_saved_action_str
1430 \bool_new:N \l__talk_saved_actions_bool
1431 \bool_new:N \l__talk_overlay_all_bool
1432 \NewDocumentCommand \action { d <> +m }
1433 {
1434 \group_begin:
1435 \__talk_action_begin:n {#1}
1436 #2
1437 \__talk_action_end:
1438 \group_end:
1439 }
1440 \NewDocumentEnvironment { actionenv } { d <> }
1441 { \__talk_action_begin:n {#1} }
1442 { \__talk_action_end: }
1443 \cs_new_protected:Npn \__talk_action_begin:n #1
1444 {
1445 \group_begin:
1446 \tl_if_novalue:nTF {#1}
1447 {
1448 \exp_after:wN \__talk_action_begin:w
1449 \l__talk_action_spec_str < all > \q_stop
1450 }
1451 { \__talk_action_begin_auxi:n {#1} }
1452 }
1453 \cs_new_protected:Npn \__talk_action_begin:w #1 < #2 > #3 \q_stop
1454 { \__talk_action_begin_auxi:n {#2} }
1455 \cs_new_protected:Npn \__talk_action_begin_auxi:n #1
1456 {
1457 \str_if_eq:nnTF {#1} { all }
1458 { \bool_set_true:N \l__talk_overlay_all_bool }
1459 {
1460 \bool_set_false:N \l__talk_overlay_all_bool
1461 \__talk_action_begin_auxii:n {#1}
1462 }
1463 }
1464 \cs_new_protected:Npn \__talk_action_begin_auxii:n #1
1465 {
1466 \__talk_decode_parse:n {#1}
1467 \bool_set_eq:NN \l__talk_saved_overlays_bool
1468 \l__talk_decode_overlays_bool
1469 \str_set_eq:NN \l__talk_saved_action_str
1470 \l__talk_decode_action_str
1471 \bool_set_eq:NN \l__talk_saved_actions_bool
1472 \l__talk_decode_actions_bool
1473 \tl_if_empty:NTF \g__talk_onslide_tl
1474 {
1475 \bool_if:NTF \l__talk_decode_overlays_bool
1476 {
1477 \cs_if_exist_use:cF
1478 { __talk_action_ \l__talk_decode_action_str :N }
1479 { \use_none:n }
1480 \l__talk_decode_actions_bool
1481 }
1482 { \UseInstance { hidden } { std } }
1483 }
1484 { \__talk_action_invisible:N \c_true_bool }
1485 }
1486 \cs_new_protected:Npn \__talk_action_end:
1487 {
1488 \bool_if:NF \l__talk_overlay_all_bool
1489 {
1490 \tl_if_empty:NTF \g__talk_onslide_tl
1491 {
1492 \bool_if:NTF \l__talk_saved_overlays_bool
1493 {
1494 \cs_if_exist_use:cF
1495 { __talk_action_ \l__talk_saved_action_str _end:N }
1496 { \use_none:n }
1497 \l__talk_saved_actions_bool
1498 }
1499 { \__talk_opacity_end: }
1500 }
1501 { \__talk_action_invisible_end:N \c_true_bool }
1502 }
1503 \group_end:
1504 }
1505 \NewDocumentCommand \alt { D <> { all } +m +m }
1506 {
1507 \__talk_if_overlay:nTF {#1}
1508 {#2}
1509 {#3}
1510 }
1511 \NewDocumentCommand \onslide { D <> { all } }
1512 {
1513 \__talk_onslide:n {#1}
1514 \ignorespaces
1515 }
1516 \cs_new_protected:Npn \__talk_onslide:n #1
1517 {
1518 \tl_use:N \g__talk_onslide_tl
1519 \tl_gclear:N \g__talk_onslide_tl
1520 \__talk_if_overlay:nF {#1}
1521 {
1522 \__talk_opacity_begin:n { 0 }
1523 \tl_gput_right:Nn \g__talk_onslide_tl
1524 { \__talk_opacity_end: }
1525 }
1526 }
1527 \tl_new:N \g__talk_onslide_tl
1528 \NewDocumentCommand \temporal { D <> { all } +m +m +m }
1529 {
1530 \__talk_if_overlay:nTF {#1}
1531 {#3}
1532 {
1533 \bool_if:NTF \g__talk_slide_continue_bool
1534 {#4}
1535 {#2}
1536 }
1537 }
1538 \NewDocumentCommand \pause { o }
1539 {
1540 \legacy_if:nF { measuring@ }
1541 {
1542 \IfNoValueTF {#1}
1543 { \int_gincr:N \g__talk_pauses_int }
1544 { \int_gset:Nn \g__talk_pauses_int {#1} }
1545 \exp_args:Ne \__talk_onslide:n
1546 { \int_eval:n { \g__talk_pauses_int + 1 } - }
1547 }
1548 }
1549 \cs_new_protected:Npn \__talk_overprint_begin:n #1
1550 {
1551 \par
1552 \vbox_set_to_wd:Nnw \l__talk_tmp_box {#1}
1553 \raggedright
1554 \ignorespaces
1555 }
1556 \NewDocumentEnvironment { overlayarea } { m m }
1557 { \__talk_overprint_begin:n {#1} }
1558 {
1559 \vbox_set_end:
1560 \vbox_to_ht:nn {#2}
1561 {
1562 \box_use_drop:N \l__talk_tmp_box
1563 \vfil
1564 }
1565 \par
1566 }
1567 \int_new:N \l__talk_overprint_int
1568 \cs_new:Npn \__talk_frame_overprint:
1569 {
1570 \int_to_Roman:n \g__talk_frame_int
1571 \int_to_roman:n \l__talk_overprint_int
1572 }
1573 \NewDocumentEnvironment { overprint } { O { \textwidth } }
1574 { \__talk_overprint_begin:n {#1} }
1575 {
1576 \vbox_set_end:
1577 \int_incr:N \l__talk_overprint_int
1578 \__talk_overprint_save_ht:
1579 \cs_if_exist:cTF
1580 { overprint@ \__talk_frame_overprint: }
1581 {
1582 \dim_compare:vNnTF
1583 { overprint@ \__talk_frame_overprint: }
1584 > { \box_ht:N \l__talk_tmp_box }
1585 {
1586 \vbox_to_ht:vn
1587 { overprint@ \__talk_frame_overprint: }
1588 {
1589 \box_use_drop:N \l__talk_tmp_box
1590 \vfil
1591 }
1592 }
1593 { \box_use_drop:N \l__talk_tmp_box }
1594 }
1595 { \box_use_drop:N \l__talk_tmp_box }
1596 \par
1597 }
1598 \cs_new_protected:Npn \__talk_overprint_save_ht:
1599 {
1600 \tl_if_exist:cF { g__talk_overprint_ \__talk_frame_overprint: _tl }
1601 {
1602 \tl_new:c { g__talk_overprint_ \__talk_frame_overprint: _tl }
1603 \tl_gset:cn { g__talk_overprint_ \__talk_frame_overprint: _tl }
1604 { 0pt }
1605 }
1606 \tl_gset:ce { g__talk_overprint_ \__talk_frame_overprint: _tl }
1607 {
1608 \dim_max:vn { g__talk_overprint_ \__talk_frame_overprint: _tl }
1609 { \box_ht:N \l__talk_tmp_box }
1610 }
1611 \legacy_if:nT { @filesw }
1612 {
1613 \iow_now:Ne \@auxout
1614 {
1615 \gdef \exp_not:c { overprint@ \__talk_frame_overprint: }
1616 {
1617 \exp_not:v { g__talk_overprint_ \__talk_frame_overprint: _tl }
1618 }
1619 }
1620 }
1621 \hook_gput_code:nne { enddocument / afterlastpage } { talk }
1622 { \__talk_overprint_check_ht:n { \__talk_frame_overprint: } }
1623 }
1624 \cs_new_protected:Npn \__talk_overprint_check_ht:n #1
1625 {
1626 \bool_lazy_and:nnF
1627 { \exp_not:N \cs_if_exist_p:c { overprint@ #1 } }
1628 {
1629 \dim_compare_p:vNv { overprint@ #1 } = { g__talk_overprint_ #1 _tl }
1630 }
1631 {
1632 \msg_warning:nn { talk } { overprint-ht }
1633 \cs_gset_protected:Npn \__talk_overprint_check_ht:n ##1 { }
1634 }
1635 }
1636 \msg_new:nnn { talk } { overprint-ht }
1637 {
1638 Overprint~area~height~has~changed:\\
1639 rerun~LaTeX.
1640 }
1641
1642 \tl_map_inline:nn
1643 {
1644 \textbf
1645 \textit
1646 \textmd
1647 \textnormal
1648 \textrm
1649 \textsc
1650 \textsf
1651 \textsl
1652 \texttt
1653 \textup
1654 \emph
1655 }
1656 {
1657 \ExpandArgs { c } \NewCommandCopy { std \cs_to_str:N #1 } #1
1658 \ExpandArgs { Nne } \RenewDocumentCommand #1
1659 { D <> { all } +m }
1660 {
1661 \exp_not:N \__talk_if_overlay:nTF {##1}
1662 { \exp_not:c { std \cs_to_str:N #1 } }
1663 { \exp_not:N \__talk_textcmd_eqiv:n }
1664 {##2}
1665 }
1666 }
1667 \cs_new_protected:Npn \__talk_textcmd_eqiv:n #1
1668 {
1669 \mode_if_math:TF
1670 { { \mbox {#1} } }
1671 {
1672 \mode_leave_vertical:
1673 {#1}
1674 }
1675 }
1676 \RequirePackage { graphicx }
1677 \NewCommandCopy \stdincludegraphics \includegraphics
1678 \RenewDocumentCommand \includegraphics { s D <> { all } o o m }
1679 {
1680 \__talk_if_overlay:nT {#2}
1681 {
1682 \use:e
1683 {
1684 \exp_not:N \stdincludegraphics
1685 \IfBooleanT #1 { * }
1686 \IfNoValueF {#3} { [ \exp_not:n { {#3} } ] }
1687 \IfNoValueF {#4} { [ \exp_not:n { {#4} } ] }
1688 }
1689 {#5}
1690 }
1691 }
1692 \RenewDocumentCommand \label { D <> { 1 } m }
1693 {
1694 \@bsphack
1695 \__talk_if_overlay:nT {#1}
1696 { \__talk_label:n {#2} }
1697 \@esphack
1698 }
1699 \cs_new_protected:Npn \__talk_label:n #1
1700 {
1701 \begingroup
1702 \UseHookWithArguments { label } { 1 } {#1}
1703 \protected@write \@auxout { }
1704 {
1705 \string \newlabel {#1}
1706 {
1707 { \@currentlabel }
1708 { \thepage }
1709 { \@currentlabelname }
1710 { \@currentHref }
1711 { \@kernel@reserved@label@data }
1712 }
1713 }
1714 \endgroup
1715 }
1716 \cs_new_eq:NN \std@label@in@display \label@in@display
1717 \RenewDocumentCommand \label@in@display { D <> { 1 } m }
1718 {
1719 \__talk_if_overlay:nT {#1}
1720 { \std@label@in@display {#2} }
1721 }
1722 \int_new:N \g__talk_opacity_group_int
1723 \cs_new_protected:Npn \__talk_opacity_group_begin:
1724 { \begin { lrbox } \l__talk_tmp_box }
1725 \cs_new_protected:Npn \__talk_opacity_group_end:
1726 {
1727 \end { lrbox }
1728 \mode_leave_vertical:
1729 \int_gincr:N \g__talk_opacity_group_int
1730 \exp_args:Ne \pdfxform_new:nnn
1731 { talk.opacity \int_use:N \g__talk_opacity_group_int }
1732 { /Group << /S /Transparency /K ~ false /I ~ false >> }
1733 { \usebox \l__talk_tmp_box }
1734 \exp_args:Ne \pdfxform_use:n
1735 { talk.opacity \int_use:N \g__talk_opacity_group_int }
1736 }
1737 \sys_if_engine_luatex:T
1738 {
1739 \AddToHook { cmd / pspicture / before } { \__talk_opacity_group_begin: }
1740 \AddToHook { cmd / endpspicture / after } { \__talk_opacity_group_end: }
1741 }
1742 \cs_new_nopar:Npn \today
1743 {
1744 \ifcase \month \or
1745 January \or
1746 February \or
1747 March \or
1748 April \or
1749 May \or
1750 June \or
1751 July \or
1752 August \or
1753 September \or
1754 October \or
1755 November \or
1756 December
1757 \fi
1758 \space
1759 \number \day ,
1760 \space
1761 \number \year
1762 }
1763 \setcounter { tocdepth } { 3 }
1764 \setlength \arraycolsep { 5pt }
1765 \setlength \tabcolsep { 6pt }
1766 \setlength \arrayrulewidth { 0.4pt }
1767 \setlength \doublerulesep { 2pt }
1768 \setlength \tabbingsep { \labelsep }
1769 \skip \@mpfootins = \skip \footins
1770 \setlength \fboxsep { 3pt }
1771 \setlength \fboxrule { 0.4pt }
1772 \setlength \labelsep { 0.5em }
1773 \cs_new:Npn \labelenumi { \theenumi . }
1774 \cs_new:Npn \labelenumii { ( \theenumii ) }
1775 \cs_new:Npn \labelenumiii { \theenumiii . }
1776 \cs_new:Npn \labelenumiv { \theenumiv . }
1777 \cs_new:Npn \labelitemi { \labelitemfont \textbullet }
1778 \cs_new:Npn \labelitemii { \labelitemfont \bfseries \textendash }
1779 \cs_new:Npn \labelitemiii { \labelitemfont \textasteriskcentered }
1780 \cs_new:Npn \labelitemiv { \labelitemfont \textperiodcentered }
1781 \cs_new:Npn \labelitemfont { \normalfont }
1782 \setlength \leftmargini { 2em }
1783 \setlength \leftmarginii { 2em }
1784 \setlength \leftmarginiii { 2em }
1785 \setlength \labelsep { 0.5em }
1786 \setlength \labelwidth { \leftmargini }
1787 \addtolength \labelwidth { -\labelsep }
1788 \cs_gset_nopar:Npn \@listi
1789 {
1790 \leftmargin \leftmargini
1791 \topsep 3pt plus 2pt minus 2.5pt
1792 \parsep 0pt
1793 \itemsep 3pt plus 2pt minus 3pt
1794 }
1795 \cs_gset_eq:NN \@listI \@listi
1796 \cs_gset_nopar:Npn \@listii
1797 {
1798 \leftmargin \leftmarginii
1799 \topsep 2pt plus 1pt minus 2pt
1800 \parsep 0pt plus 1pt
1801 \itemsep \parsep
1802 }
1803 \cs_gset_nopar:Npn \@listiii
1804 {
1805 \leftmargin \leftmarginiii
1806 \topsep 2pt plus 1pt minus 2pt
1807 \parsep 0pt plus 1pt
1808 \itemsep \parsep
1809 }
1810 \setlength \partopsep { 0pt }
1811 \tl_new:N \g__talk_frame_title_tl
1812 \tl_new:N \g__talk_frame_subtitle_tl
1813 \NewDocumentCommand \frametitle { D <> { all } O {#3} m }
1814 {
1815 \__talk_if_overlay:nT {#1}
1816 { \tl_gset:Nn \g__talk_frame_title_tl {#3} }
1817 }
1818 \NewDocumentCommand \framesubtitle { D <> { all } O {#3} m }
1819 {
1820 \__talk_if_overlay:nT {#1}
1821 { \tl_gset:Nn \g__talk_frame_subtitle_tl {#3} }
1822 }
1823 \NewTemplateType { frametitle } { 1 }
1824 \DeclareTemplateInterface { frametitle } { talk } { 1 }
1825 {
1826 after-vspace : skip = \bigskipamount ,
1827 before-vspace : skip = 0em ,
1828 color : tokenlist = ,
1829 font : tokenlist = \Large \bfseries
1830 }
1831 \DeclareTemplateCode { frametitle } { talk } { 1 }
1832 {
1833 after-vspace = \l__talk_frametitle_after_skip ,
1834 before-vspace = \l__talk_frametitle_before_skip ,
1835 color = \l__talk_frametitle_color_tl ,
1836 font = \l__talk_frametitle_font_tl
1837 }
1838 {
1839 \noindent
1840 \vspace { \l__talk_frametitle_before_skip }
1841 \group_begin:
1842 \tl_if_empty:NF \l__talk_frametitle_color_tl
1843 { \color_select:V \l__talk_frametitle_color_tl }
1844 \l__talk_frametitle_font_tl
1845 \tl_if_blank:nF {#1}
1846 { \__talk_frame_title:n {#1} }
1847 \par
1848 \group_end:
1849 \vspace { \l__talk_frametitle_after_skip }
1850 }
1851 \DeclareInstance { frametitle } { header } { talk } { }
1852 \cs_new_protected:Npn \__talk_frame_title:n #1
1853 {
1854 \bool_if:NTF \g__talk_frame_tag_bool
1855 { \__talk_frame_title_tagged:n }
1856 { \use:n }
1857 {#1}
1858 }
1859 \cs_new_protected:Npn \__talk_frame_title_tagged:n #1
1860 {
1861 \__talk_header_tag_begin:e
1862 {
1863 firstkid = true ,
1864 parent = \int_use:N \g__talk_frame_struct_int ,
1865 tag = frametitle ,
1866 title = { \text_purify:n { \g__talk_frame_title_tl } } ,
1867 }
1868 \group_begin:
1869 \tagpdfparaOff
1870 #1
1871 \group_end:
1872 \__talk_header_tag_end:
1873 }
1874 \tl_new:N \l__talk_section_tl
1875 \tl_new:N \g__talk_section_tl
1876 \tl_new:N \l__talk_subsection_tl
1877 \tl_new:N \g__talk_subsection_tl
1878 \tl_new:N \l__talk_subsubsection_tl
1879 \tl_new:N \g__talk_subsubsection_tl
1880 \keys_define:nn { talk / heading }
1881 {
1882 bookmark .tl_set:N =
1883 \l__talk_sec_bookmark_tl ,
1884 label .code:n =
1885 { \tl_put_right:N \l__talk_sec_label_tl { \label {#1} } } ,
1886 nameref .tl_set:N =
1887 \l__talk_sec_nameref_tl ,
1888 numbered .bool_set:N
1889 = \l__talk_sec_numbered_bool ,
1890 numbered .default:n
1891 = true ,
1892 unnumbered .bool_set_inverse:N
1893 = \l__talk_sec_numbered_bool ,
1894 unnumbered .default:n
1895 = true ,
1896 quote .tl_set:N =
1897 \l__talk_sec_quote_tl ,
1898 running .tl_set:N =
1899 \l__talk_sec_running_tl ,
1900 shorttitle .meta:n =
1901 {
1902 bookmark = {#1} ,
1903 nameref = {#1} ,
1904 running = {#1} ,
1905 toc = {#1}
1906 } ,
1907 subtitle .tl_set:N =
1908 \l__talk_sec_subtitle_tl ,
1909 toc .tl_set:N =
1910 \l__talk_sec_toc_tl
1911 }
1912 \tl_new:N \l__talk_sec_label_tl
1913 \newcounter { section }
1914 \newcounter { subsection } [ section ]
1915 \newcounter { subsubsection } [ subsection ]
1916 \seq_gremove_all:Nn \g__talk_cnt_reset_seq { section }
1917 \seq_gremove_all:Nn \g__talk_cnt_reset_seq { subsection }
1918 \seq_gremove_all:Nn \g__talk_cnt_reset_seq { subsubsection }
1919 \cs_gset:Npn \thesection { \@arabic \c@section }
1920 \cs_gset:Npn \thesubsection { \thesection . \@arabic \c@subsection }
1921 \cs_gset:Npn \thesubsubsection { \thesubsection . \@arabic \c@subsubsection }
1922 \seq_set_from_clist:Nn \l_tmpa_seq
1923 { section , subsection , subsubsection }
1924 \seq_map_indexed_inline:Nn \l_tmpa_seq
1925 {
1926 \use:e
1927 {
1928 \NewDocumentCommand \exp_not:c { insert #2 } { }
1929 {
1930 \exp_not:N \tl_use:N
1931 \exp_not:c { l__talk_ #2 _tl }
1932 }
1933 \NewDocumentCommand \exp_not:c {#2}
1934 { s D <> { all } = { shorttitle } O {##4} m }
1935 {
1936 \exp_not:N \bool_if:NF \exp_not:N \l__talk_frame_bool
1937 {
1938 \__talk_if_overlay:nT {##2}
1939 { \exp_not:c { __talk_head_ #1 :Nnn } ##1 {##3} {##4} }
1940 }
1941 }
1942 \cs_new_protected:Npn \exp_not:c { __talk_head_ #1 :Nnn } ##1##2##3
1943 {
1944 \exp_not:N \refstepcounter {#2}
1945 \UseTaggingSocket { sec / end } { \use:c { toclevel@ #2 } }
1946 \UseTaggingSocket { sec / begin }
1947 {
1948 { \use:c { toclevel@ #2 } }
1949 {
1950 tag =
1951 \exp_not:N \UseStructureName
1952 { sec / \use:c { toclevel@ #2 } }
1953 }
1954 }
1955 \tl_set:Nn \exp_not:c { l__talk_ #2 _tl } {##3}
1956 \keys_set:nn { talk / heading } { shorttitle = {##3} , ##2 }
1957 \exp_not:N \bool_if:NT ##1
1958 {
1959 \tl_clear:N \exp_not:N \l__talk_sec_bookmark_tl
1960 \tl_clear:N \exp_not:N \l__talk_sec_running_tl
1961 \tl_clear:N \exp_not:N \l__talk_sec_toc_tl
1962 \bool_set_false:N \exp_not:N \l__talk_sec_numbered_bool
1963 }
1964 \UseTaggingSocket { talk / sec / title } {#2}
1965 \str_if_eq:nnT {#2} { section }
1966 { \tl_clear:N \exp_not:N \l__talk_subsection_tl }
1967 \str_if_eq:nnF {#2} { subsubsection }
1968 { \tl_clear:N \exp_not:N \l__talk_subsubsection_tl }
1969 \exp_not:N \__talk_head_marks:nnVVV {#2} {#1}
1970 \exp_not:N \l__talk_sec_toc_tl
1971 \exp_not:N \l__talk_sec_bookmark_tl
1972 \exp_not:N \l__talk_sec_nameref_tl
1973 \hook_use:n { #2 / begin }
1974 }
1975 \hook_new:n { #2 / begin }
1976 }
1977 }
1978 \providecommand \addcontentslinebookmark [ 3 ] { }
1979 \providecommand \addcontentslinebookmarkOff { }
1980 \providecommand \addcontentslinebookmarkReset { }
1981 \providecommand \texorpdfstring [ 2 ] {#1}
1982 \cs_new_protected:Npn \__talk_head_marks:nnnnn #1#2#3#4#5
1983 {
1984 \tl_set:Nn \@currentlabelname {#5}
1985 \tl_if_blank:nTF {#3}
1986 {
1987 \tl_if_blank:nF {#4}
1988 {
1989 \__talk_head_marks_aux:Nnnn
1990 \addcontentslinebookmark {#1} {#2} {#4}
1991 }
1992 }
1993 {
1994 \tl_if_blank:nT {#4}
1995 { \addcontentslinebookmarkOff }
1996 \__talk_head_marks_aux:Nnnn
1997 \addcontentsline {#1} {#2} { \texorpdfstring {#3} {#4} }
1998 }
1999 }
2000 \cs_generate_variant:Nn \__talk_head_marks:nnnnn { nnVVV }
2001 \cs_new_protected:Npn \__talk_head_marks_aux:Nnnn #1#2#3#4
2002 {
2003 #1 { toc } {#2}
2004 {
2005 \int_compare:nNnF {#3} > { \value { secnumdepth } }
2006 { \protect \numberline { \use:c { the #2 } } }
2007 #4
2008 }
2009 }
2010 \NewTaggingSocket { talk / sec / title } { 1 }
2011 \NewTaggingSocketPlug { talk / sec / title } { default }
2012 {
2013 \exp_args:Ne \__talk_head_tag:nn
2014 { \text_purify:v { l__talk_ #1 _ tl } } {#1}
2015 }
2016 \cs_new_protected:Npn \__talk_head_tag:nn #1#2
2017 {
2018 \tag_struct_begin:e
2019 {
2020 tag =
2021 \UseStructureName { sec / \use:c { toclevel@ #2 } / title } ,
2022 title = {#1} ,
2023 actualtext = {#1} ,
2024 }
2025 \tag_struct_end:
2026 }
2027 \AssignTaggingSocketPlug { talk / sec / title } { default }
2028 \cs_gset_protected:Npn \@starttoc #1
2029 {
2030 \begingroup
2031 \makeatletter
2032 \UseTaggingSocket { toc / starttoc / before } {#1}
2033 \@input { \jobname .#1 }
2034 \UseTaggingSocket { toc / starttoc / after } {#1}
2035 \legacy_if:nT { @filesw }
2036 {
2037 \AddToHook { enddocument / afterlastpage }
2038 {
2039 \expandafter \newwrite \csname tf@ #1 \endcsname
2040 \immediate \openout \csname tf@ #1 \endcsname \jobname .#1 \relax
2041 }
2042 }
2043 \@nobreakfalse
2044 \endgroup
2045 }
2046 \NewDocumentCommand \tableofcontents { O { } }
2047 {
2048 \group_begin:
2049 \@starttoc { toc }
2050 \group_end:
2051 }
2052 \cs_new_protected:Npn \l@section #1#2
2053 { \__talk_toc_aux:nnnn { 1 } { \bfseries \color { structure } } {#1} {#2} }
2054 \cs_new_protected:Npn \l@subsection #1#2
2055 {
2056 \__talk_toc_aux:nnnn
2057 { 2 }
2058 {
2059 \skip_set:Nn \leftskip { 2em }
2060 \color_ensure_current:
2061 }
2062 {#1} {#2}
2063 }
2064 \cs_new_protected:Npn \l@subsubsection #1#2
2065 {
2066 \__talk_toc_aux:nnnn
2067 { 3 }
2068 {
2069 \skip_set:Nn \leftskip { 4em }
2070 \color_ensure_current:
2071 \footnotesize
2072 }
2073 {#1} {#2}
2074 }
2075 \cs_new_protected:Npn \__talk_toc_aux:nnnn #1#2#3#4
2076 {
2077 \int_compare:nNnTF { \value { section } } < 1
2078 { \use:n }
2079 { \__talk_toc_dest:n }
2080 { \__talk_toc_level:nnnn {#1} {#2} {#3} {#4} }
2081 }
2082 \cs_new_protected:Npn \__talk_toc_dest:n
2083 {
2084 \exp_after:wN \__talk_toc_dest:w \@contentsline@destination
2085 . 0 . 0 . 0 . \q_stop
2086 }
2087 \cs_new_protected:Npn \__talk_toc_dest:w #1 . #2 . #3 . #4 . #5 \q_stop #6
2088 {
2089 \bool_lazy_or:nnTF
2090 {
2091 \bool_lazy_and_p:nn
2092 { \int_compare_p:nNn { \value { section } } = {#2} }
2093 { \int_compare_p:nNn { \value { subsection } } = 0 }
2094 }
2095 {
2096 \bool_lazy_and_p:nn
2097 { \int_compare_p:nNn { \value { section } } = {#2} }
2098 { \int_compare_p:nNn { \value { subsection } } = {#3} }
2099 }
2100 {#6}
2101 {
2102 \opacity_begin:n { 0.2 }
2103 #6
2104 \opacity_end:
2105 }
2106 }
2107 \cs_new_protected:Npn \__talk_toc_level:nnnn #1#2#3#4
2108 {
2109 \int_compare:nNnF {#1} > { \value { tocdepth } }
2110 {
2111 \group_begin:
2112 \noindent
2113 #2
2114 \UseHookWithArguments { contentsline / text / before } { 4 }
2115 {#1} {#3} {#4} { \@contentsline@destination }
2116 #3
2117 \UseHookWithArguments { contentsline / text / after } { 4 }
2118 {#1} {#3} {#4} { \@contentsline@destination }
2119 \UseHookWithArguments { contentsline / page / before } { 4 }
2120 {#1} {#3} {#4}
2121 { \@contentsline@destination }
2122 \UseHookWithArguments { contentsline / page / after } { 4 }
2123 {#1} {#3} {#4}
2124 { \@contentsline@destination }
2125 \par
2126 \group_end:
2127 \vfil
2128 }
2129 }
2130 \setcounter { tocdepth } { 2 }
2131 \NewDocumentEnvironment { description } { } { } { }
2132 \NewDocumentEnvironment { quote } { } { } { }
2133 \NewDocumentEnvironment { quotation } { } { } { }
2134 \NewDocumentEnvironment { verse } { } { } { }
2135 \AddToHook { begindocument / before }
2136 {
2137 \clist_map_inline:nn { quote , quotation , verse }
2138 {
2139 \NewEnvironmentCopy { std #1 } {#1}
2140 \RenewDocumentEnvironment {#1} { d <> !O { } }
2141 {
2142 \__talk_action_begin:n {##1}
2143 \begin { std #1 } [ {##2} ]
2144 \ignorespaces
2145 }
2146 {
2147 \end { std #1 }
2148 \__talk_action_end:
2149 }
2150 }
2151 }
2152 \NewDocumentEnvironment { block } { d <> m }
2153 {
2154 \__talk_action_begin:n {#1}
2155 \par
2156 \vbox_set:Nw \l__talk_tmp_box
2157 \group_begin:
2158 \medskip
2159 \leavevmode
2160 \normalfont \large \bfseries
2161 \color { structure }
2162 #2
2163 \par
2164 \medskip
2165 \group_end:
2166 }
2167 {
2168 \vbox_set_end:
2169 \box_use:N \l__talk_tmp_box
2170 \par
2171 \__talk_action_end:
2172 }
2173 \AddToHook { begindocument / before }
2174 {
2175 \NewCommandCopy \stditem \item
2176 \RenewDocumentCommand \item { d <> o }
2177 {
2178 \IfNoValueTF {#2}
2179 { \stditem }
2180 { \stditem [ {#2} ] }
2181 \IfNoValueTF {#1}
2182 {
2183 \exp_after:wN \__talk_item_parse_spec:w
2184 \l__talk_action_spec_str < all > \q_stop
2185 }
2186 { \__talk_item_parse_spec:n {#1} }
2187 }
2188 }
2189 \cs_new_protected:Npn \__talk_item_parse_spec:w #1 < #2 > #3 \q_stop
2190 { \__talk_item_parse_spec:n {#2} }
2191 \cs_new_protected:Npn \__talk_item_parse_spec:n #1
2192 {
2193 \bool_lazy_or:nnF
2194 { \tl_if_blank_p:n {#1} }
2195 { \str_if_eq_p:nn {#1} { all } }
2196 {
2197 \tl_set:Ne \l__talk_list_end_tl
2198 {
2199 \exp_not:N \int_compare:nNnT \tex_currentgrouplevel:D =
2200 { \int_eval:n { \tex_currentgrouplevel:D + 1 } }
2201 {
2202 \__talk_action_end:
2203 \tl_clear:N \exp_not:N \l__talk_list_end_tl
2204 }
2205 }
2206 \__talk_action_begin:n {#1}
2207 }
2208 }
2209 \tl_new:N \l__talk_list_end_tl
2210 \cs_if_exist:NTF \l__block_topsepadd_skip
2211 {
2212 \cs_gset_protected:Npn \__block_inter_item:
2213 {
2214 \legacy_if:nT { @inlabel }
2215 { \indent \par }
2216 \mode_if_horizontal:T
2217 {
2218 \__block_skip_remove_last:
2219 \__block_skip_remove_last:
2220 \par
2221 }
2222 \l__talk_list_end_tl
2223 \__kernel_list_item_end:
2224 \__kernel_list_item_begin:
2225 \addpenalty \@itempenalty
2226 \addvspace \itemsep
2227 }
2228 \IfFormatAtLeastTF { 2026-06-01 }
2229 { \cs_gset_protected:Npe \BlockEnvEnd }
2230 { \cs_gset:Npe \endblockenv }
2231 {
2232 \exp_not:n
2233 { \__block_debug_typeout:n { blockenv~common~ending \on@line } }
2234 \cs_if_exist:NTF \l__block_transparent_level_bool
2235 {
2236 \exp_not:N \bool_if:NF
2237 \exp_not:N \l__block_transparent_level_bool
2238 }
2239 {
2240 \exp_not:N \bool_if:NT
2241 \exp_not:N \l__block_level_incr_bool
2242 }
2243 { \int_gdecr:N \exp_not:N \g_block_nesting_depth_int }
2244 \exp_not:n
2245 {
2246 \legacy_if:nT { @inlabel }
2247 {
2248 \mode_leave_vertical:
2249 \legacy_if_gset_false:n { @inlabel }
2250 }
2251 \__block_if_list:T
2252 { \legacy_if:nT { @newlist } { \@noitemerr } }
2253 \mode_if_horizontal:TF
2254 {
2255 \__block_skip_remove_last:
2256 \__block_skip_remove_last:
2257 \par
2258 }
2259 { \@inmatherr { \end { \@currenvir } } }
2260 \l__talk_list_end_tl
2261 \__kernel_displayblock_end:
2262 \__block_if_list:T { \legacy_if_gset_false:n { @newlist } }
2263 \legacy_if_gset_false:n { @nobreak }
2264 \legacy_if:nF { @noparlist }
2265 {
2266 \__block_skip_set_to_last:N \l_tmpa_skip
2267 \dim_compare:nNnT \l_tmpa_skip > \c_zero_dim
2268 {
2269 \skip_vertical:n { - \l_tmpa_skip }
2270 \skip_vertical:n
2271 { \l_tmpa_skip + \parskip - \@outerparskip }
2272 }
2273 \addpenalty \@endparpenalty
2274 \addvspace \l__block_topsepadd_skip
2275 }
2276 \socket_use:n { block / endpe }
2277 }
2278 }
2279 }
2280 {
2281 \AddToHook { item / after }
2282 { \l__talk_list_end_tl }
2283 }
2284 \AddToHook { begindocument / before }
2285 {
2286 \clist_map_inline:nn { itemize , enumerate , description }
2287 {
2288 \IfFormatAtLeastTF { 2026-06-01 }
2289 {
2290 \RenewDocumentEnvironment {#1} { = { action-spec } !o }
2291 { \SimpleBlockEnv {#1} {##1} }
2292 { \BlockEnvEnd }
2293 }
2294 {
2295 \RenewDocumentEnvironment {#1} { = { action-spec } !o }
2296 {
2297 \IfNoValueTF {##1}
2298 { \UseInstance { blockenv } {#1} { } }
2299 { \UseInstance { blockenv } {#1} {##1} }
2300 }
2301 { \endblockenv }
2302 }
2303 }
2304 }
2305 \AddToHook { begindocument / before }
2306 {
2307 \EditInstance { item } { basic }
2308 { label-format = \color { structure } #1 }
2309 \EditInstance { item } { description }
2310 { label-format = \normalfont \bfseries \color { structure } #1 }
2311 }
2312 \IfFormatAtLeastTF { 2026-06-01 }
2313 {
2314 \keys_define:nn { template / block / std }
2315 { action-spec .str_set:N = \l__talk_action_spec_str }
2316 }
2317 {
2318 \keys_define:nn { template / block / display }
2319 { action-spec .str_set:N = \l__talk_action_spec_str }
2320 }
2321 \NewCommandCopy \stdnewtheorem \newtheorem
2322 \RenewDocumentCommand \newtheorem { m o m o }
2323 {
2324 \IfNoValueTF {#4}
2325 {
2326 \IfNoValueTF {#2}
2327 { \stdnewtheorem {#1} {#3} }
2328 { \stdnewtheorem {#1} [ {#2} ] {#3} }
2329 }
2330 {
2331 \IfNoValueTF {#2}
2332 { \stdnewtheorem {#1} {#3} [ {#4} ] }
2333 { \stdnewtheorem {#1} [ {#2} ] {#3} [ {#4} ] }
2334 }
2335 \NewEnvironmentCopy { std #1 } {#1}
2336 \RenewDocumentEnvironment {#1} { D <> { all } o }
2337 {
2338 \__talk_action_begin:n {##1}
2339 \IfNoValueTF {##2}
2340 { \begin { std #1 } }
2341 { \begin { std #1 } [ {##2} ] }
2342 \ignorespaces
2343 }
2344 {
2345 \end { std #1 }
2346 \__talk_action_end:
2347 }
2348 }
2349 \clist_map_inline:nn
2350 { author , date , institute , subtitle , title }
2351 {
2352 \keys_define:nn { talk / metadata }
2353 {
2354 #1 .tl_gset:c = @ #1 ,
2355 short- #1 .tl_gset:c = @short #1
2356 }
2357 }
2358 \tl_gclear:N \@author
2359 \tl_gclear:N \@title
2360 \tl_gset_eq:NN \@shortdate \@date
2361 \RenewDocumentCommand \author { = { short-author } O { {#2} } m }
2362 {
2363 \keys_set:nn { talk / metadata } {#1}
2364 \tl_gset:Nn \@author {#2}
2365 \tl_gset_eq:NN \g__tag_title_author_tl \@author
2366 \keys_set_known:nn { hyp } {#1}
2367 }
2368 \RenewDocumentCommand \date { = { short-date } O { {#2} } m }
2369 {
2370 \keys_set:nn { talk / metadata } {#1}
2371 \tl_gset:Nn \@date {#2}
2372 }
2373 \RenewDocumentCommand \title { = { short-title } O { {#2} } m }
2374 {
2375 \keys_set:nn { talk / metadata } {#1}
2376 \tl_gset:Nn \@title {#2}
2377 \tl_gset_eq:NN \g__tag_title_title_tl \@title
2378 \keys_set_known:nn { hyp } {#1}
2379 }
2380 \NewDocumentCommand \institute { = { short-institute } O { {#2} } m }
2381 {
2382 \keys_set:nn { talk / metadata } {#1}
2383 \tl_gset:Nn \@institute {#2}
2384 }
2385 \NewDocumentCommand \subtitle { = { short-subtitle } O { {#2} } m }
2386 {
2387 \keys_set:nn { talk / metadata } {#1}
2388 \tl_gset:Nn \@subtitle {#2}
2389 }
2390 \NewTemplateType { titlepage-element } { 1 }
2391 \DeclareTemplateInterface { titlepage-element } { talk } { 1 }
2392 {
2393 after-skip : length = 0em ,
2394 before-skip : length = 0em ,
2395 color : tokenlist = . ,
2396 font : tokenlist = \normalfont ,
2397 tag-begin : tokenlist = ,
2398 tag-end : tokenlist =
2399 }
2400 \DeclareTemplateCode { titlepage-element } { talk } { 1 }
2401 {
2402 after-skip = \l__talk_titlelem_after_skip ,
2403 before-skip = \l__talk_titlelem_before_skip ,
2404 color = \l__talk_titlelem_color_tl ,
2405 font = \l__talk_titlelem_font_tl ,
2406 tag-begin = \l__talk_titlelem_tag_begin_tl ,
2407 tag-end = \l__talk_titlelem_tag_end_tl
2408 }
2409 {
2410 \tl_if_empty:nF {#1}
2411 {
2412 \vspace { \l__talk_titlelem_before_skip }
2413 \group_begin:
2414 \tl_if_empty:NF \l__talk_titlelem_color_tl
2415 { \color_select:V \l__talk_titlelem_color_tl }
2416 \l__talk_titlelem_font_tl
2417 \l__talk_titlelem_tag_begin_tl
2418 #1
2419 \par
2420 \l__talk_titlelem_tag_end_tl
2421 \group_end:
2422 \vspace { \l__talk_titlelem_after_skip }
2423 }
2424 }
2425 \DeclareInstance { titlepage-element } { author } { talk }
2426 { before-skip = 1em }
2427 \DeclareInstance { titlepage-element } { date } { talk }
2428 { after-skip = 0.5em }
2429 \DeclareInstance { titlepage-element } { institute } { talk }
2430 { font = \scriptsize }
2431 \DeclareInstance { titlepage-element } { subtitle } { talk }
2432 { before-skip = 0.25em , color = structure }
2433 \DeclareInstance { titlepage-element } { title } { talk }
2434 {
2435 color = structure ,
2436 font = \Large ,
2437 tag-begin = \tag_struct_begin:n { tag = Title } ,
2438 tag-end = \tag_struct_end:
2439 }
2440 \NewTemplateType { titlepage } { 0 }
2441 \DeclareTemplateInterface { titlepage } { talk } { 0 }
2442 {
2443 element-order : commalist =
2444 {
2445 title ,
2446 subtitle ,
2447 author ,
2448 institute ,
2449 date
2450 } ,
2451 framestyle : tokenlist = talk ,
2452 horizontal-alignment : choice { left , center , right } = center ,
2453 vertical-alignment : choice { bottom , center , stretch , top } = center
2454 }
2455 \DeclareTemplateCode { titlepage } { talk } { 0 }
2456 {
2457 element-order = \l__talk_titlepage_order_clist ,
2458 framestyle = \l__talk_titlepage_framestyle_tl ,
2459 horizontal-alignment =
2460 {
2461 left = \tl_set:Nn \l__talk_titlepage_alignment_tl { flushleft } ,
2462 center = \tl_set:Nn \l__talk_titlepage_alignment_tl { center } ,
2463 right = \tl_set:Nn \l__talk_titlepage_alignment_tl { flushright }
2464 } ,
2465 vertical-alignment =
2466 {
2467 bottom = \tl_set:Nn \l__talk_frame_alignment_tl { bottom } ,
2468 center = \tl_set:Nn \l__talk_frame_alignment_tl { center } ,
2469 stretch = \tl_set:Nn \l__talk_frame_alignment_tl { stretch } ,
2470 top = \tl_set:Nn \l__talk_frame_alignment_tl { top }
2471 }
2472 }
2473 {
2474 \tl_if_empty:NF \l__talk_titlepage_framestyle_tl
2475 { \exp_args:NV \thispagestyle \l__talk_titlepage_framestyle_tl }
2476 \begin { \l__talk_titlepage_alignment_tl }
2477 \cs_set_protected:Npn \and { \quad }
2478 \clist_map_inline:Nn \l__talk_titlepage_order_clist
2479 {
2480 \ExpandArgs { nnv } \UseInstance { titlepage-element }
2481 {##1} { @ ##1 }
2482 }
2483 \end { \l__talk_titlepage_alignment_tl }
2484 }
2485 \NewDocumentCommand \maketitle { O {} }
2486 {
2487 \bool_if:NTF \l__talk_frame_bool
2488 { \UseTemplate { titlepage } { talk } {#1} }
2489 {
2490 \begin { frame }
2491 \UseTemplate { titlepage } { talk } {#1}
2492 \end { frame }
2493 }
2494 }
2495 %% Copyright (C) 2023-2025 by
2496 %% Joseph Wright <[email protected]>
2497 %%
2498 %% It may be distributed and/or modified under the conditions of
2499 %% the LaTeX Project Public License (LPPL), either version 1.3c of
2500 %% this license or (at your option) any later version. The latest
2501 %% version of this license is in the file:
2502 %%
2503 %% https://www.latex-project.org/lppl.txt
2504 %%
2505 %% This work is "maintained" (as per LPPL maintenance status) by
2506 %% Joseph Wright.
2507 %%
2508 %% This work consists of the files ltx-talk.dtx,
2509 %% ltx-talk.ins,
2510 %% ltx-talk.tex,
2511 %% ltx-talk-code.tex,
2512 %% ltx-talk-color.dtx,
2513 %% ltx-talk-decode.dtx,
2514 %% ltx-talk-frame.dtx,
2515 %% ltx-talk-frame-structure.dtx,
2516 %% ltx-talk-mode.dtx,
2517 %% ltx-talk-overlay.dtx,
2518 %% ltx-talk-required.dtx,
2519 %% ltx-talk-structure.dtx and
2520 %% ltx-talk-title.dtx,
2521 %% and the derived files ltx-talk.cls,
2522 %% ltx-talk.pdf and
2523 %% ltx-talk-code.pdf.
2524 %%
2525 %%
2526 %% End of file `ltx-talk.cls'.