--- div-class-to-env.lua – filter to convert classes to LaTeX environments --- --- Copyright: © 2026 Florian Fischer --- License: MIT – see LICENSE file for details if FORMAT:match('beamer') then function Div(d) -- ignore code blocks which are not of class "env". if not d.classes:includes 'env' then return end local env for _, v in ipairs(d.classes) do if v ~= 'env' then env = v break end end if not env then return end return { pandoc.RawInline('latex', '\\begin{'..env..'}'), d, pandoc.RawInline('latex', '\\end{'..env..'}') } end end