diff options
| author | Frank Fuhlbrück | 2022-01-22 16:29:41 +0100 |
|---|---|---|
| committer | Frank Fuhlbrück | 2022-01-22 16:29:41 +0100 |
| commit | 6fe5baf09d0222b4e3546e29fd6897f857483755 (patch) | |
| tree | 9b99bf6f54d80623ab27a479e5335ee09c27eab1 /examples | |
| parent | 11ff8b0b78e054742de03c54e79dfba475e5c75b (diff) | |
| download | exercisesheets-6fe5baf09d0222b4e3546e29fd6897f857483755.tar.gz exercisesheets-6fe5baf09d0222b4e3546e29fd6897f857483755.tar.bz2 exercisesheets-6fe5baf09d0222b4e3546e29fd6897f857483755.zip | |
started Lua interface
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/exshexample.tex | 43 | ||||
| l--------- | examples/lexercise.lua | 1 |
2 files changed, 44 insertions, 0 deletions
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 |
