### ChooseDisplayMode for Notebook Layout Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use to toggle between normal, wide, and presentation modes in Pluto notebooks. Starts with both options unchecked by default. ```julia ChooseDisplayMode() # both unchecked by default ChooseDisplayMode(wide=true) # start in wide mode ChooseDisplayMode(wide=true, present=true) # start in presentation mode ``` -------------------------------- ### WidthOverDocs for Wide Layout Toggle Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A simplified toggle for controlling only the wide layout mode, without affecting presentation mode. Starts unchecked by default. ```julia WidthOverDocs() # unchecked WidthOverDocs(wide=true) # start in wide layout ``` -------------------------------- ### Get Preferred Text in Current Language Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use `preferred_text` to get a string value corresponding to the current language setting. It falls back to the first provided value if the current language is not found. ```julia set_language!(GermanGermany()) label = preferred_text((en="Introduction", de="Einführung", fr="Introduction")) # → "Einführung" # Fallback to English if current language not provided label2 = preferred_text((en="Summary", zh="总结")) # → "总结" when ChineseZH is active, "Summary" otherwise ``` -------------------------------- ### Display a collapsible pro-tip box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Wraps a tip admonition inside a `Foldable` (collapsible) widget. The invite text shown before the user expands it can be customized. Use `md"..."` for Markdown content. ```julia # Default invite text ("Want to see a pro tip?") protip(md"Use `eachindex` instead of `1:length(arr)` for safer iteration.") # Custom invite text protip(md"Use `view` to avoid copying subarrays.", "Want a performance tip?") ``` -------------------------------- ### Display a tip box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a styled "tip" admonition. Useful for extra information that isn't critical but helps understanding. Accepts Markdown or string content. ```julia tip(md"You can use `@time` to measure how long a function takes.") tip("Broadcasting with `.` applies a function element-wise to an array.") ``` -------------------------------- ### RobustLocalResource for Local-First Media Loading Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Loads media files by first attempting to serve from a local path. If the file is missing or empty, it downloads from a URL, caches it locally, and falls back to a remote Resource if caching is disabled. ```julia # Image: use local cache, download if missing RobustLocalResource( "https://example.com/images/diagram.png", "assets/diagram.png" ) # Video with HTML attributes, no local caching RobustLocalResource( "https://example.com/demo.mp4", "assets/demo.mp4", :width => "640", :autoplay => "", cache=false ) # Audio file RobustLocalResource( "https://example.com/audio/intro.mp3", "assets/intro.mp3", :controls => "" ) ``` -------------------------------- ### protip Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Wraps a tip admonition inside a Foldable (collapsible) widget. The invite text shown before the user expands it can be customized. ```APIDOC ## protip — Display a collapsible pro-tip box Wraps a tip admonition inside a `Foldable` (collapsible) widget. The invite text shown before the user expands it can be customized. ### Usage ```julia # Default invite text ("Want to see a pro tip?") protip(md"Use `eachindex` instead of `1:length(arr)` for safer iteration.") # Custom invite text protip(md"Use `view` to avoid copying subarrays.", "Want a performance tip?") ``` ``` -------------------------------- ### keyconcept Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Highlights a named key concept with its description. Takes two arguments: the concept name and its explanation. ```APIDOC ## keyconcept — Key concept box Highlights a named key concept with its description. Takes two arguments: the concept name and its explanation. ### Usage ```julia keyconcept("Big-O Notation", md"Big-O notation describes the upper bound of an algorithm's time complexity as input size grows.") ``` ``` -------------------------------- ### Highlight a key concept Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Highlights a named key concept with its description. Takes two arguments: the concept name (string) and its explanation (Markdown). ```julia keyconcept("Big-O Notation", md"Big-O notation describes the upper bound of an algorithm's time complexity as input size grows.") ``` -------------------------------- ### Configure Aside Panel Width Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Call `set_aside_width` once at the top of a notebook to configure the width (in pixels) for all `aside` panels. ```julia set_aside_width(350) # wider asides for longer annotations ``` -------------------------------- ### RobustLocalResource Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Attempts to serve a file from a local path. If the file is missing or empty, downloads it from the provided URL and caches it locally. Falls back to a remote `Resource` if `cache=false`. ```APIDOC ## `RobustLocalResource` — Local-first media loader with remote fallback Attempts to serve a file from a local path. If the file is missing or empty, downloads it from the provided URL and caches it locally. Falls back to a remote `Resource` if `cache=false`. ```julia # Image: use local cache, download if missing RobustLocalResource( "https://example.com/images/diagram.png", "assets/diagram.png" ) # Video with HTML attributes, no local caching RobustLocalResource( "https://example.com/demo.mp4", "assets/demo.mp4", :width => "640", :autoplay => "", cache=false ) # Audio file RobustLocalResource( "https://example.com/audio/intro.mp3", "assets/intro.mp3", :controls => "" ) ``` ``` -------------------------------- ### tip Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a styled 'tip' admonition, useful for extra information that isn't critical but helps understanding. ```APIDOC ## tip — Display a tip box Renders a styled "tip" admonition. Useful for extra information that isn't critical but helps understanding. ### Usage ```julia tip(md"You can use `@time` to measure how long a function takes.") tip("Broadcasting with `.` applies a function element-wise to an array.") ``` ``` -------------------------------- ### Display a question box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a styled question admonition to present a problem or prompt to the student. Accepts Markdown content. ```julia question_box(md"What is the time complexity of bubble sort? Explain your reasoning.") ``` -------------------------------- ### still_nothing Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Same as still_missing but for 'nothing' values. ```APIDOC ## still_nothing — Reminder to replace `nothing` Same as `still_missing` but for `nothing` values. ### Usage ```julia result = nothing if isnothing(result) still_nothing() end ``` ``` -------------------------------- ### Multi-Column Layouts Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use `Columns`, `TwoColumn`, and `ThreeColumn` to arrange content side-by-side using flexbox. Custom widths and gaps can be specified. ```julia # Auto equal-width columns Columns( hint(md"Column one"), md"Column two content", warning_box(md"Column three") ) # Custom widths and gap TwoColumnWideLeft( md""" ## Main Content Here is the primary explanation of the topic. """, tip(md"Side note: this also works for complex numbers.") ) # Full control Columns( md"Narrow", md"Wide Section", md"Narrow"; widths=[20, 60, 20], gap=1 ) ``` -------------------------------- ### question_box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a styled question admonition to present a problem or prompt to the student. ```APIDOC ## question_box — Question box Renders a styled question admonition to present a problem or prompt to the student. ### Usage ```julia question_box(md"What is the time complexity of bubble sort? Explain your reasoning.") ``` ``` -------------------------------- ### Register a Custom Language Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Register a new language by defining a custom `AbstractLanguage` subtype and implementing its methods. Use `register_language!` to make it available for use with `set_language!`. ```julia # Define a custom language (must implement all translation methods) struct PortugueseBR <: AbstractLanguage end PlutoTeachingTools.hint_str(::PortugueseBR) = "Dica" # ... implement all required methods ... register_language!("pt_br", PortugueseBR()) set_language!(PortugueseBR()) ``` -------------------------------- ### Display a collapsible answer box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Styled as an answer, this box is hidden until the student clicks to reveal it. Similar to `protip`, it accepts Markdown or string content and an optional custom invite text. ```julia # Default invite text answer_box(md"The answer is ``x = 42``.") # Custom invite answer_box(md"``f(x) = x^2 - 4x + 4``", "Click to reveal the solution") ``` -------------------------------- ### Display a collapsible hint box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a styled Markdown admonition of type "hint". Accepts any Markdown content and an optional language argument. Ensure the language is set correctly for internationalization. ```julia using PlutoTeachingTools # Basic hint with markdown content hint(md"Try using the `sum` function with a generator expression.") # With a string (auto-parsed to Markdown) hint("Remember: Julia arrays are 1-indexed.") # In a German notebook set_language!(GermanGermany()) hint(md"Verwende die `sum`-Funktion.") ``` -------------------------------- ### Feedback Boxes for Undefined Variables/Functions Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use `var_not_defined` and `func_not_defined` to display danger boxes indicating that a variable or function is not defined. These are useful for providing clear error messages to students. ```julia var_not_defined(:my_result) # → Danger box: "Variable my_result is not defined." func_not_defined(:my_function) # → Danger box: "Function my_function is not defined." ``` -------------------------------- ### Display a generic warning box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a generic "warning" admonition. Useful for important notices or instructions. Accepts Markdown content. ```julia warning_box(md"Do not modify the test cells below — they will be used for grading.") ``` -------------------------------- ### latexify_md for Markdown LaTeX Rendering Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Converts Latexify-compatible expressions into Markdown.LaTeX objects for display in Pluto. Requires the Latexify package. ```julia using Latexify expr = @latexify x^2 + 2x + 1 latexify_md(expr) # Works with symbolic expressions latexify_md(:(sin(x) / cos(x))) ``` -------------------------------- ### warning_box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A generic warning box. ```APIDOC ## warning_box — Generic warning box ```julia warning_box(md"Do not modify the test cells below — they will be used for grading.") ``` ``` -------------------------------- ### hint Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Displays a styled Markdown admonition of type 'hint'. Accepts any Markdown content and an optional language argument. ```APIDOC ## hint — Display a collapsible hint box Renders a styled Markdown admonition of type "hint". Accepts any Markdown content and an optional language argument. ### Usage ```julia using PlutoTeachingTools # Basic hint with markdown content hint(md"Try using the `sum` function with a generator expression.") # With a string (auto-parsed to Markdown) hint("Remember: Julia arrays are 1-indexed.") # In a German notebook set_language!(GermanGermany()) hint(md"Verwende die `sum`-Funktion.") ``` ``` -------------------------------- ### Sidebar Annotation Panel Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt The `aside` component displays content in a fixed-width panel to the right of the notebook, useful for annotations. An optional `v_offset` can shift it vertically. ```julia aside(tip(md"This formula is derived in the appendix.")) # Shift down by 50px relative to the current cell aside(md"**Note:** Units are in meters per second.", v_offset=50) ``` -------------------------------- ### present_button Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A button that triggers Pluto's presentation mode. Superseded by the built-in Pluto UI, but still available. ```APIDOC ## `present_button` — (Deprecated) Presentation mode button A button that triggers Pluto's presentation mode. Superseded by the built-in Pluto UI, but still available. ```julia present_button() ``` ``` -------------------------------- ### ChooseDisplayMode Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders checkboxes to toggle full-width mode (hides the LiveDocs sidebar) and presentation mode. Useful as a notebook header cell. ```APIDOC ## `ChooseDisplayMode` — Combined width + presentation toggle Renders checkboxes to toggle full-width mode (hides the LiveDocs sidebar) and presentation mode. Useful as a notebook header cell. ```julia ChooseDisplayMode() # both unchecked by default ChooseDisplayMode(wide=true) # start in wide mode ChooseDisplayMode(wide=true, present=true) # start in presentation mode ``` ``` -------------------------------- ### answer_box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Similar to protip, but styled as an answer. The box is hidden until the student clicks to reveal it. ```APIDOC ## answer_box — Display a collapsible answer box Like `protip`, but styled as an answer. The box is hidden until the student clicks to reveal it. ### Usage ```julia # Default invite text answer_box(md"The answer is ``x = 42``.") # Custom invite answer_box(md"``f(x) = x^2 - 4x + 4``", "Click to reveal the solution") ``` ``` -------------------------------- ### Work-in-Progress Marker Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt The `TODO` function renders a visually distinct banner to mark incomplete sections. It can be used with or without descriptive text, and with a custom heading. ```julia TODO() # plain TODO banner TODO("Add worked example for eigenvalues here") # with descriptive text TODO(; heading="FIXME", text="Off-by-one error in loop") ``` -------------------------------- ### Display an "Almost there" warning box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a "warning" admonition labelled to indicate the student is close but not quite right. Accepts Markdown content. ```julia almost(md"You have the right idea, but check your boundary conditions.") ``` -------------------------------- ### wrap_tex Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Wraps an existing LaTeXString (or any object with a `text/latex` MIME representation) into a `Markdown.LaTeX` for Pluto display. ```APIDOC ## `wrap_tex` — Wrap a LaTeXString for Markdown rendering Wraps an existing LaTeXString (or any object with a `text/latex` MIME representation) into a `Markdown.LaTeX` for Pluto display. ```julia using LaTeXStrings eq = L"\\frac{d}{dx}\\left[\\int_a^x f(t)\\!dt\\right] = f(x)" wrap_tex(eq) ``` ``` -------------------------------- ### almost Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders a 'warning' admonition labelled to indicate the student is close but not quite right. ```APIDOC ## almost — "Almost there" warning box Renders a `"warning"` admonition labelled to indicate the student is close but not quite right. ### Usage ```julia almost(md"You have the right idea, but check your boundary conditions.") ``` ``` -------------------------------- ### set_language! Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Changes the language used by all admonition labels, feedback messages, and UI strings globally for the notebook session. ```APIDOC ## `set_language!` — Set the notebook language Changes the language used by all admonition labels, feedback messages, and UI strings globally for the notebook session. ```julia using PlutoTeachingTools set_language!(GermanGermany()) # German set_language!(FrenchBelgium()) # French (Belgium) set_language!(ChineseZH()) # Chinese set_language!(SpanishES()) # Spanish set_language!(RussianRU()) # Russian set_language!(EnglishUS()) # English (default) # All subsequent calls use the new language: hint(md"Verwende `sum` für Vektoren.") # "Hinweis" label in German ``` ``` -------------------------------- ### present_button for Presentation Mode (Deprecated) Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A button to trigger Pluto's presentation mode. This is superseded by built-in Pluto UI elements but remains available. ```julia present_button() ``` -------------------------------- ### latexify_md Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Converts a Latexify-compatible expression to a `Markdown.LaTeX` object for display in Pluto cells. ```APIDOC ## `latexify_md` — Render a Latexify expression as Markdown LaTeX Converts a Latexify-compatible expression to a `Markdown.LaTeX` object for display in Pluto cells. ```julia using Latexify expr = @latexify x^2 + 2x + 1 latexify_md(expr) # Works with symbolic expressions latexify_md(:(sin(x) / cos(x))) ``` ``` -------------------------------- ### Display a reminder to replace `nothing` Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Similar to `still_missing`, this shows a warning admonition reminding the student to replace a `nothing` value. Useful for checking if a result has been computed. ```julia result = nothing if isnothing(result) still_nothing() end ``` -------------------------------- ### wrap_tex for LaTeXString Markdown Rendering Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Wraps a LaTeXString or any object with a 'text/latex' MIME representation into a Markdown.LaTeX object for Pluto display. Requires the LaTeXStrings package. ```julia using LaTeXStrings eq = L"\frac{d}{dx}\left[\int_a^x f(t)\,dt\right] = f(x)" wrap_tex(eq) ``` -------------------------------- ### WidthOverDocs Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A simpler checkbox that only controls the full-width toggle (no presentation mode). ```APIDOC ## `WidthOverDocs` — Wide layout toggle only A simpler checkbox that only controls the full-width toggle (no presentation mode). ```julia WidthOverDocs() # unchecked WidthOverDocs(wide=true) # start in wide layout ``` ``` -------------------------------- ### correct Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Displays a randomized positive message (e.g., 'Great job!', 'Correct!') in a success admonition. The message can be overridden. ```APIDOC ## correct — Correct answer celebration box Displays a randomized positive message (e.g., "Great job!", "Correct!") in a success admonition. The message can be overridden. ### Usage ```julia # Random positive message correct() # Custom message correct(md"Perfect! You correctly identified the edge case.") ``` ``` -------------------------------- ### set_language! for Notebook Internationalization Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Globally changes the language for admonition labels, feedback messages, and UI strings within a Pluto notebook session. Requires the PlutoTeachingTools package. ```julia using PlutoTeachingTools set_language!(GermanGermany()) # German set_language!(FrenchBelgium()) # French (Belgium) set_language!(ChineseZH()) # Chinese set_language!(SpanishES()) # Spanish set_language!(RussianRU()) # Russian set_language!(EnglishUS()) # English (default) # All subsequent calls use the new language: hint(md"Verwende `sum` für Vektoren.") # "Hinweis" label in German ``` -------------------------------- ### FootnotesNumbered for Inline and Bottom Footnotes Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Combines inline and bottom-numbered footnotes using standard Pluto markdown syntax. Call this once at the top of your notebook. ```julia FootnotesNumbered() # Then use standard Pluto markdown footnote syntax: md""" This is a claim.[^footnote1] [^footnote1]: Supporting reference or explanation here. """ ``` -------------------------------- ### Type-Checking Helpers Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Boolean helpers `type_isa` and `type_eq` are useful for checking variable types within answer-checking logic. `type_eq` can check against multiple types. ```julia x = 3.14 type_isa(x, AbstractFloat) # true type_eq(x, Float64) # true type_isa(x, Integer) # false type_eq(x, [Float32, Float64]) # true (checks multiple types) ``` -------------------------------- ### confetti Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Fires a full-screen confetti animation every time the cell is evaluated. Must be the return value of a cell (or the last expression in a `let` block). ```APIDOC ## `confetti` — Full-screen confetti animation Fires a full-screen confetti animation every time the cell is evaluated. Must be the return value of a cell (or the last expression in a `let` block). ```julia # Celebrate when a student's answer is correct student_answer = 42 if student_answer == 42 confetti() else keep_working() end ``` ``` -------------------------------- ### still_missing Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Shows a warning admonition reminding the student to replace a 'missing' value with their answer. ```APIDOC ## still_missing — Reminder to replace `missing` Shows a warning admonition reminding the student to replace a `missing` value with their answer. ### Usage ```julia # Use in answer-checking cells x = missing # student hasn't answered yet if ismissing(x) still_missing() else x^2 end ``` ``` -------------------------------- ### @widemath_str Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Uses PlutoUI's `WideCell` to render a LaTeX math expression that may be too wide for the normal notebook column. Overflowing content becomes horizontally scrollable. ```APIDOC ## `@widemath_str` — Render wide math in a scrollable wide cell Uses PlutoUI's `WideCell` to render a LaTeX math expression that may be too wide for the normal notebook column. Overflowing content becomes horizontally scrollable. ```julia widemath""" \\int_{-\\infty}^{\\infty} e^{-x^2}\\!dx = \\sqrt{\\pi} + \\text{(some very long annotation that would overflow the cell width)} """ ``` ``` -------------------------------- ### Visual Section Outline Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt The `section_outline` function renders a styled header with a colored vertical border to visually group subsequent cells. The header level and color can be customized. ```julia section_outline("Exercise:", "Fibonacci Sequence") section_outline("Demo:", "Matrix Decomposition"; color="blue", big=true) section_outline("Part 1:", "Setup"; color="#e74c3c", header_level=3) ``` -------------------------------- ### Conditionally Displaying Feedback Messages Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use `display_msg_if_fail` to conditionally display the `.msg` field of a `(; passed, msg)` named tuple only when `passed` is `false`. An optional `msg_pass` argument can be provided for the success case. ```julia result = check_type_eq(:x, x, Int64) display_msg_if_fail(result) # silent if correct display_msg_if_fail(result; msg_pass=correct()) # shows correct() if passed ``` -------------------------------- ### Styled Blockquote Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt The `blockquote` function renders a visually appealing blockquote with large quotation marks and an optional attribution line. ```julia blockquote( "Programs must be written for people to read, and only incidentally for machines to execute.", "— Harold Abelson" ) ``` -------------------------------- ### Display a danger/error box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A strongly styled admonition for critical warnings or errors. Accepts Markdown content. ```julia danger(md"Never share your API keys in public notebooks!") ``` -------------------------------- ### Display a "Keep working" feedback box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A danger admonition signalling the answer is wrong and the student should keep trying. Can be used with a custom message. ```julia x = 7 # student's answer if x == 42 correct() else keep_working() end # With custom message keep_working(md"Check your loop — it may not be iterating over all elements.") ``` -------------------------------- ### Display a reminder to replace `missing` Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Shows a warning admonition reminding the student to replace a `missing` value with their answer. Typically used in answer-checking cells. ```julia # Use in answer-checking cells x = missing # student hasn't answered yet if ismissing(x) still_missing() else x^2 end ``` -------------------------------- ### Injecting Type Checking Functions Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Evaluate `PlutoTeachingTools.code_for_check_type_funcs` once at the top of a notebook to define `check_type_isa` and `check_type_eq` functions. These functions return a named tuple `(; passed, msg)` for use in answer-checking cells. ```julia # Run once at the top of a notebook: eval(Meta.parse(PlutoTeachingTools.code_for_check_type_funcs)) # Then in answer-checking cells: student_answer = 3.14 result = check_type_isa(:student_answer, student_answer, AbstractFloat) display_msg_if_fail(result) # → nothing (if passed), or a styled admonition (if failed) ``` -------------------------------- ### FootnotesInlineStyleSuperscript / FootnotesInlineStyleSubscript / FootnotesInlineStyleBaseline Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Control the vertical alignment of inline footnote markers. ```APIDOC ### `FootnotesInlineStyleSuperscript` / `FootnotesInlineStyleSubscript` / `FootnotesInlineStyleBaseline` — Footnote positioning styles Control the vertical alignment of inline footnote markers. ```julia FootnotesInlineStyleSuperscript() # raised superscript: text¹ FootnotesInlineStyleSubscript() # lowered subscript: text₁ FootnotesInlineStyleBaseline() # normal baseline (default Pluto behavior) ``` ``` -------------------------------- ### danger Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A strongly styled admonition for critical warnings or errors. ```APIDOC ## danger — Danger/error box A strongly styled admonition for critical warnings or errors. ### Usage ```julia danger(md"Never share your API keys in public notebooks!") ``` ``` -------------------------------- ### keep_working Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt A danger admonition signalling the answer is wrong and the student should keep trying. ```APIDOC ## keep_working — "Keep working" feedback box A danger admonition signalling the answer is wrong and the student should keep trying. ### Usage ```julia x = 7 # student's answer if x == 42 correct() else keep_working() end # With custom message keep_working(md"Check your loop — it may not be iterating over all elements.") ``` ``` -------------------------------- ### Collapsible Content Wrapper Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt The `Foldable` component wraps content in a collapsible `
` element, with the title always visible and the content toggling on click. Admonitions can be nested inside. ```julia Foldable("Show derivation", md""" Starting from ``E = mc^2``... Therefore the result follows. """) # Nest admonitions inside Foldable("Hint (click to expand)", hint(md"Try integration by parts.")) ``` -------------------------------- ### FootnotesInlineNumbered / FootnotesBottomNumbered Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use independently if you only need one half of the footnote numbering system. ```APIDOC ### `FootnotesInlineNumbered` / `FootnotesBottomNumbered` — Separate footnote styles Use independently if you only need one half of the footnote numbering system. ```julia # Only number the inline references FootnotesInlineNumbered() # Only number the bottom definitions FootnotesBottomNumbered() ``` ``` -------------------------------- ### Separate Footnote Styles Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use independently if you only need either inline or bottom-numbered footnotes. FootnotesInlineNumbered() only numbers inline references, while FootnotesBottomNumbered() only numbers bottom definitions. ```julia # Only number the inline references FootnotesInlineNumbered() # Only number the bottom definitions FootnotesBottomNumbered() ``` -------------------------------- ### FootnotesNumbered Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Combines `FootnotesInlineNumbered` and `FootnotesBottomNumbered` to display `[1]`-style numbered footnotes both inline and at the bottom of the notebook. Call once at the top of the notebook. ```APIDOC ## `FootnotesNumbered` — Numbered inline and bottom footnotes Combines `FootnotesInlineNumbered` and `FootnotesBottomNumbered` to display `[1]`-style numbered footnotes both inline and at the bottom of the notebook. Call once at the top of the notebook. ```julia FootnotesNumbered() # Then use standard Pluto markdown footnote syntax: md""" This is a claim.[^footnote1] [^footnote1]: Supporting reference or explanation here. """ ``` ``` -------------------------------- ### Footnote Inline Positioning Styles Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Control the vertical alignment of inline footnote markers. Options include superscript (raised), subscript (lowered), or baseline (default Pluto behavior). ```julia FootnotesInlineStyleSuperscript() # raised superscript: text¹ FootnotesInlineStyleSubscript() # lowered subscript: text₁ FootnotesInlineStyleBaseline() # normal baseline (default Pluto behavior) ``` -------------------------------- ### Display a correct answer celebration box Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Displays a randomized positive message (e.g., "Great job!", "Correct!") in a success admonition. The message can be overridden with custom Markdown content. ```julia # Random positive message correct() # Custom message correct(md"Perfect! You correctly identified the edge case.") ``` -------------------------------- ### widemath_str for Wide, Scrollable Math Cells Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Renders wide LaTeX math expressions within a scrollable cell using PlutoUI's WideCell. Useful for content that might overflow the normal notebook column. ```julia widemath"" \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi} + \text{(some very long annotation that would overflow the cell width)} "" ``` -------------------------------- ### confetti for Celebration Animation Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Triggers a full-screen confetti animation upon cell evaluation. This must be the return value of a cell or the last expression in a let block. ```julia # Celebrate when a student's answer is correct student_answer = 42 if student_answer == 42 confetti() else keep_working() end ``` -------------------------------- ### Feedback Boxes for Wrong Type Source: https://context7.com/juliapluto/plutoteachingtools.jl/llms.txt Use `wrong_type` to check if a variable has an unexpected type and display a danger admonition. It can be used generically or with specific variable and expected type information. ```julia # Generic (no variable info) wrong_type() # Informative: specify what variable and expected type wrong_type(:my_answer, Float64) # → "my_answer should be of type Float64." ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.