From 528e1bc5b5f04ff4200a0f1a2a94c9c5ddd9ca75 Mon Sep 17 00:00:00 2001 From: Jean-Marie Mineau Date: Wed, 15 Oct 2025 16:57:55 +0200 Subject: [PATCH] pretty sure I accidentally hardcoded edge cases --- X_appendices/released_software.typ | 2 +- slides.typ | 69 +++++++++++++++++++++++++++--- slides/sns_polylux_template.typ | 68 +++++++++++++++++++++-------- 3 files changed, 113 insertions(+), 26 deletions(-) diff --git a/X_appendices/released_software.typ b/X_appendices/released_software.typ index 943f485..5c82a2a 100644 --- a/X_appendices/released_software.typ +++ b/X_appendices/released_software.typ @@ -65,4 +65,4 @@ Androscalpel can be found at the following locations: - https://git.mineau.eu/these-android-re/androscalpel - https://github.com/histausse/androscalpel -The dataset, results of the dynamic analysis and results of benchmark before and after the instrumentations with Theseus are available on Zenodo (link to appear) +The dataset, results of the dynamic analysis and results of benchmark before and after the instrumentations with Theseus are available on Zenodo at https://doi.org/10.5281/zenodo.17350991. diff --git a/slides.typ b/slides.typ index 16fd024..7c6338c 100644 --- a/slides.typ +++ b/slides.typ @@ -49,16 +49,70 @@ ) ) -#slide( - title: [Test], - subtitle: [Test Slide], -)[ +#slide(new-sec: true, title: [Introduction], hide-title: true)[ + Intro 1 + +] + +#slide[ + Intro 2 + +] + +#new-section-slide([Tool Reusability]) + +#slide[ + Rasta 1 + /* #stack(dir: ltr, scale(40%, reflow: true, get_figure()), scale(55%, reflow: true, get_figure()), - ) + )*/ ] +#slide[ + Rasta 2 + +] + +#new-section-slide([Class Shadowing]) + +#slide[Shadow 1 + +] +#slide[Shadow 2 + +] +#slide[Shadow 3 + +] + +#new-section-slide([The Application of Theseus]) + +#slide[Th 1 + +] +#slide[Th 2 + +] + +#new-section-slide([Conclusion]) + +#slide[Conclusion 1 + +] +#slide[Conclusion 2 + +] + + +#empty-slide[ + Questions +] + + +/* + #slide()[ #get_figure()) ] @@ -80,7 +134,6 @@ // #toc-slide( title: [Outline] ) -#new-section-slide([First section]) #slide( title: [A slide without subtitle], @@ -120,7 +173,7 @@ #empty-slide()[ Ending slide ] - +*/ @@ -135,4 +188,6 @@ * */ +#pagebreak() +#set page(height: auto, margin: 25mm) #bibliography("bibliography.bib") diff --git a/slides/sns_polylux_template.typ b/slides/sns_polylux_template.typ index 42a0f9e..160e19a 100644 --- a/slides/sns_polylux_template.typ +++ b/slides/sns_polylux_template.typ @@ -123,11 +123,25 @@ cmyk(25%,7%,0%,0%), sns-polylux-template_date.update(date) body + + context { + //let section-pages = sns-polylux-template_section-pages.final() + if not "END" in sns-polylux-template_section-pages.at(here()).keys() { + let page_num = counter("logical-slide").at(here()) + sns-polylux-template_section-pages.update(secpages => { + secpages.insert("END", page_num) + secpages + }) + } + } } -#let register-section(title) = context { +#let register-section(title, no_dedicated_slide: false) = context { // YUCKKKKK, but polylux don't allows access to integers soooooo let page_num = counter("logical-slide").at(here()) //sns-polylux-template_slide-pages.at(here()) + if no_dedicated_slide { + page_num.at(0) += 1 + } sns-polylux-template_section-pages.update(secpages => { secpages.insert(repr(title), page_num) secpages @@ -267,35 +281,52 @@ cmyk(25%,7%,0%,0%), #let sections() = context { let section-pages = sns-polylux-template_section-pages.final() - let pnum = counter("logical-slide").at(here()).first() + let pnum = counter("logical-slide").at(here()).first() + 1 pl.toolbox.all-sections((sections, current) => { - let pnum_i = 0 + let beg-end-section = (:) + let prev-sec = none + for section in sections { + let s = repr(section.at("body")) + if prev-sec != none { + beg-end-section.insert(prev-sec, (section-pages.at(prev-sec).first(), section-pages.at(s).first())) + } + prev-sec = s + } + if prev-sec != none { + beg-end-section.insert(prev-sec, (section-pages.at(prev-sec).first(), section-pages.at("END").first() + 1)) + } + let section_names = () let section_pages = () for s in sections { let pages = () - let pnum_max = section-pages.at(repr(s.at("body"))).first() - while pnum_i < pnum_max and pnum_i < pnum - 1 { + let (pmin, pmax) = beg-end-section.at(repr(s.at("body"))) + + let p_i = pmin + while p_i < pmax and p_i < pnum { + // In section, before current page pages.push(sym.circle.filled) - pnum_i += 1 + p_i += 1 } - if pnum_i == pnum { + if p_i == pnum and p_i != pmax { + // In section, current page pages.push(sym.ast.circle) - pnum_i += 1 + p_i += 1 } - while pnum_i < pnum_max { + while p_i < pmax { + // In section, after current page pages.push(sym.circle.dotted) - pnum_i += 1 + p_i += 1 } - /* + //section_names.push(scale(50%, reflow: true, [#pnum #s (#pmin, #pmax)])) if s == current { - strong(s + " " + str(pnum)) + section_names.push(strong(s)) + section_pages.push(strong(pages.join([]))) } else { - s + " " + str(pnum) - }*/ - section_names.push(s) - section_pages.push(pages.join([])) + section_names.push(s) + section_pages.push(pages.join([])) + } } grid( columns: (auto,)*section_names.len(), @@ -340,6 +371,7 @@ cmyk(25%,7%,0%,0%), new-sec : false, page-number : true, hide-section : false, + hide-title : false, body ) = context( { let sections_height = 1.5cm @@ -355,7 +387,7 @@ cmyk(25%,7%,0%,0%), // Else the new-sec name is new-sec if type(new-sec)==bool { if new-sec { - register-section(title) + register-section(title, no_dedicated_slide: true) } } else { register-section(new-sec) @@ -379,7 +411,7 @@ cmyk(25%,7%,0%,0%), })) ), grid.cell(colspan: columns.len(), progress-bar()), - if title != none { + if title != none and not hide-title { rect( width: 100%, height: title_bar_height, inset: 0.8cm, outset: 0pt,