From c2fa90426920acd4af4e2218e259143174bdefa4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:02:52 +0000 Subject: [PATCH 1/5] Initial plan From 4b8744fb885dfca522c911749c6af9d34a5357e4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:19:31 +0000 Subject: [PATCH 2/5] Extend slidebreak shortcode to all slide deck formats using slides alias Agent-Logs-Url: https://github.com/UCD-SERG/rpt/sessions/e64d46ce-3ade-4f78-ae2e-39953f2b8c92 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com> --- NEWS.md | 2 ++ altdoc/_extensions/slidebreak/README.md | 6 +++--- altdoc/_extensions/slidebreak/slidebreak.lua | 13 +++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index db48a7fa..dca183da 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # rpt (development version) +* Extended `slidebreak` shortcode to support all slide deck formats (RevealJS, PowerPoint, Beamer) using the Quarto `slides` format alias (#103) + * Switched from pkgdown to altdoc for documentation generation. Now using Quarto Website for documentation with native math equation support via MathJax. * Removed pkgdown-specific configurations and workflows. * Retained RevealJS multi-format support for Quarto vignettes and articles. diff --git a/altdoc/_extensions/slidebreak/README.md b/altdoc/_extensions/slidebreak/README.md index 24a1202f..70097e00 100644 --- a/altdoc/_extensions/slidebreak/README.md +++ b/altdoc/_extensions/slidebreak/README.md @@ -8,7 +8,7 @@ This extension is included in the repository. It will be automatically available ## When to Use -Use this extension when you need to create presentations (RevealJS or PowerPoint) from Quarto documents and want to insert slide breaks without titles. This is particularly useful for separating content into distinct slides during presentations. +Use this extension when you need to create presentations (RevealJS, PowerPoint, or Beamer) from Quarto documents and want to insert slide breaks without titles. This is particularly useful for separating content into distinct slides during presentations. **Note**: This extension only affects presentation formats. When rendering to HTML or DOCX for documentation, the shortcode has no effect. @@ -40,7 +40,7 @@ More content here. ## Behavior -- **RevealJS and PowerPoint formats**: Inserts a slide break (`---`), creating a new slide without a title +- **All slide deck formats (RevealJS, PowerPoint, Beamer)**: Inserts a slide break (`---`), creating a new slide without a title - **HTML and DOCX formats**: Does nothing (the shortcode is silently ignored) ## Example @@ -57,7 +57,7 @@ Welcome to the presentation! Here's the main content on a new slide. ``` -In RevealJS or PowerPoint, this will create: +In any slide format (RevealJS, PowerPoint, or Beamer), this will create: 1. A slide titled "Introduction" with content 2. A new blank/untitled slide (from the slidebreak) 3. A slide titled "Main Content" diff --git a/altdoc/_extensions/slidebreak/slidebreak.lua b/altdoc/_extensions/slidebreak/slidebreak.lua index fdde3957..d4b8d852 100644 --- a/altdoc/_extensions/slidebreak/slidebreak.lua +++ b/altdoc/_extensions/slidebreak/slidebreak.lua @@ -1,18 +1,19 @@ -- slidebreak.lua --- A Quarto shortcode that inserts a slide break in revealjs and powerpoint formats --- but does nothing in docx and html formats +-- A Quarto shortcode that inserts a slide break in all slide deck formats +-- (revealjs, pptx/powerpoint, beamer) but does nothing in docx and html formats function slidebreak() -- Get the current output format local format = quarto.doc.is_format - -- Insert slide break for revealjs and powerpoint/pptx formats - if format("revealjs") or format("pptx") or format("powerpoint") then - -- Use HorizontalRule which creates a slide separator in RevealJS + -- Insert slide break for all slide/presentation formats + -- The "slides" alias matches revealjs, pptx/powerpoint, beamer, and any future slide formats + if format("slides") then + -- Use HorizontalRule which creates a slide separator in presentation formats return pandoc.HorizontalRule() end - -- Return empty for html and docx formats (and any other format) + -- Return empty for html and docx formats (and any other non-presentation format) return pandoc.Null() end From fed449b1d1b521ab6fd2def3d72be024bf2b7a8a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:28:17 +0000 Subject: [PATCH 3/5] Fix slidebreak.lua comments: remove invalid 'powerpoint' format name, keep pptx Agent-Logs-Url: https://github.com/UCD-SERG/rpt/sessions/85d0a7b2-435d-48b4-96ab-7022a479b845 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com> --- altdoc/_extensions/slidebreak/slidebreak.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/altdoc/_extensions/slidebreak/slidebreak.lua b/altdoc/_extensions/slidebreak/slidebreak.lua index d4b8d852..05ec0a3a 100644 --- a/altdoc/_extensions/slidebreak/slidebreak.lua +++ b/altdoc/_extensions/slidebreak/slidebreak.lua @@ -1,13 +1,13 @@ -- slidebreak.lua -- A Quarto shortcode that inserts a slide break in all slide deck formats --- (revealjs, pptx/powerpoint, beamer) but does nothing in docx and html formats +-- (revealjs, pptx, beamer) but does nothing in docx and html formats function slidebreak() -- Get the current output format local format = quarto.doc.is_format -- Insert slide break for all slide/presentation formats - -- The "slides" alias matches revealjs, pptx/powerpoint, beamer, and any future slide formats + -- The "slides" alias matches revealjs, pptx, beamer, and any future slide formats if format("slides") then -- Use HorizontalRule which creates a slide separator in presentation formats return pandoc.HorizontalRule() From c9d73bb2d8f6d59ad33769e015b4ca02558dd002 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 02:18:50 +0000 Subject: [PATCH 4/5] Add link to Quarto lua API docs for is_format and slides alias Agent-Logs-Url: https://github.com/UCD-SERG/rpt/sessions/466274cc-56f5-444d-825c-20d0a64d4a23 Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com> --- altdoc/_extensions/slidebreak/slidebreak.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/altdoc/_extensions/slidebreak/slidebreak.lua b/altdoc/_extensions/slidebreak/slidebreak.lua index 05ec0a3a..a407298d 100644 --- a/altdoc/_extensions/slidebreak/slidebreak.lua +++ b/altdoc/_extensions/slidebreak/slidebreak.lua @@ -4,10 +4,12 @@ function slidebreak() -- Get the current output format + -- See: https://quarto.org/docs/extensions/lua-api.html#format-detection local format = quarto.doc.is_format -- Insert slide break for all slide/presentation formats -- The "slides" alias matches revealjs, pptx, beamer, and any future slide formats + -- See: https://quarto.org/docs/extensions/lua-api.html#format-detection if format("slides") then -- Use HorizontalRule which creates a slide separator in presentation formats return pandoc.HorizontalRule() From 4bfb9520279f9089de5e2d36bd9700843d3b584e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 02:48:16 +0000 Subject: [PATCH 5/5] Fix slidebreak.lua: use explicit revealjs/pptx/beamer checks instead of invalid slides alias Agent-Logs-Url: https://github.com/UCD-SERG/rpt/sessions/91b3f37d-4ef9-414c-b88f-36dc009e8ccd Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com> --- altdoc/_extensions/slidebreak/slidebreak.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/altdoc/_extensions/slidebreak/slidebreak.lua b/altdoc/_extensions/slidebreak/slidebreak.lua index a407298d..0aa9ce96 100644 --- a/altdoc/_extensions/slidebreak/slidebreak.lua +++ b/altdoc/_extensions/slidebreak/slidebreak.lua @@ -7,10 +7,8 @@ function slidebreak() -- See: https://quarto.org/docs/extensions/lua-api.html#format-detection local format = quarto.doc.is_format - -- Insert slide break for all slide/presentation formats - -- The "slides" alias matches revealjs, pptx, beamer, and any future slide formats - -- See: https://quarto.org/docs/extensions/lua-api.html#format-detection - if format("slides") then + -- Insert slide break for all slide/presentation formats (revealjs, pptx, beamer) + if format("revealjs") or format("pptx") or format("beamer") then -- Use HorizontalRule which creates a slide separator in presentation formats return pandoc.HorizontalRule() end