diff --git a/1.0.0/example/bibliography.bib b/1.0.0/example/bibliography.bib new file mode 100644 index 0000000..2f7d360 --- /dev/null +++ b/1.0.0/example/bibliography.bib @@ -0,0 +1,13 @@ +// You can use LaTeX's bibliography format per default +// or +// Typst's Hayagriva: +// https://github.com/typst/hayagriva/blob/main/docs/file-format.md + +@software{Garcia2025Slides, + author = {Ernesto Martínez García}, + year = {2025}, + month = {8}, + title = {{ISEC Slides Typst Template}}, + url = {https://github.com/ecomaikgolf/typst-isec-slides-template}, + urldate = {2025-08-31} +} diff --git a/1.0.0/example/slides.pdfpc b/1.0.0/example/slides.pdfpc new file mode 100644 index 0000000..fae607b --- /dev/null +++ b/1.0.0/example/slides.pdfpc @@ -0,0 +1 @@ +{"pdfpcFormat":2,"disableMarkdown":false,"pages":[{"idx":1,"label":"1","overlay":0,"forcedOverlay":false,"hidden":false,"note":"This is a note that only the speaker will see."},{"idx":2,"label":"2","overlay":0,"forcedOverlay":false,"hidden":false,"note":"\n This note will appear on pdfpc's presenter mode. Lets see how long it can be lol\n\n It even supports multiline!\n "},{"idx":3,"label":"3","overlay":0,"forcedOverlay":false,"hidden":false},{"idx":4,"label":"4","overlay":0,"forcedOverlay":false,"hidden":false},{"idx":5,"label":"5","overlay":0,"forcedOverlay":false,"hidden":false}]} diff --git a/1.0.0/example/slides.typ b/1.0.0/example/slides.typ new file mode 100644 index 0000000..5557fec --- /dev/null +++ b/1.0.0/example/slides.typ @@ -0,0 +1,103 @@ +#import "../src/lib.typ": * +//#import "@local/definitely-not-isec-slides:1.0.0": * + +// ---------------------------------------------------------------------------- +// Configuration +// ---------------------------------------------------------------------------- +#show: definitely-not-isec-theme.with( + aspect-ratio: "16-9", + progress-bar: true, + config-info( + title: [Long Paper Title \ with One to Three Lines], + subtitle: [An optional short subtitle], + authors: ([*First Author*], [Second Author], [Third Author]), + extra: [SomeConf 2025], + footer: [First Author, Second Author, Third Author], + download-qr: "", + ), + config-common( + handout: false, + ), +) +// -------------------------------[[ CUT HERE ]]-------------------------------- +// +// #title-slide() +// +// #slide(alignment: top, title: [...]) +// +// #standout-slide() +// #section-slide() +// #blank-slide() +// + +// -------------------------------[[ CUT HERE ]]-------------------------------- + +// ---------------------------------------------------------------------------- +// Slides +// ---------------------------------------------------------------------------- + +#show cite: set text(fill: tugcolors.main) + +#title-slide() + +#slide(alignment: top, title: [First Slide])[ + + #quote-block(spacing: 0.3em)[ + #lorem(10) + ] + + #lorem(10) + + #color-block([Symmetric])[ + This looks much better + ] + + #lorem(10) + + #columns(2)[ + #icon-block([Symmetric], "ad-circle")[ + This looks much better + ] + + #color-block([Symmetric])[ + This looks much better + ] + ] + + #pdfpc.speaker-note("This is a note that only the speaker will see.") + +] + +#slide(alignment: top, title: [First Slide], outlined: false)[ + + #quote-block[ + #lorem(20) + ] + + Thus, by using common sense we can deduce that + + #note(" + This note will appear on pdfpc's presenter mode. Lets see how long it can be lol + + It even supports multiline! + ") +] + + +#section-slide(title: [Conclusions], subtitle: [Final Section]) + + +#blank-slide[ + A blank canvas for memes +] + + +#standout-slide(title: [But what if...?]) + + +#slide(title: [Bibliography], alignment: top)[ + #bibliography("bibliography.bib") +] + + +#title-slide() diff --git a/1.0.0/src/helper.typ b/1.0.0/src/helper.typ index 90f912b..6dd9606 100644 --- a/1.0.0/src/helper.typ +++ b/1.0.0/src/helper.typ @@ -3,17 +3,17 @@ // Fix for typst #311 "Behavior of first line indentation in paragraphs ..." // https://github.com/typst/typst/issues/311#issuecomment-2023038611 +// https://forum.typst.app/t/how-to-indent-paragraphs-following-a-list-without-affecting-the-paragraph-after-a-heading/4210?u=fungai2000 #let fix-311 = context { set par.line(numbering: none) - let a = par(box()) - a - v(-0.8 * measure(2 * a).width) + v(0pt, weak: true) + par(none) } -// Transforms content into string #let content-to-string(content) = { if content.has("text") { content.text + }else if content.has("child") { + content-to-string(content.child) } else if content.has("children") { content.children.map(content-to-string).join("") } else if content.has("body") { @@ -23,12 +23,37 @@ } } +#let content-to-string-omit(content) = { + if content.has("text") { + content.text + }else if content.has("child") { + content-to-string-omit(content.child) + } else if content.has("children") { + content.children.map(content-to-string-omit).join("") + } else if content.has("body") { + content-to-string-omit(content.body) + } else if content == [ ] { + " " + } else { + "..." + } +} + // partitle simulates \paragraph{title} (more or less) #let partitle(title: [Title], body) = context [ #block(above: 0.8cm)[ - *#title* #h(0.3cm) #body + *#title.* #h(0.3cm) #body ] #fix-311 ] +// Wrapper for the technique shown here: +// https://typst.app/docs/reference/layout/layout/ +#let measure-text-height(body) = { + layout(size => { + let (height,) = measure(width: size.width, body) + return height + }) +} + //vim:tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab colorcolumn=81 diff --git a/1.0.0/src/lib.typ b/1.0.0/src/lib.typ index 1b75756..0157777 100644 --- a/1.0.0/src/lib.typ +++ b/1.0.0/src/lib.typ @@ -1,284 +1,413 @@ -#import "@preview/polylux:0.4.0": * -#import "@preview/codly:1.2.0": * -#import "@preview/showybox:2.0.4": showybox -#import "@preview/cheq:0.2.2": * -#import "@preview/fontawesome:0.5.0": * +#import "@preview/touying:0.6.1": * -#import "pages/title.typ": * -#import "pages/outline.typ": * -#import "colors.typ" +// Project +#import "tugcolors.typ" +#import "helper.typ": * +#import "logos.typ": * +#import "macros.typ": * -#let slides( - title: none, - subtitle: none, - authors: none, - date: none, - footer: none, - progress: true, - extra: none, - body -) = [ +#import "@preview/codly:1.3.0": * // For bindings +#import "@preview/cetz:0.3.2" // For bindings +#import "@preview/fletcher:0.5.5" as fletcher: edge, node // For bindings +#import "@preview/tiaoma:0.3.0" // For auto QR generation +// Touying bindings for cetz +#let cetz-canvas = touying-reducer.with( + reduce: cetz.canvas, + cover: cetz.draw.hide.with(bounds: true), +) +// Touying bindings for fletcher +#let fletcher-diagram = touying-reducer.with( + reduce: fletcher.diagram, + cover: fletcher.hide, +) - #let get-heading(level: 1) = context { - let ah = query(heading.where(level: level).after(here())) - let bh = query(heading.where(level: level).before(here())) - - if ah.len() > 0 { - let h = ah.first() - if h.location().page() == here().page() { - h.body - } else { - if bh.len() > 0 { - let h = bh.last() - h.body - } - } - } - } - - #show emph: it => { - text(colors.tug, it.body) - } - - // -------------------------------------------------------------------------- - // Text - - #set text(size: 20pt, lang: "en", region: "US", font: "Open Sans") - - // -------------------------------------------------------------------------- - // Page - - #set page( - paper: "presentation-16-9", - margin: ( - left: 1.49cm, - right: 1.48cm, - top: 2.6cm, - bottom: 1.6cm, - ), - header: [ - #set block(width: 100%) - #set text(fill: black) - - #grid(columns: (auto, 25%), gutter: 0pt, align: top, - block[ - #text(size: 24pt, weight: "semibold", get-heading()) - ], - block()[ - #align(top + right)[ - #v(-0.17cm) - #move(dx: 0.27cm)[ - #text(size: 13.5pt, weight: "medium")[isec.tugraz.at] - #h(0.1cm) - #box(inset: 0pt, outset: 0pt)[#square(width: 0.3cm, height: 0.3cm, outset: 0pt, inset: 0pt, stroke: none, fill: colors.tug)] - ] - ] - ], - ) - ], - footer: context [ - #let footer-body = [ - - #set block(height: 100%, width: 100%) - #set text(size: 15pt, fill: rgb("808080")) - - #grid(columns: (page.margin.bottom.length - 1.68%, 1.3%, auto, 2.5%), - gutter: 0pt, align: horizon, - block(fill: colors.tug)[ - #set align(center + horizon) - #set text(fill: white, size: 12pt) - #toolbox.slide-number - ], - block(), - block[ - #set align(left + horizon) - #set text(size: 13pt) - #footer - ], - block(), - ) - ] - - #let progress-body = [ - #set block(height: 2pt, width: 100%) - #toolbox.progress-ratio(ratio => { - grid( - columns: (ratio * 100%, 1fr), gutter: 0pt, - block(fill: colors.tug), - block(), - ) - }) - ] - - #show: toolbox.full-width-block[ - #stack(dir: ttb, - block(height: 100%, footer-body), - if progress { place(float: true, bottom)[#progress-body] } - ) - ] - ], - ) - - // -------------------------------------------------------------------------- - // Enumerate and listing - - #let default-map = ( - "x": text(fill: colors.tuggreen, fa-square-check()), - " ": text(fill: colors.tuggray, fa-square()), - "+": text(fill: colors.tuggreen, fa-plus-circle()), - "-": text(fill: colors.tug, fa-minus-circle()), - ">": text(fill: colors.tugblue, fa-arrow-circle-right()), - ) - - - // TODO not a big fan of doing this one - #show: checklist.with( - marker-map: default-map, - show-list-set-block: (above: 0.7em, below: 0.7em), - radius: 0pt, - ) - - // TODO improve - - #set list(indent: 0.48cm, body-indent: 1.2em, spacing: 0.4cm) - #set list(marker: ( - (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: colors.tug))), - (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: black))), - (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: gray))), - )) - - //#show list.item.where(level: 1): set text(size: 10pt) - - #set enum(numbering: n => [ - #square(stroke: none, fill: colors.tug)[ - #align(center)[ - #text(fill: white)[#n] - ] - ] - ]) - - // -------------------------------------------------------------------------- - // Code listings - - #show raw.where(block: true): set text(size: 13pt) - - #show: codly-init.with() - #codly( - display-name: false, - display-icon: false, - radius: 0pt, - stroke: 1pt + black, - smart-indent: true, - zebra-fill: luma(240), - number-format: (number) => [#text(size: 12pt, fill: gray)[#number]], - number-align: right + horizon, - breakable: true) - - // -------------------------------------------------------------------------- - // Bibliography - - #set bibliography(title: "Bibliography", style: "ieee") - #set cite(style: "alphanumeric") - #show bibliography: set par(spacing: 0.4cm) - #show bibliography: set grid(align: top + left) - #show bibliography: set text(17pt) - #show bibliography: t => { - show grid.cell.where(x: 0): set text(fill: colors.tug) - show grid.cell.where(x: 0): set align(top + left) - show link: set text(fill: colors.tuggray) - t - } - - // -------------------------------------------------------------------------- - // Page - #show heading.where(level: 1): it => [ - #slide[ - // Hack to show the slides even if empty - #place(left + top, hide(square(width: 0pt, height: 0pt))) - ] - ] - - #title-slide(title, subtitle, authors, extra) - - #counter("logical-slide").update(0) - #set align(horizon) - - #body +// Macro for notes +#let note(text) = [ + #pdfpc.speaker-note(text) ] -// Standout slides don't count as real slides in the official template -#let standout-slide(body) = [ - #set page(footer: none, header: none) - #set align(center) - #set text(size: 28pt) - #move(dy: -2.08cm)[ - #body - ] -] +// ----------------------------------------------------------------------------- +// Slide Types +// ----------------------------------------------------------------------------- -#let section-slide(section, subtitle) = [ - #set page(footer: none, header: none) - #set align(center) +// +// Normal Slide +// +#let slide( + title: auto, + alignment: none, + outlined: true, + ..args, +) = touying-slide-wrapper(self => { + let info = self.info + args.named() - #slide[ - #move(dy: -0.3cm)[ - #text(size: 36pt)[#section] + // Header: + // --------------------------------------------------------------------------- + // [ ] Slide Title [ ] Logo [ ] + // --------------------------------------------------------------------------- + let header(self) = { + // Slide Title: if the user overrides the title of a certain slide, use it + let hdr = if title != auto { title } else { self.store.header } - #v(-0.2cm) - #text(size: 20pt)[#subtitle] - ] - ] -] + show heading: set text(size: 24pt, weight: "semibold") -#let blank-slide(body) = [ - #set page(footer: none, header: none, margin: 0pt) - #set align(center) + grid( + columns: (self.page.margin.left, 1fr, 1cm, auto, 1.2cm), + block(), + heading(level: 1, outlined: outlined, hdr), + block(), + move(dy: -0.31cm, institute-logo(self)), + block(), + ) + } - #slide[ - #body - ] -] + // Footer: + // --------------------------------------------------------------------------- + // Slide Number [ ] First Author + // --------------------------------------------------------------------------- + let footer(self) = context { + set block(height: 100%, width: 100%) + set text(size: 15pt, fill: self.colors.footer) -#let highlight(color: colors.tug, fill: white, body) = [ - #box[ - #rect(fill: color, inset: (x: 0.2em, y: 0.4em))[ - #set text(fill: fill) - #body - ] - ] -] + grid( + columns: (self.page.margin.bottom - 1.68%, 1.3%, auto, 1cm), + block(fill: self.colors.primary)[ + #set align(center + horizon) + #set text(fill: white, size: 12pt) + #utils.slide-counter.display() + ], + block(), + block[ + #set align(left + horizon) + #set text(size: 13pt) + #info.at("footer", default: "") + ], + block(), + ) -#let comment(body) = [ - #set text(fill: colors.tuggray, size: 16pt) - #body -] + // Progress bar + if self.store.progress-bar { + place(bottom + left, float: true, + move(dy: 1.05cm, // Bad solution, I know + components.progress-bar( + height: 3pt, + self.colors.primary, + white, + ) + ) + ) + } + } -#let tblock(title, body, color: colors.tug, color-body: colors.lite) = [ + let self = utils.merge-dicts(self, config-page( + header: header, + footer: footer, + )) - #show emph: it => { - text(weight: "medium", fill: color, it.body) - } + set align( + if alignment == none { + self.store.default-alignment + } else { + alignment + } + ) - #showybox( - title-style: ( - color: white, - sep-thickness: 0pt, - ), - frame: ( - //inset: 0.4em, - radius: 0pt, - thickness: 0pt, - border-color: color, - title-color: color, - body-color: color-body, - inset: (x: 0.55em, y: 0.65em), - ), - above: 0.78em, - below: 0.78em, - title: title, - body - ) -] + touying-slide(self: self, ..args) +}) + +// +// Title Slide +// +#let title-slide(..args) = touying-slide-wrapper(self => { + let info = self.info + args.named() + let body = { + let footer-isec = [ + #set text(size: 13.3pt, weight: "medium") + + #let arrow-icon = [ + #move(dy: -0.05cm, dx: -0.05cm, rotate(45deg, square( + fill: none, + size: 0.18cm, + stroke: ( + "top": self.colors.primary + 1.35pt, + "bottom": none, + "right": self.colors.primary + 1.35pt, + "left": none, + ), + ))) + ] + + #v(-0.5cm) + #box(arrow-icon) #h(0.1cm) #self.store.institute + ] + + set page(footer: footer-isec, header: none) + set block(below: 0pt, above: 0pt) + + // Top-right icon + text + place(top + right, dy: -1.9cm, dx: 0.78cm, [ + #self.store.logo + ]) + + v(0.8cm) + + block(width: 83%)[ + #let title = text(size: 40.5pt, weight: "bold")[#info.at( + "title", + default: "", + )] + + #move(dx: 0.04em)[ + #grid( + columns: (0.195cm, auto), + column-gutter: 0.7cm, + context [ + #let s = measure(title) + #move(dy: -0.4cm, rect( + fill: self.colors.primary, + height: s.height + 0.65cm, + )) + ], + title, + ) + ] + ] + + v(0.6cm) + + block(width: 70%)[ + #text( + size: 28.3pt, + fill: self.colors.primary, + weight: "bold", + )[#info.subtitle] + ] + + v(1.48cm) + + block(width: 70%)[ + #set text(size: 19pt) + #if type(info.authors) == array [ + #for author in info.authors [ + #author #h(1.1em) + ] + ] else [ + #info.authors + ] + ] + + v(0.95cm) + + block(width: 70%)[ + #info.extra + ] + + if ( + self.info.at("download-qr", default: none) != none + and self.info.at("download-qr", default: none) != "" + ) { + place(bottom + right)[ + #align(center + horizon)[ + #let s = 4.9cm + #tiaoma.qrcode(self.info.download-qr, width: s, height: s) + ] + ] + } + } + + touying-slide(self: self, body) +}) + +// +// Standout Slide +// +#let standout-slide( + title: auto, + ..args, +) = touying-slide-wrapper(self => { + let body = { + set align(center + horizon) + set text(size: 28pt) + move(dy: -2.08cm)[ + #text(weight: "semibold")[#title] + ] + } + + let self = utils.merge-dicts(self, config-page( + header: none, + footer: none, + )) + + //counter("touying-slide-counter").update(n => if n > 0 { n - 1 } else { 0 }) + + touying-slide(self: self, body, ..args) +}) + +// +// Section Slide +// +#let section-slide( + title: none, + subtitle: none, + ..args, +) = touying-slide-wrapper(self => { + let body = { + align(center + horizon)[ + #move(dy: -0.4cm)[ + #if title != none [ + #text(size: 36pt, weight: "semibold")[#title] + ] + + #if subtitle != none [ + #text(size: 20pt)[#subtitle] + ] + ] + ] + } + + let self = utils.merge-dicts(self, config-page( + header: none, + footer: none, + )) + + touying-slide(self: self, body, ..args) +}) + +// +// Blank Slide +// +#let blank-slide( + ..args, + body, +) = touying-slide-wrapper(self => { + let body = { + align(center + horizon)[ + #body + ] + } + + let self = utils.merge-dicts(self, config-page( + header: none, + footer: none, + margin: 0pt, + )) + + touying-slide(self: self, body, ..args) +}) + +// ----------------------------------------------------------------------------- +// Main Function +// ----------------------------------------------------------------------------- + +#let definitely-not-isec-theme( + aspect-ratio: "16-9", + header: utils.display-current-heading(level: 1), + font: "Open Sans", + institute: [isec.tugraz.at], + logo: tugraz-logo, + slide-alignment: top, + progress-bar: true, + ..args, + body, +) = { + // Touying configuration + show: touying-slides.with( + config-page( + paper: "presentation-" + aspect-ratio, + margin: ( + left: 1.49cm, + right: 1.48cm, + top: 2.6cm, + bottom: 1.6cm, + ) + ), + config-store( + header: header, + font: font, + institute: institute, + logo: logo, + default-alignment: slide-alignment, + progress-bar: progress-bar, + ), + config-common( + slide-fn: slide, + new-section-slide-fn: none, + preamble: { + codly( + display-name: false, + display-icon: false, + radius: 0pt, + stroke: 1pt + black, + smart-indent: true, + fill: luma(260), + zebra-fill: luma(250), + number-format: number => [#text(size: 12pt, fill: gray)[#number]], + number-align: right + horizon, + breakable: true, + ) + } + ), + config-colors(primary: tugcolors.tug, footer: rgb("808080")), + config-methods( + cover: (self: none, body) => hide(body), + init: ( + self: none, + body, + ) => { + // TUGraz uses Source Sans Pro, but its a licensed Adobe font + set text(size: 20pt, lang: "en", region: "US", font: font) + show emph: it => { text(self.colors.primary, it.body) } + show strong: it => { text(weight: "bold", it.body) } + + // Bibliography + set bibliography(title: none, style: "ieee") + set cite(style: "alphanumeric") + show bibliography: set par(spacing: 0.4cm) + show bibliography: set grid(align: top + left) + show bibliography: set text(17pt) + show bibliography: t => { + show grid.cell.where(x: 0): set text(fill: self.colors.primary) + show grid.cell.where(x: 0): set align(top + left) + show link: set text(fill: gray) + t + } + + // Lists & Enums + set list( + marker: ( + (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: self.colors.primary))), + (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: black))), + (move(dy: 0.11cm, square(width: 0.4em, height: 0.4em, fill: gray))), + ), + body-indent: 1.2em, + ) + set enum( + numbering: n => { + square(stroke: none, fill: self.colors.primary, size: 0.53cm)[ + #align(center + horizon)[ #text(size: 12pt, fill: white)[#n] ] + ] + }, + body-indent: 0.6cm + ) + + + // Code blocks + show: codly-init.with() + show raw.where(block: true): set text(size: 13pt) + + + // Hotfixes, the messy part + + // https://github.com/touying-typ/touying/issues/136 + set par(spacing: 0.65em) + + body + }), + ..args, + ) + + body +} //vim:tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab colorcolumn=81 diff --git a/1.0.0/src/logos.typ b/1.0.0/src/logos.typ new file mode 100644 index 0000000..308e751 --- /dev/null +++ b/1.0.0/src/logos.typ @@ -0,0 +1,40 @@ +#let institute-logo(self) = [ + #block[ + #text(size: 13.5pt, weight: "medium")[#self.store.institute] + #h(0.1cm) + #box(inset: 0pt, outset: 0pt)[#square( + width: 0.3cm, + height: 0.3cm, + outset: 0pt, + inset: 0pt, + stroke: none, + fill: self.colors.primary, + )] + ] +] + +#let tugraz-logo = [ + #set align(right) + #set text(size: 12pt, tracking: 3.6pt) + + #image("assets/tuglogo.svg", width: 4.1cm) + + #v(0.13cm) + + #move(dx: -0.07cm)[ + SCIENCE + ] + + #v(0.65em) + + #move(dx: -0.03cm)[ + PASSION + ] + + #v(0.65em) + + #move(dx: -0.06cm)[ + TECHNOLOGY + ] +] + diff --git a/1.0.0/src/macros.typ b/1.0.0/src/macros.typ new file mode 100644 index 0000000..0113435 --- /dev/null +++ b/1.0.0/src/macros.typ @@ -0,0 +1,81 @@ +#import "tugcolors.typ" + +#let quote-block( + top-pad: 0.65cm, + color: tugcolors.tug, + spacing: 0.3cm, + body, +) = context [ + + // Grid with the design + #let g(s: 0cm, body) = [ + #grid( + columns: (0.195cm, auto), + column-gutter: 0.7cm, + row-gutter: 0cm, + [ + #rect( + fill: tugcolors.tug, + height: s + top-pad, + ) + ], + align(horizon, body), + ) + ] + + // We compute its "auto" heigth and then print it with the correct height + #layout(size => { + let (height,) = measure(width: size.width, g(body)) + g(s: height, body) + }) + + #v(spacing) +] + +#import "@preview/showybox:2.0.4": showybox +#import "@preview/tableau-icons:0.331.0": * +#let color-block(title, icon: none, + spacing: 0.78em, color: tugcolors.tug, color-body: tugcolors.lite, body) = [ + + #show emph: it => { + text(weight: "medium", fill: self.colors.primary, it.body) + } + + #showybox( + title-style: ( + color: white, + sep-thickness: 0pt, + ), + frame: ( + //inset: 0.4em, + radius: 0pt, + thickness: 0pt, + border-color: color, + title-color: color, + body-color: color-body, + inset: (x: 0.55em, y: 0.65em), + ), + above: spacing, + below: spacing, + title: if icon == none { + align(horizon)[#strong(title)] + } else { + align(horizon)[ + #draw-icon(icon, height: 1.2em, baseline: 20%, fill: white) #h(0.2cm) #strong[#title] + ] + }, + body, + ) +] + +// https://tabler.io/icons + +#let icon-block(title, icon, body) = [ + #color-block([#v(-0.2cm) #draw-icon(icon, height: 1.2em, baseline: 20%, fill: white) #h(0.2cm) #strong[#title] #v(-0.25cm)])[ + #body + ] +] + + + +//vim:tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab colorcolumn=81 diff --git a/1.0.0/src/pages/outline.typ b/1.0.0/src/pages/outline.typ deleted file mode 100644 index 1170f69..0000000 --- a/1.0.0/src/pages/outline.typ +++ /dev/null @@ -1,15 +0,0 @@ -#import "@preview/polylux:0.4.0": * -#import "../colors.typ" - -#let outline-slide() = [ - - #slide[ - = Outline - #let outline = toolbox.all-sections((sections, _current) => { - enum(..sections) - }) - #outline.fields() - #type(outline) - ] - -] diff --git a/1.0.0/src/pages/title.typ b/1.0.0/src/pages/title.typ deleted file mode 100644 index 460e4e3..0000000 --- a/1.0.0/src/pages/title.typ +++ /dev/null @@ -1,101 +0,0 @@ -#import "@preview/polylux:0.4.0": * -#import "../colors.typ" - -#let title-slide(title, subtitle, authors, extra) = [ - - - - #let footer-isec = [ - #set text(size: 13.3pt, weight: "medium") - - #let arrow-icon = [ - #move(dy: -0.05cm, dx: -0.05cm, - rotate(45deg, - square(fill: none, size: 0.18cm, stroke: ( - "top": colors.tug + 1.35pt, - "bottom": none, - "right": colors.tug + 1.35pt, - "left": none, - )) - ) - ) - ] - - #v(0.4cm) - #box(arrow-icon) #h(0.1cm) isec.tugraz.at - ] - - #set page(footer: footer-isec, header: none) - #set block(below: 0pt, above: 0pt) - - #slide[ - - #place(top + right, dy: -1.9cm, dx: 0.78cm, - [ - #set align(right) - #set text(size: 12pt, tracking: 3.6pt) - - #image("../assets/tuglogo.svg", width: 4.1cm) - - #v(0.13cm) - - #move(dx: -0.07cm)[ - SCIENCE - ] - - #v(0.65em) - - #move(dx: -0.03cm)[ - PASSION - ] - - #v(0.65em) - - #move(dx: -0.06cm)[ - TECHNOLOGY - ] - - ] - ) - - - #v(0.8cm) - - #block(width: 70%)[ - #let title = text(size: 40.5pt, weight: "bold")[#title] - - #move(dx: 0.04em)[ - #grid(columns: (0.195cm, auto), column-gutter: 0.7cm, - context [ - #let s = measure(title) - #move(dy: -0.4cm, rect(fill: colors.tug, height: s.height + 0.65cm)) - ], - title - ) - ] - ] - - #v(0.6cm) - - #block(width: 70%)[ - #text(size: 28.3pt, fill: colors.tug, weight: "bold")[#subtitle] - ] - - #v(1.48cm) - - #block(width: 70%)[ - #set text(size: 19pt) - #for author in authors [ - #author #h(1.1em) - ] - ] - - #v(0.95cm) - - #block(width: 70%)[ - #extra - ] - - ] - -] diff --git a/1.0.0/src/colors.typ b/1.0.0/src/tugcolors.typ similarity index 100% rename from 1.0.0/src/colors.typ rename to 1.0.0/src/tugcolors.typ diff --git a/1.0.0/template/bibliography.bib b/1.0.0/template/bibliography.bib index d737851..78d22e8 100644 --- a/1.0.0/template/bibliography.bib +++ b/1.0.0/template/bibliography.bib @@ -9,5 +9,5 @@ month = {3}, title = {{ISEC Slides Typst Template}}, url = {https://github.com/ecomaikgolf/typst-isec-master-thesis-template}, - urldate = {2025-03-01} -} // Update urldate! + urldate = {2025-08-31} +} diff --git a/1.0.0/template/slides.typ b/1.0.0/template/slides.typ index 9c0b70e..b0208aa 100644 --- a/1.0.0/template/slides.typ +++ b/1.0.0/template/slides.typ @@ -1,116 +1,106 @@ -#import "@local/definitely-not-isec-slides:1.0.0": * +#import "../src/lib.typ": * +//#import "@local/definitely-not-isec-slides:1.0.0": * -// ---------------------------------------------------------------------------- -// Configuration -// ---------------------------------------------------------------------------- -#show: slides.with( - title: [ Long Paper Title #linebreak() with One to Three Lines], - subtitle: [ An optional short subtitle ], - authors: ( [*First Author*], [Second Author], [Third Author], ), - date: [ 29th Jan 2025 ], - footer: [ First Author ], - extra: [ SomeConf 2025 ], - progress: true, +#show: definitely-not-isec-theme.with( + aspect-ratio: "16-9", + slide-alignment: top, + config-info( + title: [Long Paper Title \ with One to Three Lines], + subtitle: [An optional short subtitle], + authors: ([*First Author*], [Second Author], [Third Author]), + extra: [SomeConf 2025], + footer: [First Author, Second Author, Third Author], + download-qr: "", + ), + config-common( + handout: false, + ), ) -= List +// -------------------------------[[ CUT HERE ]]-------------------------------- +// +// === Available slides === +// +// #title-slide() +// #standout-slide() +// #section-slide() +// #blank-slide() +// #bibliography-slide() +// #slide() +// +// === Available macros === +// #intro-block[] +// #color-block[] +// #icon-block[] +// +// === Integration with pdfpc === +// +// Use #note("...") to add pdfpc presenter annotations on a specific slide +// Before presenting, export all notes to a pdfpc file: +// $ typst query slides.typ --field value --one "" > slides.pdfpc -- First point... -- Second point... - - Subpoint... - - Subpoint... -- Third point... +// -------------------------------[[ CUT HERE ]]-------------------------------- + +#title-slide() -= List and Figure - -#grid(columns: (1fr, 1fr), - [ - 1. First point... - 2. Second point... - 3. Third point... - ], - [ - #rect(width: 95%, height: 60%) +#slide(title: [First Slide])[ + #quote-block[ + Important or introductory phrase for the current slide topic. ] + + Continuatory explanation @emg25template over the introductory phrase, leading to: + + #v(0.2cm) + #grid( + columns: 2, + column-gutter: 0.6cm, + color-block([Result A])[ + - Benefit + - Benefit + - Downside + ], + color-block([Result B])[ + - Benefit + - Downside + - Downside + ], + ) + #v(0.2cm) + + #lorem(10) + + #v(0.2cm) + ```c + int main() { + void *p = malloc(0x10); + } + ``` +] + +#slide(title: [First Slide])[ + #quote-block[ + #lorem(20) + ] + +] + +#section-slide( + title: [Section A], + subtitle: [Longer Subtitle] ) -#standout-slide[Standout slide] - -#section-slide([Section Header], [Optional subtitle or figure]) - -= Blocks - -#tblock([Color], color: colors.tugblue)[ - Highlighted content: _Emphasis_, a + _b_ = c, _n-dimensional_ +#slide(title: [Second Slide])[ + #rect(fill: gray.lighten(70%), width: 100%, height: 100%)[ + #align(center + horizon)[ + Usable Area + ] + ] ] -#tblock([Alert Block])[ - Important content: _Alert_, a + _b_ = c += This is a test + +test + +#slide(title: [Bibliography], alignment: top)[ + #bibliography("bibliography.bib") ] - -#tblock([Example Block], color: colors.tuggreen)[ - Example content -] - -#block[ - #set align(horizon) - - #highlight[Highlight (main)] - #highlight(color: colors.tugblue)[Highlight (empth)] - Normal text - #comment[Minor comment] -] - -= Color Palette - -#v(-1.5cm) -#colors.showcase - -= Lists with FontAwesome - - -Checklist: - -- [x] Item 1 -- [x] Item 2 -- [ ] Item 3 - -Advantages and Disadvantages: - -- [+] Advantage -- [-] Disadvantage -- [>] Conclusion - -- this is a test - -= Color Scheme for PGFplots: Lines - -= Color Scheme for PGFplots: Fill - -= Code Listings - -Powered by codly: - -```cpp -int main() { - std::vector test(50); -} -``` - -```sh -#!/bin/bash - -exit 0 -``` - -= Usable Area - -#rect(width: 100%, height: 100%, fill: colors.tugmid) - -= Acknowledgements - -This is a test@emg25template - -#bibliography("bibliography.bib") - - diff --git a/1.0.0/thumbnail.png b/1.0.0/thumbnail.png index c865493..24d0b41 100644 Binary files a/1.0.0/thumbnail.png and b/1.0.0/thumbnail.png differ