### Touying Quick Start Example Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.3.3/README.md A basic example demonstrating how to import and set up the Touying package for creating slides. It includes theme registration and slide method initialization. ```typst #import "@preview/touying:0.3.3": * #let s = themes.simple.register(aspect-ratio: "16-9") #let (init, slides) = utils.methods(s) #show: init #let (slide, empty-slide) = utils.slides(s) #show: slides = Title == First Slide Hello, Touying! #pause Hello, Typst! ``` -------------------------------- ### Initial Gridlock Setup Example Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/gridlock/0.1.0/README.md An example demonstrating the initial setup of the gridlock package, including importing and applying basic parameters like paper size, margins, font size, and line height. ```typ #import "@preview/gridlock:0.1.0": * #show: gridlock.with() #lock[= This is a heading] #lorem(30) #figure( placement: auto, caption: [a caption], rect() ) #lorem(30) ``` -------------------------------- ### Quickstart Songbook Setup Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/songb/0.1.0/README.md Set up your main Typst document to import and use the songb package for creating song indexes and including songs. ```typst #set page(paper: "a6",margin: (inside: 14mm, outside: 6mm, y: 10mm)) #import "@preview/songb:0.1.0": autobreak, index-by-letter // helper function, to include you own songs (feel free to customize) #let song(path) = { // WARNING: autobreak is currently broken (does not converge) // see https://github.com/typst/typst/discussions/4530 autobreak(include path) v(-1.19em) } // indexes (put them wherever you want, or comment them out) = Song Index #index-by-letter() = Singer Index #index-by-letter() #pagebreak() // include all you songs, in the right order #song("./songs/first_song.typ") #song("./songs/other_song.typ") // ... ``` -------------------------------- ### Global Lovelace Setup with Custom Supplements and Indentation Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/lovelace/0.2.0/README.md This example shows how to globally configure Lovelace settings using `setup-lovelace.with`. It customizes line number supplements to German ('Zeile') and applies a consistent thin indentation guide to pseudocode. This is useful for maintaining a consistent style across multiple pseudocode blocks. ```typ #show: setup-lovelace.with(line-number-supplement: "Zeile") #let pseudocode = pseudocode.with(indentation-guide-stroke: .5pt) #let algorithm = algorithm.with(supplement: "Algorithmus") #algorithm( caption: [Spurwechsel nach links auf der Autobahn], pseudocode( , [Links blinken], [In den linken Außenspiegel schauen], [Schulterblick], [*wenn* niemand nähert sich auf der linken Spur, *dann*], ind, [Spur wechseln], ded, [Blinker aus], ) ) Der Schritt in @line:blinken stellt offenbar für viele Verkehrsteilnehmer eine Herausforderung dar. ``` -------------------------------- ### Global Lovelace Setup Configuration Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/lovelace/0.1.0/README.md Configure global settings for Lovelace using `setup-lovelace` to avoid repeating configurations. This example sets German supplements for line numbers and a default indentation guide stroke. ```typ #show: setup-lovelace.with(line-number-supplement: "Zeile") #let pseudocode = pseudocode.with(indentation-guide-stroke: .5pt) #let algorithm = algorithm.with(supplement: "Algorithmus") #algorithm( caption: [Spurwechsel nach links auf der Autobahn], pseudocode( , [Links blinken], [In den linken Außenspiegel schauen], [*wenn* niemand nähert sich auf der linken Spur, *dann*], ind, [Spur wechseln], ded, [Blinker aus], ) ) Der Schritt in @line:blinken stellt offenbar für viele Verkehrsteilnehmer eine Herausforderung dar. ``` -------------------------------- ### Quick Start: Including and Initializing Touying Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.3.0/README.md Shows the basic setup required to use the Touying package in a Typst document. This includes importing the package and registering a theme. ```typst #import "@preview/touying:0.3.0": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) #show: init #let (slide,) = utils.slides(s) #show: slides = Title == First Slide Hello, Touying! #pause Hello, Typst! ``` -------------------------------- ### Quick Start with Touying Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.2.0/README.md Basic setup for using the Touying package in a Typst document. Includes importing the package and initializing the presentation. ```typst #import "@preview/touying:0.2.0": * #let (init, slide, slides) = utils.methods(s) #show: init #show: slides = Title == First Slide Hello, Touying! #pause Hello, Typst! ``` -------------------------------- ### Quick Start: Including and Initializing Touying Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.3.1/README.md Shows the basic setup required to use the Touying package in a Typst document. This includes importing the package and registering its themes and methods. ```typst #import "@preview/touying:0.3.1": * #let s = themes.simple.register(s) #let (init, slides) = utils.methods(s) #show: init #let (slide,) = utils.slides(s) #show: slides = Title == First Slide Hello, Touying! #pause Hello, Typst! ``` -------------------------------- ### Quick Start with Touying Package Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.3.2/README.md Provides a basic setup for using the Touying package in a Typst document. It includes importing the package, registering a theme, and defining slides. ```typst #import "@preview/touying:0.3.2": * #let s = themes.simple.register(aspect-ratio: "16-9") #let (init, slides) = utils.methods(s) #show: init #let (slide,) = utils.slides(s) #show: slides = Title == First Slide Hello, Touying! #pause Hello, Typst! ``` -------------------------------- ### Basic Table Setup with Built-in Typst Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/pillar/0.1.0/README.md This example shows how to set up a table with 5 columns using only built-in Typst methods, including alignment and vertical lines. It requires manual specification of alignment for each column. ```typst #table( columns: 5, align: (center,) * 4 + (right,), stroke: none, [Piano Key], table.vline(), [MIDI Number], [Note Name], [Pitch Name], table.vline(), [$f$ in Hz], .. ) ``` -------------------------------- ### Touying Theorem Environment Setup Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying-aqua/0.4.0/README.md Configures theorem environments like theorem, corollary, definition, example, and proof using ctheorems. Includes custom styling for theorem boxes and plain theorems. ```typst // Theroems configuration by ctheorems #show: thmrules.with(qed-symbol: $square$) #let theorem = thmbox("theorem", "Theorem", fill: rgb("#eeffee")) #let corollary = thmplain( "corollary", "Corollary", base: "theorem", titlefmt: strong ) #let definition = thmbox("definition", "Definition", inset: (x: 1.2em, top: 1em)) #let example = thmplain("example", "Example").with(numbering: none) #let proof = thmproof("proof", "Proof") ``` -------------------------------- ### Slides Setup Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/grape-suite/0.1.0/README.md Configure and generate slides using the `slides` module. This example shows how to set the slide number, series title, main title, author, and email. ```typ #import "@preview/grape-suite:0.1.0": slides #import slides: * #show: slides.with( no: 1, series: [Logik-Tutorium], title: [Organisatorisches und Einführung in die Logik], author: "Tristan Pieper", email: link("mailto:tristan.pieper@uni-rostock.de"), ) ``` -------------------------------- ### Theorem and Definition Example Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying-aqua/0.4.1/README.md Demonstrates defining and using theorem environments like 'Definition' and 'Example' with custom formatting. ```typst = Theroems == Prime numbers #definition[ A natural number is called a #highlight[_prime number_] if it is greater than 1 and cannot be written as the product of two smaller natural numbers. ] #example[ The numbers $2$, $3$, and $17$ are prime. @cor_largest_prime shows that this list is not exhaustive! ] ``` -------------------------------- ### Minimal Example Usage Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/iconic-salmon-svg/1.1.0/README.md A basic example demonstrating how to import specific functions like github-info and gitlab-info and use them to link to profiles. ```typst // #import "@preview/iconic-salmon-svg:1.0.0": github-info, gitlab-info #import "iconic-salmon-svg.typ": github-info, gitlab-info This project was created by #github-info("Bi0T1N"). You can also find me on #gitlab-info("GitLab", rgb("#811052"), url: "https://gitlab.com/Bi0T1N"). ``` -------------------------------- ### Manual Template Installation Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/athena-tu-darmstadt-thesis/0.1.0/README.md Steps for manually installing the template into a new writing project by cloning the repository. ```bash mkdir my_thesis && cd my_thesis mkdir templates && cd templates git clone https://github.com/JeyRunner/tuda-typst-templates templates/ ``` -------------------------------- ### Simplified Table Setup with Pillar.table() Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/pillar/0.1.0/README.md This example shows how to use the pillar.table() wrapper function for simplified column specification. It directly accepts a column specification string as the first argument. ```typst #pillar.table( cols: "c|ccc|r", [Piano Key], [MIDI Number], [Note Name], [Pitch Name], [$f$ in Hz], .. ) ``` -------------------------------- ### Using the Example Admonition Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/gentle-clues/0.2.0/README.md Demonstrates the usage of the predefined 'example' admonition, both with default settings and with a custom header inset. ```typst #example[Testing] #example(header-inset: 0.8em)[Testing] ``` -------------------------------- ### Basic Usage of Anti-Matter Package Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/anti-matter/0.0.1/README.md This example demonstrates the fundamental setup and usage of the anti-matter package. It includes importing necessary components, setting page properties, and applying the anti-matter show rule to manage page numbering across front, main, and back matter sections. ```typst #import "@preview/anti-matter:0.0.1": anti-matter, anti-front-end, anti-back-start #set page("a4", height: auto) #show heading.where(level: 1): it => pagebreak(weak: true) + it // add a title page and reset the counter #[ #set page(numbering: none) #counter(page).update(0) ] #show: anti-matter #include "front-matter.typ" #anti-front-end #include "chapters.typ" #anti-back-start #include "back-matter.typ" ``` -------------------------------- ### Touying Theorem Usage Example Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.4.1/README.md Shows how to use the defined theorem environments for 'definition', 'example', 'theorem', and 'proof' to structure mathematical content. ```typst #definition[ A natural number is called a #highlight[_prime number_] if it is greater than 1 and cannot be written as the product of two smaller natural numbers. ] #example[ The numbers $2$, $3$, and $17$ are prime. @cor_largest_prime shows that this list is not exhaustive! ] #theorem("Euclid")[ There are infinitely many primes. ] #proof[ Suppose to the contrary that $p_1, p_2, dots, p_n$ is a finite enumeration of all primes. Set $P = p_1 p_2 dots p_n$. Since $P + 1$ is not in our list, it cannot be prime. Thus, some prime factor $p_j$ divides $P + 1$. Since ``` -------------------------------- ### Touying Setup with Themes and Theorems Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.4.1/README.md Demonstrates the setup for Touying presentations, including importing necessary packages, registering themes, configuring global information, setting up pdfpc, and defining theorem environments. ```typst #import "@preview/touying:0.4.1": * #import "@preview/cetz:0.2.2" #import "@preview/fletcher:0.4.4" as fletcher: node, edge #import "@preview/ctheorems:1.1.2": * // cetz and fletcher bindings for touying #let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true)) #let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide) // Register university theme // You can replace it with other themes and it can still work normally #let s = themes.university.register(aspect-ratio: "16-9") // Set the numbering of section and subsection #let s = (s.methods.numbering)(self: s, section: "1.", "1.1") // Set the speaker notes configuration // #let s = (s.methods.show-notes-on-second-screen)(self: s, right) // Global information configuration #let s = (s.methods.info)( self: s, title: [Title], subtitle: [Subtitle], author: [Authors], date: datetime.today(), institution: [Institution], ) // Pdfpc configuration // typst query --root . ./example.typ --field value --one "" > ./example.pdfpc #let s = (s.methods.append-preamble)(self: s, pdfpc.config( duration-minutes: 30, start-time: datetime(hour: 14, minute: 10, second: 0), end-time: datetime(hour: 14, minute: 40, second: 0), last-minutes: 5, note-font-size: 12, disable-markdown: false, default-transition: ( type: "push", duration-seconds: 2, angle: ltr, alignment: "vertical", direction: "inward", ), )) // Theroems configuration by ctheorems #show: thmrules.with(qed-symbol: $square$) #let theorem = thmbox("theorem", "Theorem", fill: rgb("#eeffee")) #let corollary = thmplain( "corollary", "Corollary", base: "theorem", titlefmt: strong ) #let definition = thmbox("definition", "Definition", inset: (x: 1.2em, top: 1em)) #let example = thmplain("example", "Example").with(numbering: none) #let proof = thmproof("proof", "Proof") // Extract methods #let (init, slides, touying-outline, alert, speaker-note) = utils.methods(s) #show: init #show strong: alert // Extract slide functions #let (slide, empty-slide) = utils.slides(s) #show: slides ``` -------------------------------- ### Install TypstJlyfish Package Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/jlyfish/0.1.0/README.md Install the Jlyfish package from the general Julia registry. This is a one-time setup. ```julia-repl julia> ] (@v1.10) pkg> add TypstJlyfish ``` -------------------------------- ### Install Backtrack Manually Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/backtrack/1.0.0/README.md This is an example of how to import the Backtrack library after manual installation. Replace '[path/to/]' with the actual path to your manually installed Backtrack directory. ```typst #import "[path/to/]backtrack/backtrack.typ" ``` -------------------------------- ### Touying Setup and Basic Animations Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying/0.3.3/README.md Demonstrates setting up Touying with themes and using basic animation functions like `#pause` and `#meanwhile` for content display. ```typst #import "@preview/touying:0.3.3": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge // cetz and fletcher bindings for touying #let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true)) #let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr)) // Register university theme // You can remove the theme registration or replace other themes // it can still work normally #let s = themes.university.register(aspect-ratio: "16-9") // Global information configuration #let s = (s.methods.info)( self: s, title: [Title], subtitle: [Subtitle], author: [Authors], date: datetime.today(), institution: [Institution], ) // Extract methods #let (init, slides, touying-outline, alert) = utils.methods(s) #show: init #show strong: alert // Extract slide functions #let (slide, empty-slide) = utils.slides(s) #show: slides = Animation == Simple Animation #slide[ We can use `#pause` to #pause display something later. #pause Just like this. #meanwhile Meanwhile, #pause we can also use `#meanwhile` to #pause display other content synchronously. ] ``` -------------------------------- ### Histogram Example 2 Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/plotst/0.2.0/README.md Shows a second histogram example with different data classification and axis setup. Useful for comparing frequency distributions. ```typst let classes = () classes.push(class(11, 13)) classes.push(class(13, 15)) classes.push(class(1, 6)) classes.push(class(6, 11)) classes.push(class(15, 30)) let data = ((20, 2), (30, 7), (16, 12), (40, 13), (5, 17)) let x_axis = axis(min: 0, max: 31, step: 1, location: "bottom", show_markings: false) let y_axis = axis(min: 0, max: 41, step: 5, location: "left", helper_lines: true) classes = classify(data, classes) let pl = plot(axes: (x_axis, y_axis), data: classes) histogram(pl, (100%, 40%)) ``` -------------------------------- ### Touying Package Setup and Basic Slide Creation Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/touying-aqua/0.3.3/README.md Imports necessary packages and sets up global information and slide methods. Demonstrates basic slide creation using `#slide` and handling of strong text with an alert. ```typst #import "@preview/touying:0.3.3": * #import "@preview/cetz:0.2.1" #import "@preview/fletcher:0.4.2" as fletcher: node, edge // cetz and fletcher bindings for touying #let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true)) #let fletcher-diagram = touying-reducer.with(reduce: (arr, ..args) => fletcher.diagram(..args, ..arr)) // Register university theme // You can remove the theme registration or replace other themes // it can still work normally #let s = themes.university.register(aspect-ratio: "16-9") // Global information configuration #let s = (s.methods.info)( self: s, title: [Title], subtitle: [Subtitle], author: [Authors], date: datetime.today(), institution: [Institution], ) // Extract methods #let (init, slides, touying-outline, alert) = utils.methods(s) #show: init #show strong: alert // Extract slide functions #let (slide, empty-slide) = utils.slides(s) #show: slides ``` -------------------------------- ### Customizing Pseudocode Appearance Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/lovelace/0.1.0/README.md Use keyword arguments with the `pseudocode` function to modify line numbering and indentation guides. This example shows thin blue indentation guides and roman numeral line numbering. ```typ #pseudocode( line-number-transform: num => numbering("i", num), indentation-guide-stroke: .5pt + aqua, no-number, [*input:* integers $a$ and $b$], no-number, [*output:* greatest common divisor of $a$ and $b$], [*while* $a != b$ *do*], ind, [*if* $a > b$ *then*], ind, $a <- a - b$, ded, [*else*], ind, $b <- b - a$, ded, [*end*], ded, [*end*], [*return* $a$] ) ``` -------------------------------- ### Basic Document Setup with a General Template Source: https://github.com/julian702/typst-packages/blob/main/packages/preview/ucpc-solutions/0.1.0/docs/README.md This snippet shows the standard way to set up a document using a general template, including importing and applying its styling. ```typst #import "": * #show: