Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gmcninch-tufts
GitHub Repository: gmcninch-tufts/2024-Sp-Math190
Path: blob/main/build-assets/color-sols.lua
904 views
1
function Div(el)
2
3
if el.classes:includes("solution") then
4
-- insert element in front
5
table.insert(
6
el.content, 1,
7
pandoc.RawBlock("latex", "\\vspace{5mm} \\color{red} \\hrule \\vspace{2mm} \\noindent \\textsc{Solution}: \\par"))
8
-- insert element at the back
9
table.insert(
10
el.content,
11
pandoc.RawBlock("latex", "\\vspace{5mm} \\hrule \\color{black} \\vspace{5mm}"))
12
end
13
return el
14
end
15
16