Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up
Scientific web 10 min

Pedagogical blocks — exercises, corrections, methods

These mathpad tags structure what a teacher offers to a student: exercises, collapsible corrections, step-by-step methods, intro activities and interactive quizzes. Each block has its own style and is auto-numbered per category.

Block overview

<mp-exercise>An exercise, numbered Exercise 1, 2, 3… Accepts a <mp-title> as first child, with optional duration and difficulty attributes.
<mp-statement>The statement of an exercise — typically a direct child of <mp-exercise>.
<mp-correction>A collapsible correction — folded by default, opens on click. Placed inside an <mp-exercise> or right after.
<mp-method>A method block — step-by-step procedure, often a numbered list with a concrete application example.
<mp-activity>An intro activity — guided exploration introducing a concept before its formal definition.
<mp-quiz>An interactive quiz with clickable answers and immediate feedback — contains one <mp-question> and several <mp-answer> (right ones marked with the correct attribute).
<mp-blank>Splits the document into progressively-revealed sections — perfect for a fill-in-the-blank lecture in class: the student has an empty document, the teacher reveals each block with a click on the board.

<mp-exercise> + <mp-statement> + <mp-correction>

The standard trio for a complete exercise: title, statement, collapsible correction. The exercise is auto-numbered per chapter (Exercise 1, 2, 3…). Optional attributes duration="10 min" and difficulty="2" (1 to 4) appear in the header.

HTML
<mp-exercise duration="10 min" difficulty="2">
  <mp-title>First quadratic polynomial</mp-title>

  <mp-statement>
    Let $f(x) = 2x^2 - 4x + 1$.    <ol>
      <li>Compute the discriminant $\Delta$.</li>
      <li>Deduce the solutions of $f(x) = 0$.</li>
    </ol>
  </mp-statement>

  <mp-correction>
    <p><strong>1.</strong> $\Delta = (-4)^2 - 4 \times 2 \times 1 = 16 - 8 = 8$.</p>
    <p><strong>2.</strong> Since $\Delta > 0$, two real solutions:</p>
    $$\left\{\begin{array}{rcl}
      x_1 & = & \dfrac{4 - 2\sqrt{2}}{4} = \dfrac{2 - \sqrt{2}}{2} \\[6pt]
      x_2 & = & \dfrac{4 + 2\sqrt{2}}{4} = \dfrac{2 + \sqrt{2}}{2}
    \end{array}\right.$$
  </mp-correction>
</mp-exercise>
Output First quadratic polynomial Let $f(x) = 2x^2 - 4x + 1$.
  1. Compute the discriminant $\Delta$.
  2. Deduce the solutions of $f(x) = 0$.

1. $\Delta = (-4)^2 - 4 \times 2 \times 1 = 16 - 8 = 8$.

2. Since $\Delta > 0$, two real solutions:

$$\left\{\begin{array}{rcl} x_1 & = & \dfrac{4 - 2\sqrt{2}}{4} = \dfrac{2 - \sqrt{2}}{2} \\[6pt] x_2 & = & \dfrac{4 + 2\sqrt{2}}{4} = \dfrac{2 + \sqrt{2}}{2}\end{array}\right.$$
Multiple questions per exercise Use an HTML <ol> list or a numbered enumeration inside <mp-statement> to separate the questions of an exercise. For sub-questions, nest a second <ol> (it auto-switches to a), b), c)).

<mp-method> — method block

A method block summarizes a reusable procedure — typically a numbered list, sometimes followed by a concrete example.

HTML
<mp-method>
  <mp-title>Solve a quadratic equation</mp-title>
  <ol>
    <li>Write the equation in the form $ax^2 + bx + c = 0$.</li>
    <li>Compute $\Delta = b^2 - 4ac$.</li>
    <li>Conclude based on the sign of $\Delta$: 0, 1 or 2 solutions.</li>
  </ol>
</mp-method>
Output Solve a quadratic equation
  1. Write the equation in the form $ax^2 + bx + c = 0$.
  2. Compute $\Delta = b^2 - 4ac$.
  3. Conclude based on the sign of $\Delta$: 0, 1 or 2 solutions.

