From 6fe5baf09d0222b4e3546e29fd6897f857483755 Mon Sep 17 00:00:00 2001 From: Frank Fuhlbrück Date: Sat, 22 Jan 2022 16:29:41 +0100 Subject: started Lua interface --- examples/exshexample.tex | 43 +++++++++++++++++++++++++++++++++++++++++++ examples/lexercise.lua | 1 + 2 files changed, 44 insertions(+) create mode 120000 examples/lexercise.lua (limited to 'examples') diff --git a/examples/exshexample.tex b/examples/exshexample.tex index 1761154..3b34800 100644 --- a/examples/exshexample.tex +++ b/examples/exshexample.tex @@ -156,6 +156,49 @@ task restate font={\color{black!60}}, \restatetask Yeah, but what about the subtasks? I forgot the \restatetask[1] and the \restatetask[2] one. Or did I? \end{exercise} + + \begin{Lexercise} + --use [[]] if you need \ or escape it: "\\" + firstline = [[Assume $\pi=4$.]], + points=10, + name="Pragmatic", + options=[[main task font={\itshape}]], + task = [[ + This is the main task specified via the Lua + interface. + ]], + solution=[[ + This is a solution for the main task. + ]], + altsolutions={ + { + name="Alternative Solution", + text="This is also a solution." + },{ + idea=true, + text="This is also a solution." + } + }, + \end{Lexercise} + + \begin{Lexercise} + firstline = "Assume $e=3$.", + points="sum", + task = [[ + This exercise has some subexercises. + ]], + subexercises = { + { + task = "First things first.", + points = 4, + solution = [[None.]], + },{ + task = "Second things afterwards.", + points = 16, + altsolutions = { [[None.]],[[Yet.]] }, + } + } + \end{Lexercise} \end{sheet} diff --git a/examples/lexercise.lua b/examples/lexercise.lua new file mode 120000 index 0000000..660683f --- /dev/null +++ b/examples/lexercise.lua @@ -0,0 +1 @@ +../lexercise.lua \ No newline at end of file -- cgit v1.2.3