mirror of
https://github.com/benjaminion/upgrading-ethereum-book.git
synced 2026-01-09 14:38:08 -05:00
PDF: Simplify summary box handling
This commit is contained in:
@@ -2,18 +2,9 @@
|
||||
--
|
||||
-- Find summary boxes in the text and wrap them in a `summarybox` environment.
|
||||
|
||||
local function is_summary(div)
|
||||
for _, class in pairs(div.classes) do
|
||||
if class == 'summary' then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function Div (div)
|
||||
|
||||
if is_summary(div) then
|
||||
if div.classes:includes('summary') then
|
||||
return {
|
||||
pandoc.RawInline('latex', '\\begin{summarybox}'),
|
||||
div,
|
||||
|
||||
Reference in New Issue
Block a user