### Example Data Table with 12-Space Tab Stop Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tabstop.md A plain text data table demonstrating expenses, identical in content to the previous example but intended to be processed with a tab stop of 12 spaces, showcasing the effect of different tab stop configurations within the 'patat' tool. ```Plain Text Essential\tName\tExpenses\nx\tFood\t$200\n\tData\t$150\n\tRent\t$800\nx\tCandles\t$3,600\n\tUtilities\t$150 ``` -------------------------------- ### Example Data Table with 4-Space Tab Stop Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tabstop.md A plain text data table demonstrating expenses, formatted with a tab stop of 4 spaces, likely for use with the 'patat' presentation tool, as indicated by the preceding configuration. ```Plain Text Essential\tName\tExpenses\nx\tFood\t$200\n\tData\t$150\n\tRent\t$800\nx\tCandles\t$3,600\n\tUtilities\t$150 ``` -------------------------------- ### Print 'Hello world' in Haskell Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/issue-111.md A simple Haskell code snippet demonstrating how to print a string to the console. This example is shown embedded within a markdown block quote, illustrating how code can be presented within textual documentation. ```Haskell putStrLn "Hello world" ``` -------------------------------- ### YAML Example: Per-User Patat Configuration Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet demonstrates how to configure 'patat' globally for a user using a 'config.yaml' file. It shows an example of disabling slide numbers, which applies to all presentations unless overridden. ```YAML slideNumber: false ``` -------------------------------- ### Configure Patat Bullet List Markers and Lists Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/meta.md This YAML configuration snippet demonstrates how to set custom bullet list markers (e.g., '<>') for the 'patat' presentation theme. It also includes an example of a simple bulleted list with nested sub-items, showcasing basic content structure. ```YAML --- patat: theme: bulletListMarkers: '<>' ... - Hello - World * How * Are * You * Doing ``` -------------------------------- ### Code-Wrapped Shell Evaluation Example in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval06.md Illustrates a shell evaluation slide using the 'shCode' configuration. The output of the shell command is wrapped as a code block, suitable for displaying code examples or command outputs within a formatted code environment. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Create a Headerless Multiline Markdown Table Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tables.md Provides an example of a multiline table without a header, similar to the headerless simple table but with the added capability for multiline cell content. This is suitable for compact, multi-line data displays. ```Markdown Table ----------- ------- --------------- ------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ----------- ------- --------------- ------------------------- ``` -------------------------------- ### Create a Simple Markdown Table with Headers Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tables.md Demonstrates the basic syntax for creating a table with a header row, column separators, and aligned content. It shows right, left, center, and default alignment options. ```Markdown Table Right Left Center Default ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 ``` -------------------------------- ### Patat Bash Evaluation Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval-out-syntax.md This section describes the configuration structure for how the `patat` tool evaluates bash commands. It specifies the command interpreter to use and the expected syntax of the output. ```APIDOC patat: eval: bash: command: bash syntax: json ``` -------------------------------- ### Shell Script Example with Explicit Stderr Capture in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval08.md Illustrates a shell script run in `patat` using the `withStderr` configuration. This ensures that standard error output is explicitly captured and displayed, allowing users to see error messages. ```sh echo "Hello stdout" sleep 0.1 echo "Hello stderr" >&2 ``` -------------------------------- ### Example Markdown Input for patat Presentations Source: https://github.com/jaspervdj/patat/blob/main/README.md Demonstrates the basic structure of a presentation file using Markdown, including YAML front matter for metadata like title and author, and how to define individual slides using `---` separators. ```markdown --- title: This is my presentation author: Jane Doe ... # This is a slide Slide contents. Yay. --- ``` -------------------------------- ### Implicit Shell Evaluation Example in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval06.md Demonstrates an implicit shell evaluation slide using the 'shImplicit' configuration. The shell command's output is directly embedded into the presentation without specific wrapping, behaving as a standard text output. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Ruby: Printing Multiple Lines Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/03.md This snippet demonstrates printing multiple strings to the console in Ruby, including an empty line between `puts` statements to show how blank lines are preserved within code blocks. ```Ruby puts "wow" puts "amaze" ``` -------------------------------- ### Create a Multiline Markdown Table with Headers Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tables.md Shows how to construct a table where cells can contain multiple lines of text. It includes a header and demonstrates how blank lines separate rows, allowing for complex cell content. ```Markdown Table ------------------------------------------------------------- Centered Default Right Left Header Aligned Aligned Aligned ----------- ------- --------------- ------------------------- First row 12.0 Example of a row that spans multiple lines. Second row 5.0 Here's another one. Note the blank line between rows. ------------------------------------------------------------- ``` -------------------------------- ### Ruby: Sequential Function Calls Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/03.md This snippet shows two sequential function calls, `fire_missiles()` and `cancel()`, demonstrating basic command execution within a Ruby context. It highlights how code can be embedded within ordered lists in markdown. ```Ruby fire_missiles() cancel() ``` -------------------------------- ### Echoing Text to Standard Output in Bash Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval09.md This snippet illustrates the fundamental 'echo' command in Bash, used to print a line of text to the console. It takes a string as an argument and outputs it directly. ```bash echo foo ``` -------------------------------- ### Display PHP Version in Shell Prompt Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/issue-171.md This snippet provides a shell command to be added to the `$PS1` environment variable, which controls the appearance of your shell prompt. It executes `php -v` to get the PHP version, filters the output using `grep` to find the line starting with 'PHP', and then uses `cut` to extract just the version number. This allows users to quickly see their active PHP version directly in their terminal. ```Shell 象 $(php -v | grep "^PHP" | cut -d " " -f2) ``` -------------------------------- ### Raw Shell Evaluation Example in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval06.md Shows a shell evaluation slide using the 'shRaw' configuration. The raw output of the shell command is included, preserving its original formatting, including newlines, which is useful for displaying terminal-like output. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Raw Inline Shell Evaluation Example in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval06.md Presents a shell evaluation slide using the 'shInline' configuration. The raw output of the shell command is included inline, typically without a trailing newline, making it suitable for embedding short command results directly into a line of text. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Create a Headerless Markdown Table Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/tables.md Illustrates how to define a table without an explicit header row, relying solely on content and separators. This format is useful for simple data lists. ```Markdown Table ------- ------ ---------- ------- 12 12 12 12 123 123 123 123 1 1 1 1 ------- ------ ---------- ------- ``` -------------------------------- ### Markdown Example: Slide Splitting with Headers Source: https://github.com/jaspervdj/patat/blob/main/README.md This example illustrates how 'patat' can use Markdown headers to define slides, providing an alternative to horizontal rulers. It shows a presentation with a title slide and two content slides, where 'h1' acts as a chapter title and 'h2' defines individual slides. ```Markdown --- title: This is my presentation author: Jane Doe ... # Chapter 1 ## This is a slide Slide contents. Yay. ## Another slide Things I like: - Markdown - Haskell - Pandoc ``` -------------------------------- ### Shell Script Example with Implicit Stderr Handling in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval08.md Demonstrates a shell script executed within `patat` using the `implicitStderr` configuration. This setting typically means stderr is handled by default, often merged with stdout or displayed separately without explicit capture. ```sh echo "Hello stdout" sleep 0.1 echo "Hello stderr" >&2 ``` -------------------------------- ### Global Patat Presentation Theme Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slide-config.md Defines the default theme settings for an entire Patat presentation, specifying the color palettes for headers and strong text elements. This configuration is typically placed at the top level of the Patat document. ```YAML patat: theme: header: [vividRed] strong: [vividCyan] ``` -------------------------------- ### patat Shell Evaluation Configuration Definitions Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval06.md Defines various shell evaluation modes for 'patat' presentations. Each mode specifies the command interpreter ('sh'), whether to replace the content, and how to wrap the output fragment (e.g., 'code', 'raw', 'rawInline', or implicitly no wrap). ```YAML patat: eval: shImplicit: command: sh replace: true fragment: false shCode: command: sh wrap: code replace: true fragment: false shRaw: command: sh wrap: raw replace: true fragment: false shInline: command: sh wrap: rawInline replace: true fragment: false ``` -------------------------------- ### Shell Script Example Suppressing Stderr in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval08.md Shows a shell script executed in `patat` with the `withoutStderr` configuration. This setting explicitly suppresses or discards standard error output, preventing it from being displayed to the user. ```sh echo "Hello stdout" sleep 0.1 echo "Hello stderr" >&2 ``` -------------------------------- ### ImpureScript Function for Iteration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/syntax-definitions.md This `impurescript` function, `iterate`, applies a given function `f` to a value `x` a specified number of `n` times. It's a common pattern for repeated application of a transformation, with a base case for zero iterations. ```impurescript iterate f 0 x = x iterate f n x = iterate f (n - 1) (f x) ``` -------------------------------- ### Example Ruby Code Block for Patat Evaluation Source: https://github.com/jaspervdj/patat/blob/main/README.md This Ruby code block demonstrates a simple `puts` statement that outputs a JSON string. When evaluated by `patat` with the configured Ruby evaluator, its output will be displayed. ```Ruby puts '{"hello": "world"}' ``` -------------------------------- ### Haskell Simple Choice Expression Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/margins-auto.md This Haskell code snippet demonstrates a simple expression that could represent a choice or a boolean-like value. It highlights basic syntax for defining alternatives in Haskell. ```haskell Yeah | Nope ``` -------------------------------- ### Plaintext Arithmetic Expression Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/margins-auto.md This snippet illustrates a basic arithmetic operation, specifically the addition of two numbers, presented in a generic plaintext format without a specific programming language context. ```plaintext 1 + 2 ``` -------------------------------- ### Customize Syntax Highlighting Theme Colors in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This configuration example demonstrates how to customize the visual theme for syntax highlighting in `patat`. It uses the `syntaxHighlighting` field under `theme` to map token types (e.g., `decVal` for decimal values) to specific styling options like `bold` and `onDullRed`. ```markdown --- patat: theme: syntaxHighlighting: decVal: [bold, onDullRed] ... ``` -------------------------------- ### Annotate Code Blocks for Syntax Highlighting in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md To enable syntax highlighting for a code block in `patat`, it must be annotated with the language. This example shows a fenced code block using `ruby` to ensure proper highlighting. ```ruby puts "Hello, world!" ``` -------------------------------- ### Customize Patat Presentation Themes and Colors Source: https://github.com/jaspervdj/patat/blob/main/README.md Patat allows extensive customization of presentation themes, including colors and text properties. This is achieved by defining a `theme` object within the `patat` metadata, where various elements can be assigned a list of styles, including named colors and custom RGB values. This example shows basic theming and custom underline colors. ```markdown --- author: 'Jasper Van der Jeugt' title: 'This is a test' patat: wrap: true theme: emph: [vividBlue, onVividBlack, italic] strong: [bold] imageTarget: [onDullWhite, vividRed] ... # This is a presentation This is _emph_ text. ![Hello](foo.png) ``` ```yaml patat: theme: strong: [underline, underlineVividBlue] ``` -------------------------------- ### Example Figlet Code Block for ASCII Art Source: https://github.com/jaspervdj/patat/blob/main/README.md This code block, when processed by the `figlet` evaluator, will render 'Fancy Font' as ASCII art. The `figlet` class indicates it should be processed by the `figlet` command. ```text Fancy Font ``` -------------------------------- ### patat Evaluation Configuration for Stderr Handling Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval08.md Defines how `patat` handles standard error (stderr) when evaluating commands within slides. It specifies options like `implicitStderr`, `withStderr`, and `withoutStderr`, controlling whether stderr is captured and displayed. ```APIDOC patat: eval: implicitStderr: command: sh replace: true fragment: false withStderr: command: sh replace: true fragment: false stderr: true withoutStderr: command: sh replace: true fragment: false stderr: false ``` -------------------------------- ### Markdown Example: Configuring Slide Margins Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet shows how to define custom margins for 'patat' presentations within the Markdown front matter. It demonstrates setting left, right, and top margins, and enabling line wrapping, which is recommended when using a non-zero right margin. ```Markdown --- title: Presentation with margins author: John Doe patat: wrap: true margins: left: 10 right: 10 top: 5 ... Lorem ipsum dolor sit amet, ... ``` -------------------------------- ### Displaying Unevaluated Bash Code in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval03.md This snippet shows a standard Bash code block that is displayed as-is within a patat presentation without being executed. It serves as a static code example for visual reference. ```bash echo foo ``` -------------------------------- ### Displaying Un-evaluated Bash Code in Patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval04.md Demonstrates a standard bash code block that is displayed literally within the 'patat' presentation tool without being executed. This is useful for showing code examples that should not alter the presentation environment. ```bash echo foo ``` -------------------------------- ### Output JSON String in Bash Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval-out-syntax.md This code snippet demonstrates how to use the `echo` command in a bash shell to print a simple JSON string to standard output. The JSON string is enclosed in single quotes to prevent shell expansion issues. ```bash echo '{"foo": 1}' ``` -------------------------------- ### Disable Slide Number for a Specific Patat Slide Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slide-config.md Disables the display of the slide number for an individual slide. This configuration is embedded within an HTML comment and can be used independently or in conjunction with other slide-specific settings. ```YAML slideNumber: false ``` -------------------------------- ### Lazy Search for Pythagorean Triples in Haskell Source: https://github.com/jaspervdj/patat/blob/main/extra/demo.md This example showcases Haskell's laziness by searching for Pythagorean triples (a, b, c) where a² + b² = c². The list comprehension defines a potentially large search space, but `take 3` ensures that only the first three results are computed, demonstrating that the entire space is not traversed upfront. This code is designed to be run in a GHCi environment. ```Haskell take 3 $ [ (a, b, c) | c <- [1 .. 100000] , b <- [1 .. c], a <- [1 .. b] , a * a + b * b == c * c ] ``` -------------------------------- ### Enable Emoji Pandoc Extension in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/extentions1.md This YAML configuration snippet demonstrates how to enable specific pandoc extensions within patat. In this example, the 'emoji' extension is enabled, which allows for the rendering of emojis in presentations. Additional pandoc extensions can be added to the list as needed. ```YAML patat: pandocExtensions: - emoji ``` -------------------------------- ### Markdown Example: Slide-Specific Patat Configuration Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet demonstrates how to apply configuration settings to individual slides within a Markdown presentation using an HTML comment block (' Slide numbers are turned off here. ``` -------------------------------- ### Add Speaker Notes to Patat Slides in Markdown Source: https://github.com/jaspervdj/patat/blob/main/README.md This Markdown example demonstrates how to embed speaker notes within a `patat` presentation using HTML comments (``). These notes are visible to the presenter but not to the audience, aiding in slide delivery. ```Markdown --- title: This is my presentation author: Jane Doe ... # Chapter 1 Slide contents. Yay. ``` -------------------------------- ### Slide-Specific Top Margin Configuration in Patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slide-config.md Applies a custom top margin to an individual slide, increasing the vertical spacing from the top edge. This configuration is embedded within an HTML comment directly preceding the affected slide content. ```YAML margins: {top: 2} ``` -------------------------------- ### Displaying Unevaluated Bash Code in Patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval01.md This code block demonstrates how to include a Bash command in a Patat presentation without executing it. The `bash` language specifier ensures the code is rendered as-is, serving as a static example. ```bash echo foo ``` -------------------------------- ### Markdown Example: Presentation-Level Patat Configuration Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet shows how to embed 'patat' configuration directly within a Markdown presentation file using the Pandoc metadata header. Settings placed in the 'patat:' section override per-user configurations, as demonstrated by disabling slide numbers for a specific presentation. ```Markdown --- title: Presentation with options author: John Doe patat: slideNumber: false ... Hello world. ``` -------------------------------- ### Markdown Example: Slide Splitting with Horizontal Rulers Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet demonstrates how 'patat' uses horizontal rulers ('---') to define slide boundaries in a Markdown presentation. It shows a basic presentation structure with a title slide and two content slides, illustrating the use of front matter for presentation metadata. ```Markdown --- title: This is my presentation author: Jane Doe ... # This is a slide Slide contents. Yay. # Important title Things I like: - Markdown - Haskell - Pandoc ``` -------------------------------- ### Configure Block Quote Theme in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/issue-111.md Demonstrates how to configure the theme for block quotes in the patat presentation tool. This YAML snippet specifies the visual styles (italic, vivid red text on a dull green background) to be applied to block quotes. ```YAML patat: theme: blockQuote: [italic, vividRed, onDullGreen] ``` -------------------------------- ### Markdown Example: Centering Slide Content Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet illustrates how to automatically center content both vertically and horizontally within 'patat' slides. By setting 'left', 'right', and 'top' margins to 'auto', the content adjusts to the terminal width and height, with line wrapping recommended for vertical centering. ```Markdown --- title: Centered presentation author: John Doe patat: margins: left: auto right: auto top: auto ... Hello world ``` -------------------------------- ### Slide-Specific Theme Override and Slide Number Disablement in Patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slide-config.md Overrides the default theme for a specific slide, applying unique colors for headers and strong text, and simultaneously disables the display of the slide number for that particular slide. This configuration is embedded within an HTML comment. ```YAML slideNumber: false theme: header: [vividYellow] strong: [dullGreen, onVividBlue] ``` -------------------------------- ### Disable Default and Select Custom Pandoc Extensions in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This example shows how to disable `patat`'s default set of Pandoc extensions and instead specify a custom list. By omitting `patat_extensions` and listing only desired extensions like `autolink_bare_uris` and `emoji`, users gain fine-grained control over Markdown parsing. ```markdown --- patat: pandocExtensions: - autolink_bare_uris - emoji ... Document content... ``` -------------------------------- ### Control Slide Splitting Behavior with `slideLevel` in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md Patat automatically determines slide breaks based on header levels. This section demonstrates how to override this default by explicitly setting the `slideLevel` in the presentation metadata. Setting `slideLevel` to 1, for example, will treat only H1 headers as new slide indicators, keeping all sub-headers and content on the same slide. ```markdown # This is a slide ## This is a nested header This is some content ``` ```markdown --- patat: slideLevel: 1 ... # This is a slide ## This is a nested header This is some content ``` -------------------------------- ### Execute Simple Bash Command Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval-case-insensitive.md Demonstrates a basic Bash command execution, showing a simple 'echo' operation. This snippet illustrates how a command might be structured or used within a larger system like 'patat'. ```Bash echo foo ``` -------------------------------- ### patat Command-Line Options Reference Source: https://github.com/jaspervdj/patat/blob/main/README.md Describes the various command-line flags available for the `patat` presentation tool, including their short and long forms, and their respective functionalities for controlling presentation behavior. ```APIDOC patat [*options*] file -w, --watch: Description: If provided, patat will watch the presentation file for changes and reload automatically. Usage: Very useful when writing the presentation. -f, --force: Description: Run the presentation even if the terminal claims it does not support ANSI features. -d, --dump: Description: Just dump all the slides to stdout. Usage: Useful for debugging. --version: Description: Display version information. ``` -------------------------------- ### Evaluate Python 3 Code Block with Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This code block, marked with `.python3` class, will be evaluated using the `python3` command configured in `patat`. It demonstrates printing 'Hello, world' using Python 3 syntax. ```Python print("Hello, world") ``` -------------------------------- ### Evaluate Python 2 Code Block with Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This code block, marked with `.python2` class, will be evaluated using the `python2` command configured in `patat`. It demonstrates printing 'Hello, world' using Python 2 syntax. ```Python print "Hello, world" ``` -------------------------------- ### Configure W3m Image Backend Path in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet demonstrates how to specify a custom path for the `w3mimgdisplay` executable when using the `w3m` image backend. This is useful if `w3mimgdisplay` is not in a standard system location, ensuring `patat` can find and utilize it for image rendering. ```yaml backend: 'w3m' path: '/home/jasper/.local/bin/w3mimgdisplay' ``` -------------------------------- ### Basic Text Output with Bash and Rev Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval05.md Illustrates how to output the string 'foo' using both the standard 'bash' shell and the 'rev' command. Note that 'rev' typically reverses its input, but here it's shown with a simple echo. ```bash echo foo ``` ```rev echo foo ``` -------------------------------- ### Configure Patat to Output Speaker Notes to File Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration instructs `patat` to write the current slide's speaker notes to the specified file path (`/tmp/notes.txt`). This allows presenters to view notes on a separate screen or application. ```YAML patat: speakerNotes: file: /tmp/notes.txt ``` -------------------------------- ### patat Keyboard Controls and Navigation Source: https://github.com/jaspervdj/patat/blob/main/README.md Lists the keyboard shortcuts for navigating and interacting with a `patat` presentation, including moving between slides, jumping to specific slides, reloading the file, and quitting the application. ```APIDOC Next slide: space, enter, l, →, PageDown Previous slide: backspace, h, ←, PageUp Go forward 10 slides: j, ↓ Go backward 10 slides: k, ↑ First slide: 0 Last slide: G Jump to slide N: N followed by enter Reload file: r Usage: Very useful for previewing slides while writing them or fixing artifacts when the terminal is resized. Quit: q ``` -------------------------------- ### Patat Transition Configuration API Source: https://github.com/jaspervdj/patat/blob/main/README.md Defines the available configuration options for slide transitions in Patat, including supported transition types and their common arguments like frame rate and duration. It also details the 'random' type's 'items' property for custom transition sequences. ```APIDOC patat.transition: type: string Description: The type of transition effect. Supported values: - slideLeft: Slides the new slide in from right to left. - dissolve: Changes characters over time. - matrix: Loosely inspired by the 1999 science fiction movie. - random: Randomly picks a transition effect. frameRate: number (optional) Default: 24 Description: Number of frames per second for the animation. duration: number (optional) Default: 1 Description: Duration of the animation in seconds. items: array of objects (optional, only for type: random) Description: A non-empty list of specific transition effects to randomly sample from. Each item object can contain: - type: string (e.g., 'dissolve', 'slideLeft') - duration: number - frameRate: number ``` -------------------------------- ### Patat YAML Configuration for Incremental Lists and Margins Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/margins01.md This YAML configuration block defines settings for the `patat` presentation tool, enabling incremental display for lists and automatically adjusting left, right, and top margins. This ensures a consistent and centered presentation of content. ```YAML patat: incrementalLists: true margins: left: auto right: auto top: auto ``` -------------------------------- ### Display Speaker Notes File Using Tail Command Source: https://github.com/jaspervdj/patat/blob/main/README.md This Bash command uses `tail -F` to continuously monitor and display the contents of the speaker notes file (`/tmp/notes.txt`). This is a simple method for presenters to view their notes in real-time as slides change. ```Bash tail -F /tmp/notes.txt ``` -------------------------------- ### patat YAML Configuration for Shell Evaluation Modes Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval07.md Defines various shell evaluation modes (shImplicit, shCode, shNone, shInline) for the 'patat' presentation tool, specifying the command to execute, whether to replace the content, and the container/fragment behavior for output. ```YAML patat: eval: shImplicit: command: sh replace: true fragment: false shCode: command: sh container: code replace: true fragment: false shNone: command: sh container: none replace: true fragment: false shInline: command: sh container: inline replace: true fragment: false ``` -------------------------------- ### patat Command Evaluation Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval05.md Defines the external commands 'patat' uses for evaluation, mapping 'bash' to the system's 'bash' executable and 'rev' to the 'rev' executable. ```YAML patat: eval: bash: command: bash rev: command: rev ``` -------------------------------- ### Configure Random Slide Transitions in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration demonstrates how to set up random slide transitions in `patat`. The `type` is set to `random`, and an optional `items` list specifies a subset of transitions to randomly sample from, each with its own duration or frame rate settings. ```yaml patat: transition: type: random items: - type: dissolve duration: 3 - type: slideLeft frameRate: 10 ``` -------------------------------- ### Enable Native Image Display in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This configuration enables `patat`'s native image display feature, allowing it to render full-size images on slides. Setting `images.backend` to `auto` lets `patat` choose the best available backend for the terminal. ```markdown --- patat: images: backend: auto ... # A slide with only an image. ![](matterhorn.jpg) ``` -------------------------------- ### patat Configuration for Code Evaluation Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval02.md This YAML configuration block defines the behavior of `eval` code blocks within the `patat` presentation tool. It specifies that commands within `eval` blocks should be executed using `bash`, and that they are designed to replace content and operate on fragments. ```yaml patat: eval: eval: command: bash replace: false fragment: true ``` -------------------------------- ### Patat Theme Syntax Highlighting Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/syntax.md Defines syntax highlighting rules for the 'patat' presentation tool, specifying styling for decimal values (decVal) as bold text on a dull red background. ```YAML patat: theme: syntaxHighlighting: decVal: [bold, onDullRed] ``` -------------------------------- ### Enable OSC8 Hyperlinks in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration snippet shows how to enable OSC8 support for hyperlinks in `patat`. Setting `osc8` to `true` makes hyperlinks clickable in compatible terminal emulators, improving user interaction. ```yaml patat: links: osc8: true ``` -------------------------------- ### Display Speaker Notes File Using Patat Watch Mode Source: https://github.com/jaspervdj/patat/blob/main/README.md This Bash command uses a second `patat` instance with the `--watch` flag to display the speaker notes file (`/tmp/notes.txt`). This provides an alternative, potentially more integrated, way to view notes during a presentation. ```Bash patat -w /tmp/notes.txt ``` -------------------------------- ### Patat Theme Configurable Properties Source: https://github.com/jaspervdj/patat/blob/main/README.md A reference list of all elements within the `patat` theme that can be customized with various styles. These properties control the visual appearance of different presentation components. ```APIDOC blockQuote borders bulletList codeBlock code definitionList definitionTerm emph header imageTarget imageText linkTarget linkText math orderedList quoted strikeout strong tableHeader tableSeparator underline ``` -------------------------------- ### Configure patat presentation theme Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/themes.md This configuration snippet customizes the visual theme for `patat` presentations. It defines markers for bullet lists, styling for emphasized and strong text, and header appearance. This theme configuration enhances readability and visual appeal of the presentation. ```YAML patat: theme: bulletListMarkers: '-+' emph: [onVividRed, underline] strong: [rgb#f08000, onRgb#101060] header: [vividGreen, underline, underlineVividBlue] ``` -------------------------------- ### Configure and Use Image Display via Code Evaluation with Kitty Icat Source: https://github.com/jaspervdj/patat/blob/main/README.md This advanced configuration allows `patat` to display images by evaluating code snippets that output image escape codes. The first code block sets up an `eval` block for `kitten` snippets, using `sed` and `bash` to pipe commands to Kitty's `icat`, ensuring the output replaces the snippet without being wrapped. The second code block demonstrates how to use this configuration within a Markdown document to display an image. ```yaml patat: eval: kitten: command: sed 's/^/kitten /' | bash replace: true reveal: false container: none ``` ```kitten icat --align left dank-meme.jpg ``` -------------------------------- ### Configure Image Backend for patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/image.md This YAML snippet configures the image backend for the `patat` tool. It specifies `iterm2` as the backend, which is used for displaying images within the terminal. ```YAML patat: images: backend: iterm2 ``` -------------------------------- ### Basic C Main Function Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/syntax.md A simple C program demonstrating a basic 'main' function. This function takes command-line arguments and returns 0, indicating successful program execution. ```C int main(int argc, char **argv) { return 0; } ``` -------------------------------- ### Configure Custom Syntax Highlighting Definitions in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet shows how to add custom syntax highlighting XML files to `patat`'s configuration. It uses the `syntaxDefinitions` field within the `patat` YAML block to specify paths to XML definition files. ```markdown --- patat: syntaxDefinitions: - 'impurescript.xml' ... ``` -------------------------------- ### Configure Global Slide Transition Type in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration sets a global transition type for `patat` slides. Here, `type: slideLeft` specifies a 'slide left' effect between slides, enhancing the visual flow of the presentation. ```YAML patat: transition: type: slideLeft ``` -------------------------------- ### Configure Patat Text Wrapping and Margins (YAML) Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/margins.md This YAML configuration block defines the display behavior for content within the 'patat' presentation tool. It enables automatic text wrapping, sets the overall column width for content, and specifies the left and right margins, which dictate the spacing around the text. ```YAML author: 'Jasper' patat: wrap: true columns: 57 # 10 + 42 + 5 margins: left: 10 right: 5 ``` -------------------------------- ### Enable Additional Pandoc Extensions in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This configuration snippet illustrates how to enable additional Pandoc extensions in `patat`. By adding extension names like `autolink_bare_uris` to the `pandocExtensions` field, users can extend Markdown's capabilities. `patat_extensions` refers to the default set. ```markdown --- patat: pandocExtensions: - patat_extensions - autolink_bare_uris ... Document content... ``` -------------------------------- ### Patat Theme Accepted Style Values Source: https://github.com/jaspervdj/patat/blob/main/README.md A comprehensive reference of all valid style values that can be applied to Patat theme properties. This includes named colors (dull, vivid, onDull, onVivid), text decorations (bold, italic, underline), and 24-bit RGB color formats (rgb#RrGgBb, onRgb#RrGgBb). ```APIDOC bold italic dullBlack dullBlue dullCyan dullGreen dullMagenta dullRed dullWhite dullYellow onDullBlack onDullBlue onDullCyan onDullGreen onDullMagenta onDullRed onDullWhite onDullYellow onVividBlack onVividBlue onVividCyan onVividGreen onVividMagenta onVividRed onVividWhite onVividYellow underline vividBlack vividBlue vividCyan vividGreen vividMagenta vividRed vividWhite vividYellow rgb#RrGgBb onRgb#RrGgBb ``` -------------------------------- ### Print Message in C Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/lists.md This snippet demonstrates a basic `printf` function call in C, outputting a string to the console. It is embedded within a nested list structure to show code inclusion in documentation. ```C printf("Nested code block!\n") ``` -------------------------------- ### Configure Ruby Code Evaluator in Patat YAML Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration registers a Ruby evaluator for `patat` presentations. It specifies the `irb` command, and optional settings like `reveal` for pauses, `replace` to substitute the original code, `container` for output formatting, and `syntax` for highlighting the output. ```YAML --- patat: eval: ruby: command: irb --noecho --noverbose reveal: true # Optional replace: false # Optional container: code # Optional syntax: json # Optional ... ``` -------------------------------- ### Configure Auto-Advancing Slides in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This snippet demonstrates how to set a presentation to automatically advance to the next slide after a specified delay using the `autoAdvanceDelay` metadata property. Note that changes require restarting `patat` if `--watch` is enabled. ```markdown --- title: Auto-advance, yes please author: John Doe patat: autoAdvanceDelay: 2 ... Hello World! --- This slide will be shown two seconds after the presentation starts. ``` -------------------------------- ### Executing Evaluated Code in Patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval01.md This snippet illustrates how to define a code block that Patat will execute during the presentation. The `eval` directive triggers the command, and based on the global configuration, its output may replace the code itself. ```bash echo foo ``` -------------------------------- ### Patat Bash Evaluation with Plain Text Output Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval-classes.md This snippet demonstrates how to configure `patat` to execute a bash command and treat its output as plain text. The `bash_plain` configuration ensures that the command's standard output is rendered as raw text without any special parsing or formatting. ```bash echo '{"foo": 1}' ``` -------------------------------- ### Patat Global Evaluation Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval01.md This YAML configuration defines the default behavior for `eval` blocks within Patat presentations. It specifies that `bash` should be used as the command interpreter, that the evaluated output should replace the original code block, and that the output should be revealed. ```yaml patat: eval: eval: command: bash replace: true reveal: true ``` -------------------------------- ### Configure Figlet Evaluator for ASCII Art Filtering Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration sets up a `figlet` evaluator. By setting `reveal: false` and `replace: true`, the original code block is hidden, and its output (ASCII art generated by `figlet`) replaces it, effectively 'filtering' the content. ```YAML --- patat: eval: figlet: command: figlet reveal: false replace: true ... ``` -------------------------------- ### Implicit Shell Evaluation in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval07.md Demonstrates a shell command executed using the 'shImplicit' evaluation mode in 'patat'. This mode implicitly evaluates the command, often replacing the code block with its output. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Displaying a Literal Bash Command in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval02.md This code snippet demonstrates a standard Bash `echo` command. In the context of `patat`, code blocks enclosed in triple backticks without a special directive (like `eval`) are displayed literally and are not executed. ```bash echo foo ``` -------------------------------- ### Implement Fragmented Slide Revelation in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md Patat offers multiple ways to reveal slide content incrementally. This includes setting `incrementalLists` to `true` for all lists, overriding `incrementalLists` for specific lists using block quotes, and inserting manual pauses with a '...' paragraph. ```markdown --- title: Presentation with incremental lists author: John Doe patat: incrementalLists: true ... - This list - is displayed - item by item ``` ```markdown --- title: Presentation with incremental lists author: John Doe patat: incrementalLists: true ... - This list - is displayed * item * by item - Or sometimes > * all at > * once ``` ```markdown Legen . . . wait for it . . . Dary! ``` -------------------------------- ### Executing Bash Code with patat's Eval Directive Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval03.md This snippet demonstrates how to use patat's 'eval' directive to execute a Bash command directly within the presentation. The output of the command would typically be rendered in the slide. ```bash echo foo ``` -------------------------------- ### Configure patat Pandoc Extensions Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/extentions0.md This YAML snippet defines the list of Pandoc extensions used by patat. It includes custom extensions like 'patat_extensions' and standard ones such as 'autolink_bare_uris' and 'emoji', which enhance document processing capabilities. ```YAML patat: pandocExtensions: - patat_extensions - autolink_bare_uris - emoji ``` -------------------------------- ### Inline Shell Evaluation in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval07.md Presents a shell command executed using the 'shInline' evaluation mode in 'patat'. This mode is designed for embedding command output directly within the text flow, often without displaying the command itself. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Patat Bash Evaluation with JSON Output Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval-classes.md This snippet illustrates how to configure `patat` to execute a bash command and interpret its output as JSON. The `bash_json` configuration ensures that the command's standard output is treated as a JSON fragment, suitable for further processing within `patat`. ```bash echo '{"foo": 1}' ``` -------------------------------- ### Executing a Bash Command with patat's eval Directive Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval02.md This snippet illustrates a Bash `echo` command marked with the `eval` directive. When processed by `patat`, this code block will be executed, and its output will replace the block itself, as configured by the `patat` system. ```bash echo foo ``` -------------------------------- ### None Container Shell Evaluation in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval07.md Shows a shell command executed with the 'shNone' evaluation mode in 'patat'. In this mode, the output of the command is not contained or formatted by 'patat' itself, allowing for raw output. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Executing Bash Code with Patat's Eval Directive Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval04.md Illustrates a bash code block marked with the 'eval' directive in 'patat', indicating that the code will be executed during the presentation rather than just displayed. The YAML configuration confirms that 'eval' commands are processed as 'bash'. ```bash echo foo ``` -------------------------------- ### Code Block Shell Evaluation in patat Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/eval07.md Illustrates a shell command executed within a 'code' container using the 'shCode' evaluation mode in 'patat'. This mode is typically used for displaying the code block itself while also evaluating it. ```Shell printf '\e[1;34m%-6s\e[m' "This is text" ``` -------------------------------- ### Configure Multiple Python Evaluators in Patat YAML Source: https://github.com/jaspervdj/patat/blob/main/README.md This YAML configuration defines two Python evaluators, `python2` and `python3`, each using their respective `python` commands. This allows `patat` to evaluate code blocks with specific Python versions based on their class attributes. ```YAML --- patat: eval: python2: command: python2 python3: command: python3 ... ``` -------------------------------- ### Filtering Even Numbers using Haskell List Comprehension Source: https://github.com/jaspervdj/patat/blob/main/extra/demo.md This snippet demonstrates a fundamental use of list comprehensions in Haskell to filter elements. It constructs a list of even numbers from 1 to 10 by iterating through the range and applying a modulo operation as a boolean filter. ```Haskell evens = [x | x <- [1..10], x `mod` 2 == 0] ``` -------------------------------- ### Disable Slide Numbers in Patat Presentations Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slidenumber.md This YAML configuration snippet, placed at the beginning of a Patat presentation file, disables the automatic display of slide numbers. Setting `slideNumber` to `false` under the `patat` key ensures that no slide numbers will be visible on any slide throughout the presentation. ```YAML patat: slideNumber: false ``` -------------------------------- ### Disable Slide Splitting in patat Configuration Source: https://github.com/jaspervdj/patat/blob/main/tests/golden/dump.in/slidelevel0.md This YAML configuration snippet demonstrates how to set the 'slideLevel' property to 0 within the 'patat' configuration. This specific setting ensures that slides are not automatically split, keeping all content on a single slide. ```YAML patat: slideLevel: 0 ``` -------------------------------- ### Disable Breadcrumbs Header in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This configuration snippet shows how to turn off the breadcrumbs-style header displayed by `patat`. Setting `breadcrumbs` to `false` in the `patat` YAML block removes the file path and title hierarchy from the presentation display. ```yaml patat: breadcrumbs: false ``` -------------------------------- ### Disable Slide Numbers in Patat Source: https://github.com/jaspervdj/patat/blob/main/README.md This configuration snippet demonstrates how to disable the slide number display in the bottom-right corner of `patat` presentations. Setting `slideNumber` to `false` in the `patat` YAML block removes this UI element. ```yaml patat: slideNumber: false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.