summaryrefslogtreecommitdiff
path: root/_extensions/js/multicol-nohead/multicol-nohead.lua
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-06-13 21:46:42 +0200
committerJonas Smedegaard <dr@jones.dk>2025-06-13 21:46:42 +0200
commita3d08bfd57de7ce619f4157a3245f9071b38356c (patch)
treec90a0883c28f0b9437bc1184f371a321f2251676 /_extensions/js/multicol-nohead/multicol-nohead.lua
parent9132e4754d50bc8cd773577194abac90562553af (diff)
support raw \end{multicols}
Diffstat (limited to '_extensions/js/multicol-nohead/multicol-nohead.lua')
-rw-r--r--_extensions/js/multicol-nohead/multicol-nohead.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/_extensions/js/multicol-nohead/multicol-nohead.lua b/_extensions/js/multicol-nohead/multicol-nohead.lua
index d74e87a..67c2f15 100644
--- a/_extensions/js/multicol-nohead/multicol-nohead.lua
+++ b/_extensions/js/multicol-nohead/multicol-nohead.lua
@@ -31,6 +31,10 @@ local function is_columnar_header(elem)
return elem.t == "Header" and elem.level == 1
end
+local function is_multicols_end(elem)
+ return elem.t == "RawBlock" and elem.text == "\\end{multicols}"
+end
+
-- a standalone image with optional caption that has class .wide
-- TODO: detect pre-quarto-filter pattern too
local function is_wide(elem)
@@ -126,6 +130,8 @@ function Pandoc(doc)
multicol_places[i] = "end"
multicol_now = false
end
+ elseif is_multicols_end(elem) then
+ multicol_now = false
end
end
if multicol_now then