Skip to content

Commit 184d313

Browse files
committed
long-format back to narration to contrast with new tag names
1 parent d49c49c commit 184d313

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

web_and_slides.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- web_and_slides.lua
22
-- Combined filter for dual html + revealjs Quarto modules:
3-
-- * Div : `::: {.long-format}` -> speaker notes on revealjs, plain prose elsewhere.
3+
-- * Div : `::: {.narration}` -> speaker notes on revealjs, plain prose elsewhere.
44
-- `::: {.slides-only}` -> revealjs slides only: dropped elsewhere
55
-- (equivalent to `::: {.content-visible when-format="revealjs"}`)
66
-- `::: {.html-only}` -> html only: dropped on revealjs slides
@@ -33,11 +33,11 @@ function Div(el)
3333
end
3434
return el.content
3535
end
36-
if not el.classes:includes("long-format") then
36+
if not el.classes:includes("narration") then
3737
return nil -- leave every other div alone
3838
end
3939
if quarto.doc.is_format("revealjs") then
40-
el.classes = el.classes:filter(function(c) return c ~= "long-format" end)
40+
el.classes = el.classes:filter(function(c) return c ~= "narration" end)
4141
el.classes:insert("notes") -- Pandoc emits <aside class="notes">
4242
return el
4343
end

web_and_slides.r

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
# Prepare a long-form Quarto module for dual html + revealjs rendering:
44
# 1. Wrap each run of consecutive prose paragraphs in a single
5-
# `::: {.long-format}` block (speaker notes on slides via
6-
# web_and_slides.lua, normal prose on the website).
5+
# `::: {.narration}` block (speaker notes on slides via Lua filter,
6+
# plain prose elsewhere).
77
# 2. Register the Lua filter (defaults to "web_and_slides_autogenerated.lua")
88
# in the front matter if it isn't there.
99
# 3. Ensure slide-friendly YAML: execute.echo and execute.output-location
@@ -48,7 +48,7 @@ if (length(lines) > 0 && str_detect(lines[[1]], "^---\\s*$")) {
4848
}
4949
fm_len_orig <- length(yaml) # original front-matter length, before any edits below
5050

51-
# --- wrap prose paragraphs in .long-format -------------------------------------
51+
# --- wrap prose paragraphs in .narration -------------------------------------
5252
out <- character()
5353
para <- character()
5454
in_code <- FALSE
@@ -61,7 +61,7 @@ flush <- function() {
6161
gap <<- FALSE
6262
if (length(para) == 0) return(invisible())
6363
if (!last_blank()) out[[length(out) + 1]] <<- ""
64-
out <<- c(out, "::: {.long-format}", para, ":::", "")
64+
out <<- c(out, "::: {.narration}", para, ":::", "")
6565
para <<- character()
6666
}
6767

0 commit comments

Comments
 (0)