<mp-activity> — intro activity

Placed classically before the definition, an activity lets the student discover the concept on their own before it is formalized.

HTML
<mp-activity>
  <mp-title>Discover the square root</mp-title>
  <ol>
    <li>Compute $1^2$, $2^2$, $3^2$, $4^2$.</li>
    <li>What number squared gives 25?</li>
    <li>Conjecture the result for 64, then for 2 (surprising!).</li>
  </ol>
</mp-activity>
Output Discover the square root
  1. Compute $1^2$, $2^2$, $3^2$, $4^2$.
  2. What number squared gives 25?
  3. Conjecture the result for 64, then for 2 (surprising!).

<mp-quiz> — interactive quiz (MCQ)

A quiz contains exactly one <mp-question> (the prompt) and several <mp-answer> (the choices). Mark the right answer with the boolean attribute correct. On the first click, the quiz locks: the chosen answer turns green/red, and if wrong, the correct answer is also revealed.

AttributeValuesDescription
shufflebooleanShuffles the answer order on each page load
multiplebooleanMulti-select mode: the student ticks several answers, a Validate button grades at the end
HTML
<mp-quiz>
  <mp-question>What is the sign of $-(-3)^2$?</mp-question>
  <mp-answer correct>Negative</mp-answer>
  <mp-answer>Positive</mp-answer>
  <mp-answer>Zero</mp-answer>
</mp-quiz>
Output — click on an answer What is the sign of $-(-3)^2$? Negative Positive Zero

Variant: multi-select

With the multiple attribute, the student can tick several answers; a Validate button appears below. Several answers may be correct.

HTML
<mp-quiz multiple shuffle>
  <mp-question>Which of these are prime numbers?</mp-question>
  <mp-answer correct>7</mp-answer>
  <mp-answer>9</mp-answer>
  <mp-answer correct>11</mp-answer>
  <mp-answer>15</mp-answer>
</mp-quiz>
Output — select, then validate Which of these are prime numbers? 7 9 11 15

<mp-blank> — fill-in-the-blank lectures (progressive reveal)

Typical use: you project your course on the board, the student sees only the unmasked beginning at first, then you reveal each new block — definition, example, proof — in sync with your explanation. The student fills in their own gap-filling notes at their own pace.

Concretely: as soon as there's at least one <mp-blank> in the document, everything that comes after a <mp-blank> is hidden by default. A small navigation bar appears at the bottom of the screen; a click or right arrow reveals the next block.

HTML
<mp-definition>
  <mp-title>Derivative at a point</mp-title>
  Let $f$ be a function defined at $a$.</mp-definition>

<mp-blank></mp-blank>

<p>We say $f$ is differentiable at $a$ if the following limit exists:</p>

$$f'(a) = \lim_{h \to 0} \dfrac{f(a + h) - f(a)}{h}$$

<mp-blank></mp-blank>

<mp-example>
  For $f(x) = x^2$, we have $f'(3) = 6$.</mp-example>
Keyboard and navigation bar Shortcuts: / spacebar = next block, = previous block, / = 10 blocks at once. The bottom bar shows progress.

A typical sequence

In practice, a teacher chains these blocks to build a complete sequence: activity → definition → method → exercise → correction. For example:

  1. <mp-activity> — the student discovers a regularity
  2. <mp-definition> — the teacher formalizes the notation
  3. <mp-theorem> + <mp-proof> — a property, proven
  4. <mp-method> — the reusable procedure
  5. <mp-exercise> + <mp-correction> — application with collapsible correction
  6. <mp-quiz> — quick check of understanding in one click
  7. <mp-blank> — optional, between each block, to project the course as a fill-in-the-blank lecture in class
Editor: Structures menu In the online editor, a dedicated button for each of these blocks. Exercises with numbered questions are available in a single click.

Ready to try mathpad?

Create your first interactive scientific HTML document in the online editor, or import your existing LaTeX course in one click.