Add LaTeX model from virli course
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
917a307d25
commit
313597aede
5 changed files with 108 additions and 5 deletions
47
tutorial/colored-blocks.lua
Normal file
47
tutorial/colored-blocks.lua
Normal file
|
@ -0,0 +1,47 @@
|
|||
function Div(el)
|
||||
if el.classes[1] == "warning"
|
||||
then
|
||||
-- insert element in front
|
||||
table.insert(
|
||||
el.content, 1,
|
||||
pandoc.RawBlock("latex", "\\noindent\\begin{alertbox}"))
|
||||
-- insert element at the back
|
||||
table.insert(
|
||||
el.content,
|
||||
pandoc.RawBlock("latex", "\\end{alertbox}"))
|
||||
|
||||
elseif el.classes[1] == "code"
|
||||
then
|
||||
-- insert element in front
|
||||
table.insert(
|
||||
el.content, 1,
|
||||
pandoc.RawBlock("latex", "\\noindent\\begin{codebox}"))
|
||||
-- insert element at the back
|
||||
table.insert(
|
||||
el.content,
|
||||
pandoc.RawBlock("latex", "\\end{codebox}"))
|
||||
|
||||
elseif el.classes[1] == "question"
|
||||
then
|
||||
-- insert element in front
|
||||
table.insert(
|
||||
el.content, 1,
|
||||
pandoc.RawBlock("latex", "\\noindent\\begin{questionbox}"))
|
||||
-- insert element at the back
|
||||
table.insert(
|
||||
el.content,
|
||||
pandoc.RawBlock("latex", "\\end{questionbox}"))
|
||||
|
||||
elseif el.classes[1] == "more"
|
||||
then
|
||||
-- insert element in front
|
||||
table.insert(
|
||||
el.content, 1,
|
||||
pandoc.RawBlock("latex", "\\begin{morebox}"))
|
||||
-- insert element at the back
|
||||
table.insert(
|
||||
el.content,
|
||||
pandoc.RawBlock("latex", "\\end{morebox}"))
|
||||
end
|
||||
return el
|
||||
end
|
Reference in a new issue