Ein frei kopier- und anpassbares Lehrmittel von eduskript.org

First Steps: Mathematics

One small lesson, start to finish: a typeset problem and an answer box that scores itself. Copy the markdown below onto a new page and adjust.

The markdown

## Solving a quadratic

Solve $x^2 - x - 6 = 0$ by factoring.

<question id="quad1" type="text" points="2" showFeedback="true">
Type both roots, separated by a comma (e.g. `1, 2`).

```expected ignore-whitespace
3, -2
```
</question>

What renders

Solving a quadratic

Solve x2x6=0x^2 - x - 6 = 0 by factoring.

The two parts

  • The math is plain KaTeX — $x^2 - x - 6 = 0$ inline, $$...$$ for a display equation.
  • The check is a free-text question (type="text") with an expected block: the student's typed answer is diffed against 3, -2. ignore-whitespace stops spacing around the comma from costing points. points="2" is the max score; showFeedback="true" shows the diff to the student right away — drop it for exams, where feedback stays hidden until the teacher grades.

That covers a numeric answer with partial credit. For sliders that auto-grade against a tolerance, and for scoring code that computes a math result, see Math and Graph Plotter and Code Editors & Scoring in the Components section.