diff --git a/1.0.0/README.md b/1.0.0/README.md deleted file mode 100644 index 0aaca7b..0000000 --- a/1.0.0/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# Typst ISEC Slides Template - -> An opinionated version of the ISEC slides template made in Typst. Easily configurable for other institutes or organizations. - -Author: Ernesto Martínez García <[ecomaikgolf.com](https://ecomaikgolf.com)> - -Tested typst version: `0.13.1`. - -> [!NOTE] -> If you are an ISEC or TUGraz employee and think that `isec-slides` or -> `tugraz-slieds` fits more, I would need an approval to allocate the name :) - -## Contributing - -Contribute to the template in the [upstream repository](https://github.com/ecomaikgolf/typst-isec-slides-template) - -Check for [open issues](https://github.com/ecomaikgolf/typst-isec-slides-template/issues) - -## Design ---- -title - ---- -list - ---- -listimage - ---- -standout - ---- -colors - ---- -features - ---- -code - ---- -blocks - ---- -plots - ---- -configurable - ---- -blank - ---- -bibliography - - - -## License `src/assets/tuglogo.svg` - -According to Wikipedia: - -> This logo image consists only of simple geometric shapes or text. It does not -> meet the threshold of originality needed for copyright protection, and is -> therefore in the public domain. [...] - -https://en.m.wikipedia.org/wiki/File:TU_Graz.svg diff --git a/1.0.0/src/assets/tuglogo.svg b/1.0.0/src/assets/tuglogo.svg deleted file mode 100644 index e5d11af..0000000 --- a/1.0.0/src/assets/tuglogo.svg +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - diff --git a/1.0.0/src/lib.typ b/1.0.0/src/lib.typ deleted file mode 100644 index c996a54..0000000 --- a/1.0.0/src/lib.typ +++ /dev/null @@ -1,714 +0,0 @@ -#import "@preview/touying:0.6.1": * - -// Project -#import "helper.typ": * -#import "logos.typ": * - -// Core Imports -#import "@preview/codly:1.3.0": * // For bindings -#import "@preview/cetz:0.4.1" // For bindings -#import "@preview/fletcher:0.5.8" as fletcher: edge, node // For bindings -#import "@preview/tiaoma:0.3.0" // For auto QR generation - -// Styling Macro Imports -#import "@preview/showybox:2.0.4": showybox - -// ----------------------------------------------------------------------------- -// General Config -// ----------------------------------------------------------------------------- - -// 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, -) - -// ----------------------------------------------------------------------------- -// Slide Types -// ----------------------------------------------------------------------------- - -/// Normal slide for the presentation, with title (header) and footer -/// -/// Example: -/// -/// ```typst -/// #slide(title: [Slide Title])[ -/// #lorem(20) -/// ] -/// ``` -/// -/// - title (content): Title for the slide -/// - alignment (alignment): Alignment of the contents of the slide -/// - outlined (boolean): If the slide shows on the PDF ToC -/// -/// -> content -#let slide( - title: auto, - alignment: none, - outlined: true, - ..args, -) = touying-slide-wrapper(self => { - let info = self.info + args.named() - - // 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 } - - show heading: set text(size: 24pt, weight: "semibold") - - 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(), - ) - } - - // Footer: - // --------------------------------------------------------------------------- - // Slide Number [ ] First Author - // --------------------------------------------------------------------------- - let footer(self) = context { - set block(height: 100%, width: 100%) - set text(size: 15pt, fill: self.colors.footer) - - 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(), - ) - - // 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 self = utils.merge-dicts(self, config-page( - header: header, - footer: footer, - )) - - set align( - if alignment == none { - self.store.default-alignment - } else { - alignment - } - ) - - touying-slide(self: self, ..args) -}) - -/// Title slide for the presentation -/// -/// Example: -/// -/// ```typst -/// #title-slide() -/// ``` -/// -/// -> content -#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 for the presentation -/// -/// Example: -/// -/// ```typst -/// #standout-slide(title: [Text]) -/// ``` -/// -/// - title (content): Title for the standout slide -/// -/// -> content -#let standout-slide( - title: none, - ..args, -) = touying-slide-wrapper(self => { - let body = { - set align(center + horizon) - set text(size: 28pt) - if title != none { - 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 for the presentation -/// -/// Example: -/// -/// ```typst -/// #section-slide(title: [Section A], subtitle: [Subtitle]) -/// ``` -/// -/// - title (content): Title for the section -/// - subtitle (content): Subtitle for the section -/// -/// -> content -#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 for free content in the presentation -/// -/// Example: -/// -/// ```typst -/// #blank-slide[ -/// #align(center + horizon)[#lorem(5)] -/// ] -/// ``` -/// -/// -> content -#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 -// ----------------------------------------------------------------------------- - -/// Theme cofniguration -/// -/// Example: -/// -/// ```typst -/// #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, -/// ), -/// config-colors( -/// ), -/// ) -/// ``` -/// -/// - aspect-ratio (str): Aspect ratio for the page. See typst documentatin. -/// - slide-alignemnt (alignment): Default alignment for `#slide()` -/// - config-info (dict): -/// - title (content): Title for the presentation -/// - subtitle (content): Subtitle for the presentation -/// - authors (array): Arrray of authors (content) -/// - extra (content): Extra information for the presentation -/// - footer (content): Footer for each `#slide()` -/// - download-qr (str): URL to show on `#title-slide()` with a QR -/// - config-common (dict): -/// - handout (bool): Boolean for handout mode -/// - config-colors (dict): Colors for the presentation -/// - ... see definition of `#definitely-not-isec-theme` -#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( // Exported from official template - tug: rgb("e4154b"), - primary: rgb("e4154b"), - footer: rgb("808080"), - isec: rgb("272733"), - foot: rgb("e1e1e1"), - web: rgb("0c5a77"), - csbme: rgb("19b4e3"), - arch: rgb("0a98a2"), - bauw: rgb("d68e23"), - etec: rgb("68242c"), - mach: rgb("3066ba"), - chem: rgb("5e60a8"), - math: rgb("1e6934"), - crypto: rgb("a6c947"), - system: rgb("1171a8"), - formal: rgb("f7931e"), - applied: rgb("7d219e"), - page: rgb("e4154b"), - fore: rgb("0f0f0f"), - back: rgb("ffffff"), - dark: rgb("3b5a70"), - lite: rgb("eeece1"), - head: rgb("245b78"), - body: rgb("e2e9ed"), - urlA: rgb("0066d8"), - urlB: rgb("6c2f91"), - colA: rgb("e4154b"), - colB: rgb("5191c1"), - colC: rgb("a5a5a5"), - colD: rgb("285f82"), - colE: rgb("78b473"), - colF: rgb("e59352"), - tugred: rgb("e4154b"), - tuggreen: rgb("78b473"), - tugblue: rgb("285f82"), - tugyellow: rgb("e59352"), - tugcyan: rgb("19b4e3"), - tugpurple: rgb("7d219e"), - tugviolet: rgb("5e60a8"), - tugmagenta: rgb("7d219e"), - tugturquoise: rgb("0a98a2"), - tugbrown: rgb("68242c"), - tugblack: rgb("0f0f0f"), - tugwhite: rgb("ffffff"), - tuggray: rgb("a5a5a5"), - tuggrey: rgb("a5a5a5"), - tugdark: rgb("3b5a70"), - tugmid: rgb("5191c1"), - tuglite: rgb("eeece1"), - main: rgb("e4154b"), - emph: rgb("285f82"), - standout: rgb("245b78"), - ), - 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 cite: it => { text(self.colors.primary, it) } - 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 -} - -// ----------------------------------------------------------------------------- -// Macros -// ----------------------------------------------------------------------------- - -/// Macro for a pdfpc note -/// -/// Example: -/// -/// ```typst -/// #note("This will show on pdfpc speaker notes") -/// ``` -/// -/// - text (str): Note for pdfpc -/// -/// -> content -#let note(text) = [ - #pdfpc.speaker-note(text) -] - -/// Quote block for phrases. Has a color.primary rectangle in the left -/// -/// Example: -/// -/// ```typst -/// #quote-block[ -/// #lorem(10) -/// ] -/// ``` -/// -/// - top-pad (length): Extra height of the quote colored block -/// - color (color): Color of the quote block -/// - spacing (length): Spacing after the `#quote-block` -/// -/// -> content -#let quote-block( - top-pad: 0.55cm, - color: none, - spacing: 0.3cm, - body, -) = [ - #touying-fn-wrapper((self: none) => [ - // Grid with the design - #let g(s: 0cm, body) = [ - #grid( - columns: (0.195cm, auto), - column-gutter: 0.7cm, - row-gutter: 0cm, - [ - #rect( - fill: if color == none { self.colors.primary } else { color }, - 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) - ]) -] - -/// Block with title and content -/// -/// Example: -/// -/// ```typst -/// #color-block(title: [Advantages])[ -/// - A -/// - B -/// - C -/// ] -/// ``` -/// -/// - title (content): Title for the color block -/// - icon (str): Icon to show at the left of the title (Tableau Icons) https://tabler.io/icons -/// - spacing (length): Spacing before and after the color block -/// - color (color): Color for the title block -/// - color-body (color): Color for the background of the body -/// -/// -> content -#let color-block( - title: [], - icon: none, - spacing: 0.78em, - color: none, - color-body: none, - body -) = [ - #import "@preview/tableau-icons:0.331.0": * - #touying-fn-wrapper((self: none) => [ - #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: if color == none { self.colors.primary } else { color }, - title-color: if color == none { self.colors.primary } else { color }, - body-color: if color-body == none { self.colors.lite } else { 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, - ) - ]) -] - -/// Showcase the colors of the slide -/// -/// Example: -/// -/// ```typst -/// #showcase-colors -/// ``` -/// -/// -> content -#let showcase-colors = [ - #touying-fn-wrapper((self: none) => [ - #set rect(width: 7.4cm, height: 1.5cm) - #set text(fill: white) - #set align(center) - #grid(columns: 3, rows: 6, column-gutter: 1.8cm, row-gutter: 0.05cm, align: left, - rect(fill: self.colors.isec)[isec], - rect(fill: self.colors.tug)[tug = main], - rect(fill: self.colors.colA)[colA = tugred], - rect(fill: self.colors.csbme)[csbme = tugcyan], - rect(fill: self.colors.fore)[fore], - rect(fill: self.colors.colB)[colB = tugmid], - rect(fill: self.colors.crypto)[crypto], - rect(fill: self.colors.back)[#text(fill: black)[back]], - rect(fill: self.colors.colC)[colC = tuggray], - rect(fill: self.colors.system)[system], - rect(fill: self.colors.foot)[#text(fill: black)[foot]], - rect(fill: self.colors.colD)[colD = tugblue], - rect(fill: self.colors.formal)[formal], - rect(fill: self.colors.emph)[emph], - rect(fill: self.colors.colE)[colE = tuggreen], - rect(fill: self.colors.applied)[applied = tugpurple], - rect(fill: self.colors.lite)[#text(fill: black)[lite]], - rect(fill: self.colors.colF)[colF = tugyellow], - ) - ]) -] - -//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 deleted file mode 100644 index 308e751..0000000 --- a/1.0.0/src/logos.typ +++ /dev/null @@ -1,40 +0,0 @@ -#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/template/bibliography.bib b/1.0.0/template/bibliography.bib deleted file mode 100644 index 78d22e8..0000000 --- a/1.0.0/template/bibliography.bib +++ /dev/null @@ -1,13 +0,0 @@ -// 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{emg25template, - author = {Ernesto Martínez García}, - year = {2025}, - month = {3}, - title = {{ISEC Slides Typst Template}}, - url = {https://github.com/ecomaikgolf/typst-isec-master-thesis-template}, - urldate = {2025-08-31} -} diff --git a/1.0.0/template/slides.typ b/1.0.0/template/slides.typ deleted file mode 100644 index 3d31feb..0000000 --- a/1.0.0/template/slides.typ +++ /dev/null @@ -1,58 +0,0 @@ -#import "@preview/definitely-not-isec-slides:1.0.0": * - -#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, - ), - config-colors( - ), -) - -// -------------------------------[[ CUT HERE ]]-------------------------------- -// -// === Available slides === -// -// #title-slide() -// #standout-slide(title) -// #section-slide(title,subtitle) -// #blank-slide() -// #slide(title) -// -// === Available macros === -// -// #quote-block(body) -// #color-block(title, body) -// #icon-block(title, icon, body) -// -// === Presenting 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 -// $ pdfpc slides.pdf -// -// -------------------------------[[ CUT HERE ]]-------------------------------- - -#title-slide() - -#slide(title: [First Slide])[ - #quote-block[ - Good luck with your presentation! @emg25template - ] - - #note("This will show on pdfpc speaker notes ;)") -] - -#slide(title: [Bibliography])[ - #bibliography("bibliography.bib") -] diff --git a/1.0.0/thumbnail.png b/1.0.0/thumbnail.png deleted file mode 100644 index 24d0b41..0000000 Binary files a/1.0.0/thumbnail.png and /dev/null differ diff --git a/1.0.0/typst.toml b/1.0.0/typst.toml deleted file mode 100644 index f7aa1b8..0000000 --- a/1.0.0/typst.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "definitely-not-isec-slides" -version = "1.0.0" -entrypoint = "src/lib.typ" -authors = ["Ernesto Martínez "] -license = "MIT" -description = "An unofficial ISEC TUGraz slides template" -repository = "https://github.com/ecomaikgolf/typst-isec-slides-template" -categories = ["presentation"] -disciplines = ["computer-science", "engineering"] -keywords = ["ISEC", "Institute of Information Security", "IAIK", "TUGraz", "Graz University of Technology", "thesis", "template", "Master Thesis"] -compiler = "0.13.1" - -[template] -path = "template" -entrypoint = "slides.typ" -thumbnail = "thumbnail.png" diff --git a/1.0.1/README.md b/1.0.1/README.md deleted file mode 100644 index 44cc414..0000000 --- a/1.0.1/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Typst KFU Slides Template - -Derived from Ernesto Martínez García's [definitely-not-isec-slides](https://typst.app/universe/package/definitely-not-isec-slides) - -Tested typst version: `0.14.0`. diff --git a/1.0.1/src/helper.typ b/1.0.1/src/helper.typ deleted file mode 100644 index 6dd9606..0000000 --- a/1.0.1/src/helper.typ +++ /dev/null @@ -1,59 +0,0 @@ -// -------------------------------------------------------------------------- -// Extra helper functions - -// 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) - v(0pt, weak: true) + par(none) -} - -#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") { - content-to-string(content.body) - } else if content == [ ] { - " " - } -} - -#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 - ] - #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.1/thumbnail.png b/1.0.1/thumbnail.png deleted file mode 100644 index 24d0b41..0000000 Binary files a/1.0.1/thumbnail.png and /dev/null differ diff --git a/README.md b/README.md index 222a71a..d157ced 100644 --- a/README.md +++ b/README.md @@ -2,50 +2,28 @@ Adapted from Ernesto Martínez García's [definitely-not-isec-slides](https://typst.app/universe/package/definitely-not-isec-slides). -Quickstart (CLI): +![thumbnail](thumbnail.png) -```sh -typst init @preview/definitely-not-kfu-slides:1.0.1 slides +## Installation (Linux only) + +#### Using `typship` + +```bash +typship download -n local https://imsc.uni-graz.at/git/gjankowiak/typst-kfu-slides-template ``` -Quickstart (WebIDE): +#### Manually -- [Create Document](https://typst.app/app?template=definitely-not-kfu-slides&version=1.0.1) -- [Homepage](https://typst.app/universe/package/definitely-not-kfu-slides) +```bash +mkdir -p ~/.local/share/typst/packages/local/definitely-not-kfu-slides/ +cd ~/.local/share/typst/packages/local/definitely-not-kfu-slides/ +curl https://imsc.uni-graz.at/git/gjankowiak/typst-kfu-slides-template/archive/v1.0.1.tar.gz | tar zx --xform 's/definitely-not-kfu-slides/1.0.1/' +``` + +## Quickstart (CLI): + +```sh +typst init @local/definitely-not-kfu-slides:1.0.1 slides +``` Tested typst version: `0.14.0`. - -## Typst - -### What's Typst? - -A modern typesetting system which has: - -- Milisecond incremental (memoized) builds¹ -- Subsecond full builds¹ -- Multithreaded builds per pagebreak -- Easy rustc-like compiler error messages (and no intermediates!) -- Transparent multiple compiler passes (no more mklatex/makefiles) -- Simple & powerful scripting and syntax -- WebAssembly plugin support (python/js interpreters in your thesis? Sure) - -Migrating from LaTeX? Check the [migration guide](https://typst.app/docs/guides/guide-for-latex-users/) - -¹: This is obviously not a serious benchmark and depends on the document. But - it's fast trust me - -### Quick usage - -Start incremental compilations with: - -```sh -typst watch slides.typ -``` - -then open the generated PDF: - -```sh -xdg-open slides.typ -``` - -Now edit `slides.typ` and it will be incrementally built in each save. diff --git a/1.0.1/src/assets/unigrazlogo-white-border.svg b/src/assets/unigrazlogo-white-border.svg similarity index 100% rename from 1.0.1/src/assets/unigrazlogo-white-border.svg rename to src/assets/unigrazlogo-white-border.svg diff --git a/1.0.0/src/helper.typ b/src/helper.typ similarity index 100% rename from 1.0.0/src/helper.typ rename to src/helper.typ diff --git a/1.0.1/src/lib.typ b/src/lib.typ similarity index 100% rename from 1.0.1/src/lib.typ rename to src/lib.typ diff --git a/1.0.1/src/logos.typ b/src/logos.typ similarity index 100% rename from 1.0.1/src/logos.typ rename to src/logos.typ diff --git a/1.0.1/template/bibliography.bib b/template/bibliography.bib similarity index 100% rename from 1.0.1/template/bibliography.bib rename to template/bibliography.bib diff --git a/1.0.1/template/slides.typ b/template/slides.typ similarity index 89% rename from 1.0.1/template/slides.typ rename to template/slides.typ index d03c42f..d91ff2e 100644 --- a/1.0.1/template/slides.typ +++ b/template/slides.typ @@ -1,7 +1,7 @@ -#import "@preview/definitely-not-kfu-slides:1.0.1": * +#import "@local/definitely-not-kfu-slides:1.0.1": * #show: definitely-not-kfu-theme.with( - aspect-ratio: "4-3", + aspect-ratio: "16-9", slide-alignment: top, progress-bar: true, institute: [uni-graz.at], @@ -69,7 +69,7 @@ Some _emph_ text, and some *strong* text. ] #slide(title: [Bibliography])[ - #set bibliography(title:"References", style: "alphanumeric") + #set bibliography(title:"References", style: "springer-mathphys") #bibliography("bibliography.bib") ] diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..9a388bd Binary files /dev/null and b/thumbnail.png differ diff --git a/1.0.1/typst.toml b/typst.toml similarity index 85% rename from 1.0.1/typst.toml rename to typst.toml index a4d96ae..a148621 100644 --- a/1.0.1/typst.toml +++ b/typst.toml @@ -5,7 +5,7 @@ entrypoint = "src/lib.typ" authors = ["Ernesto Martínez ", "Gaspard Jankowiak"] license = "MIT" description = "An unofficial UniGraz slides template" -repository = "https://github.com/ecomaikgolf/typst-isec-slides-template" +repository = "https://imsc.uni-graz.at/git/gjankowiak/typst-kfu-slides-template" categories = ["presentation"] disciplines = ["computer-science", "engineering"] keywords = ["University of Graz", "template"]