### Render Function for Package Integration (CeTZ Example) Source: https://context7.com/pacaunt/typst-presentate/llms.txt Illustrates how to use the `render` function to integrate custom animations with external packages, specifically showing an example with the CeTZ package for canvas drawing. ```APIDOC ## Render Function for Package Integration ### Description Create custom animations with external packages by using `render` to access the state variable and animation module functions. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters * `state_updater` (function): A function that takes the animation state `s` and returns a tuple containing the drawn content and the updated state. ### Request Example ```typst #import "@preview/presentate:0.2.2": * #import "@preview/cetz:0.4.2": canvas, draw #slide[ = CeTZ Integration #render(s => ({ import animation: * let (pause,) = settings(hider: draw.hide.with(bounds: true)) canvas({ import draw: * pause(s, circle((0, 0), fill: green)) s.push(auto) // update state pause(s, circle((1, 0), fill: red)) }) }, s) ) ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Basic Slide Creation in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Demonstrates how to create basic slides with automatic animation step management using the `slide` function. It includes examples of simple text reveals and styled slides with titles and dates. Requires the Presentate package. ```typst #import "@preview/presentate:0.2.2": * #set page(paper: "presentation-16-9") #set text(size: 25pt) // Basic slide with pause #slide[ Hello World! #show: pause; This is presentate. ] // Styled slide with title and date #set text(font: "FiraCode Nerd Font Mono") #set align(horizon) #slide[ = Welcome to Presentate! \ A lazy author \ #datetime.today().display() ] ``` -------------------------------- ### Animate Function for Custom Animations (Alchemist Example) Source: https://context7.com/pacaunt/typst-presentate/llms.txt Shows how to use the `animate` function to wrap external package functions, making them animation-aware with custom modifiers. Includes an example with the Alchemist package for molecule drawing. ```APIDOC ## Animate Function for Custom Animations ### Description Wrap external package functions to make them animation-aware using the `animate` function with custom modifiers. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters * `modifier` (function): A function that modifies how the wrapped function behaves with animation state. * `func` (function): The external package function to make animation-aware. ### Request Example ```typst #import "@preview/presentate:0.2.2": * #import "@preview/alchemist:0.1.8" as alc // Hide bonds by setting stroke to none #let modifier(func, ..args) = func(stroke: none, ..args) #let (single,) = animation.animate(modifier: modifier, alc.single) // Hide atoms by setting colors to white #let (fragment,) = animation.animate( modifier: (func, ..args) => func(colors: (white,), ..args), alc.fragment ) #slide[ = Alchemist Molecules #render(s => ({ alc.skeletize({ fragment(s, "H_3C") s.push(auto) single(s, angle: 1) fragment(s, "CH_2") s.push(auto) single(s, angle: -1, from: 0) fragment(s, "CH_2") s.push(auto) single(s, from: 0, angle: 1) fragment(s, "CH_3") }) }, s) ) ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Configure PDFPC Presentation Settings Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `pdfpc.config` function configures presentation timing, display settings, and transitions for pdfpc presenter software. Options include total duration, start time, note font size, and default transition effects. ```typst #import "@preview/presentate:0.2.2": * #pdfpc.config( duration-minutes: 45, start-time: datetime(hour: 14, minute: 30), last-minutes: 5, note-font-size: 12, disable-markdown: false, default-transition: ( type: "replace", duration-seconds: 1, angle: ltr, alignment: "horizontal", direction: "outward" ) ) #slide[ = Presentation Content ] ``` -------------------------------- ### Display Content Sequentially with Fragments Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `fragments` function displays multiple content pieces sequentially, allowing them to be revealed step-by-step or shown one at a time. It supports options for starting step, hiding logic, and repeating the last item. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Sequential Fragments #fragments( start: 1, [First item], [Second item], [Third item], hider: it => none, repeat-last: true ) ] ``` -------------------------------- ### Import Presentate Package in Typst Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md This snippet shows how to import the Presentate package into a Typst document. Ensure you have version '0.2.2' or later installed. Once imported, all package functions become available. ```typst #import "@preview/presentate:0.2.2": * ``` -------------------------------- ### Alchemist Package Integration for Molecule Animation with typst-presentate Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md This example shows how to integrate the Alchemist package to animate molecular structures using typst-presentate. It employs the `animation.animate` function with custom modifiers to control the visibility and appearance of molecular components like bonds and atom colors. ```typst #import "@preview/alchemist:0.1.8" as alc #let modifier(func, ..args) = func(stroke: none, ..args) // hide the bonds with `stroke: none` #let (single,) = animation.animate(modifier: modifier, alc.single) #let (fragment,) = animation.animate(modifier: (func, ..args) => func(colors: (white,),..args), alc.fragment) // set atom colors to white #slide[ = Alchemist Molecules #render(s => ({ alc.skeletize({ fragment(s, "H_3C") s.push(auto) single(s, angle: 1) fragment(s, "CH_2") s.push(auto) single(s, angle: -1, from: 0) fragment(s, "CH_2") s.push(auto) single(s, from: 0, angle: 1) fragment(s, "CH_3") }) },s) ) ] ``` -------------------------------- ### Basic Slide Creation with Presentate Source: https://context7.com/pacaunt/typst-presentate/llms.txt Demonstrates how to create basic slides using the `slide` function. It also shows how to use the `pause` function for incremental reveals and how to style slides with titles and dates. ```APIDOC ## Basic Slide Creation ### Description Create a slide with automatic animation step management. The `slide` function handles subslide generation and manages the animation timeline. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters N/A ### Request Example ```typst #import "@preview/presentate:0.2.2": * #set page(paper: "presentation-16-9") #set text(size: 25pt) // Basic slide with pause #slide[ Hello World! #show: pause; This is presentate. ] // Styled slide with title and date #set text(font: "FiraCode Nerd Font Mono") #set align(horizon) #slide[ = Welcome to Presentate! \ A lazy author \ #datetime.today().display() ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Styling Slides and Content with Presentate in Typst Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md Illustrates styling Typst slides using 'set page', 'set text', and 'set align'. It also shows how to use 'pause' for sequential content reveal and includes dynamic elements like date display. ```typst #set page(paper: "presentation-16-9") #set text(size: 25pt, font: "FiraCode Nerd Font Mono") #set align(horizon) #slide[ = Welcome to Presentate! \ A lazy author \ #datetime.today().display() ] #set align(top) #slide[ == Tips for Typst. #set align(horizon) Do you know that $pi != 3.141592$? #show: pause Yeah. Certainly. #show: pause Also $pi != 22/7$. ] ``` -------------------------------- ### Create a Basic Slide with Pause Animation in Typst Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md Demonstrates creating a Typst slide using the 'slide' function and introducing a simple animation with 'pause'. Content following '#show: pause;' will appear sequentially on subsequent 'pauses'. ```typst #set page(paper: "presentation-16-9") #set text(size: 25pt) #slide[ Hello World! #show: pause; This is `presentate`. ] ``` -------------------------------- ### Temporarily Highlight Content with Alert Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `alert` function temporarily highlights content with emphasis, automatically applying and removing styling at specified steps. It uses `show: pause` to manage visibility and can be configured with `from` and `to` parameters. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Key Points This is normal text. #show: pause #alert(from: auto, to: (rel: 1))[ This will be emphasized only on the current step. ] #show: pause Back to normal. ] ``` -------------------------------- ### CeTZ and Fletcher Package Integration with typst-presentate Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md This snippet demonstrates integrating the CeTZ package for drawing and the Fletcher package for creating diagrams within a typst-presentate slide. It utilizes the `render` function and the `animation` module to control the animation of graphical elements. ```typst #import "@preview/cetz:0.4.2": canvas, draw #import "@preview/fletcher:0.5.8": diagram, edge, node #slide[ = CeTZ integration #render(s => ({ import animation: * let (pause,) = settings(hider: draw.hide.with(bounds: true)) canvas({ import draw: * pause(s, circle((0, 0), fill: green)) s.push(auto) // update s pause(s, circle((1, 0), fill: red)) }) },s) ) ] #slide[ = Fletcher integration #render(s => ({ import animation: * diagram($ pause(#s, A edge(->)) #s.push(auto) & pause(#s, B edge(->)) #s.push(auto) pause(#s, edge(->, "d") & C) \ & pause(#s, D) $,) }, s,)) ] ``` -------------------------------- ### Timeline Synchronization with Update-Pause in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Explains how to synchronize multiple animation sequences using the `update-pause` parameter with `uncover`. This allows manual control of the pause counter for precise timeline alignment across different content blocks. Requires the Presentate package. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Content in Sync #table(columns: (1fr, 1fr), stroke: 1pt)[ First #show: pause; I am #show: pause; in sync. ][ // Reset to step 1 to sync with left column #uncover(1, [], update-pause: true) Second #show: pause; I am #show: pause; in sync. #show: pause Heheh ] ] ``` -------------------------------- ### CeTZ Integration for Custom Animations in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Demonstrates how to integrate the CeTZ package with Presentate using the `render` function to create custom animations. It accesses the state variable and animation module functions for dynamic visual elements like animated circles. Requires Presentate and CeTZ packages. ```typst #import "@preview/presentate:0.2.2": * #import "@preview/cetz:0.4.2": canvas, draw #slide[ = CeTZ Integration #render(s => ({ import animation: * let (pause,) = settings(hider: draw.hide.with(bounds: true)) canvas({ import draw: * pause(s, circle((0, 0), fill: green)) s.push(auto) // update state pause(s, circle((1, 0), fill: red)) }) }, s) ) ] ``` -------------------------------- ### Incremental Content Reveal with Pause in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Illustrates how to use the `pause` function as a show rule to incrementally reveal content on slides, creating sequential animation steps. This allows for staged presentation of information. Requires the Presentate package. ```typst #import "@preview/presentate:0.2.2": * #set page(paper: "presentation-16-9") #set text(size: 25pt) #set align(top) #slide[ == Mathematical Facts #set align(horizon) Do you know that $pi != 3.141592$? #show: pause Yeah. Certainly. #show: pause Also $pi != 22/7$. ] ``` -------------------------------- ### Dynamic Layout Shifting with Only in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Demonstrates the `only` function, which is similar to `uncover` but does not preserve layout space when content is hidden. This allows elements to shift dynamically as new content appears. Requires the Presentate package. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Relative `auto` and `none` Indices This is present first #show: pause #only(auto)[This came later, but *not* preserve space.] _This will shift._ #uncover(none)[This comes with current pause.] #show: pause This is the next pause. ] ``` -------------------------------- ### Update-Pause for Timeline Synchronization Source: https://context7.com/pacaunt/typst-presentate/llms.txt Demonstrates the use of the `update-pause` parameter in functions like `uncover` to manually control the pause counter and synchronize multiple animation sequences. ```APIDOC ## Update-Pause for Timeline Synchronization ### Description Synchronize multiple animation sequences by manually controlling the pause counter with the `update-pause` parameter. ### Method Typst Function Parameter ### Endpoint N/A (Typst Package Function Parameter) ### Parameters * `update-pause` (bool): When `true`, this function updates the global pause counter, allowing for synchronization across different elements or columns. ### Request Example ```typst #import "@preview/presentate:0.2.2": * #slide[ = Content in Sync #table(columns: (1fr, 1fr), stroke: 1pt)[ First #show: pause; I am #show: pause; in sync. ][ // Reset to step 1 to sync with left column #uncover(1, [], update-pause: true) Second #show: pause; I am #show: pause; in sync. #show: pause Heheh ] ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Set Global Presentation Options Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `set-options` function configures global presentation settings such as handout mode, draft mode, and state freezing. These options affect how the presentation behaves and is displayed during different modes. ```typst #import "@preview/presentate:0.2.2": * // Enable handout mode (shows all animation steps) #set-options(handout: true) // Enable draft mode (shows slide numbers) #set-options(drafted: true) // Disable state freezing #set-options(freeze-states: false) #slide[ = Content #show: pause This will behave differently based on options ] ``` -------------------------------- ### Create Animated Diagrams with Fletcher Integration Source: https://context7.com/pacaunt/typst-presentate/llms.txt This snippet demonstrates integrating Fletcher diagrams into Typst presentations using the `render` function and `animation` module. Diagram elements are wrapped in `pause` functions to control their visibility across animation steps. ```typst #import "@preview/presentate:0.2.2": * #import "@preview/fletcher:0.5.8": diagram, edge, node #slide[ = Fletcher Integration #render(s => ({ import animation: * diagram($ pause(#s, A edge(->)) #s.push(auto) & pause(#s, B edge(->)) #s.push(auto) pause(#s, edge(->, "d") & C) \ & pause(#s, D) $,) }, s,)) ] ``` -------------------------------- ### Pause Function for Incremental Reveals Source: https://context7.com/pacaunt/typst-presentate/llms.txt Explains how to use the `pause` function as a show rule to incrementally reveal content on slides, creating sequential animation steps. ```APIDOC ## Pause Function ### Description Incrementally reveal content on slides by using the `pause` function as a show rule, creating sequential animation steps. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters N/A ### Request Example ```typst #import "@preview/presentate:0.2.2": * #set page(paper: "presentation-16-9") #set text(size: 25pt) #set align(top) #slide[ == Mathematical Facts #set align(horizon) Do you know that $pi != 3.141592$? #show: pause Yeah. Certainly. #show: pause Also $pi != 22/7$. ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Relative Index Specification with 'auto' and 'none' in Typst Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md Explains and demonstrates the use of 'auto' and 'none' with the 'only' function for relative animation sequencing in Typst's Presentate. 'auto' shows content after the previous pause, while 'none' shows it with the current pause. ```typst #slide[ = Relative `auto` and `none` Indices This is present first #show: pause #only(auto)[This came later, but *not* preserve space.] _This will shift._ #uncover(none)[This comes with current `pause`.] #show: pause This is the next `pause`. ] ``` -------------------------------- ### Only Function for Dynamic Layouts Source: https://context7.com/pacaunt/typst-presentate/llms.txt Explains the `only` function, which is similar to `uncover` but does not preserve layout space when content is hidden, allowing elements to shift dynamically. ```APIDOC ## Only Function ### Description Similar to `uncover` but does not preserve layout space when content is hidden, allowing elements to shift dynamically. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters * `indices` (int or range): The animation index or range of indices when the content should be visible. * `update-pause` (bool): If true, this function also updates the pause counter. ### Request Example ```typst #import "@preview/presentate:0.2.2": * #slide[ = Relative `auto` and `none` Indices This is present first #show: pause #only(auto)[This came later, but *not* preserve space.] _This will shift._ #uncover(none)[This comes with current pause.] #show: pause This is the next pause. ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Apply Transformations to Content Over Animation Steps Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `transform` function applies different transformation functions to content at various animation steps. This is useful for creating complex visual effects and animations by modifying properties like color, weight, and size. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Text Transformations #transform( start: 1, [Important Text], text.with(fill: blue), text.with(fill: red, weight: "bold"), text.with(fill: green, size: 30pt), repeat-last: true ) ] ``` -------------------------------- ### Alchemist Integration for Animated Molecules in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Illustrates using the `animate` function to wrap Alchemist functions for creating animation-aware molecule diagrams. Custom modifiers hide bonds or atoms, enabling sequential reveals and transformations of molecular structures. Requires Presentate and Alchemist packages. ```typst #import "@preview/presentate:0.2.2": * #import "@preview/alchemist:0.1.8" as alc // Hide bonds by setting stroke to none #let modifier(func, ..args) = func(stroke: none, ..args) #let (single,) = animation.animate(modifier: modifier, alc.single) // Hide atoms by setting colors to white #let (fragment,) = animation.animate( modifier: (func, ..args) => func(colors: (white,), ..args), alc.fragment ) #slide[ = Alchemist Molecules #render(s => ({ alc.skeletize({ fragment(s, "H_3C") s.push(auto) single(s, angle: 1) fragment(s, "CH_2") s.push(auto) single(s, angle: -1, from: 0) fragment(s, "CH_2") s.push(auto) single(s, from: 0, angle: 1) fragment(s, "CH_3") }) }, s) ) ] ``` -------------------------------- ### Varying Timeline with 'update-pause' in Typst Source: https://github.com/pacaunt/typst-presentate/blob/main/README.md Shows how to control animation timing in Typst's Presentate using the 'update-pause' argument. Setting 'update-pause: true' allows specific elements to control the animation step count, useful for synchronizing content. ```typst #slide[ = Content in Sync #table(columns: (1fr, 1fr), stroke: 1pt)[ First #show: pause; I am #show: pause; in sync. ][ // `[]` is a dummy content. #uncover(1, [], update-pause: true) Second #show: pause; I am #show: pause; in sync. #show: pause Heheh ] ] ``` -------------------------------- ### Reveal List Items One at a Time with Step-Item Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `step-item` function reveals list or enumeration items one at a time, creating progressive disclosure for bullet points or numbered lists. It can be used with default bullet points or custom numbering schemes. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Todo List #step-item[ - First task - Second task - Third task ] ] #slide[ = Numbered Steps #step-item(numbering: "1.")[ + Initialize system + Load configuration + Start services ] ] ``` -------------------------------- ### Uncover Function for Specific Animation Indices Source: https://context7.com/pacaunt/typst-presentate/llms.txt Details the `uncover` function, which allows content to be shown only at specific animation indices or ranges, preserving layout space even when hidden. ```APIDOC ## Uncover Function ### Description Show content only at specific animation indices or ranges, preserving the layout space even when hidden. ### Method Typst Function ### Endpoint N/A (Typst Package Function) ### Parameters * `indices` (int or range): The animation index or range of indices when the content should be visible. * `update-pause` (bool): If true, this function also updates the pause counter. ### Request Example ```typst #import "@preview/presentate:0.2.2": * #slide[ = Content Visibility Control This appears first #show: pause #uncover(2)[This appears on step 2] #uncover(from: 3)[This appears from step 3 onwards] #uncover(from: 2, to: 4)[This shows only on steps 2-4] ] ``` ### Response N/A (Typst Rendering Output) ### Response Example N/A ``` -------------------------------- ### Conditional Content Visibility with Uncover in Typst Source: https://context7.com/pacaunt/typst-presentate/llms.txt Shows how to use the `uncover` function to display content only at specific animation indices or ranges. It preserves layout space for hidden elements, ensuring the slide structure remains consistent. Requires the Presentate package. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Content Visibility Control This appears first #show: pause #uncover(2)[This appears on step 2] #uncover(from: 3)[This appears from step 3 onwards] #uncover(from: 2, to: 4)[This shows only on steps 2-4] ] ``` -------------------------------- ### Add Speaker Notes for PDFPC Source: https://context7.com/pacaunt/typst-presentate/llms.txt The `pdfpc.speaker-note` function allows adding hidden speaker notes to slides. These notes are intended for presenter view in presentation software like pdfpc and are not displayed to the audience. ```typst #import "@preview/presentate:0.2.2": * #slide[ = Main Content This is what the audience sees. #pdfpc.speaker-note[ Remember to mention the key statistics here. Talk about the implementation details. ] ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.