Compare two revisions of: advanced topics

... ... @@ -325,3 +325,60 @@ For answer type `input.matrix` only the very basic _equal_ comparison is for now
325 325 ```
326 326
327 327 For partial scores for answer types `mc.multiple` and `mc.matrix` see: [MC Score Types](MC-Score-Types.md).
328 +
329 +# Lists in `\text{}` and `\explanation{}`
330 +
331 +You can use ordered lists, unordered lists, and description lists inside `\text{}` and `\explanation{}` blocks
332 +(and generally anywhere text is allowed), using the `enumerate`, `itemize`, and `description` environments and
333 +the `\item` command:
334 +
335 +```LaTeX
336 +\text{
337 + \begin{enumerate}
338 + \item First step.
339 + \item Second step.
340 + \item[$\alpha^2$] Third item, with a custom label instead of the automatic number.
341 + \end{enumerate}
342 +}
343 +```
344 +
345 +- `enumerate` numbers each `\item` automatically (1., 2., 3., ...).
346 +- `itemize` gives each `\item` a bullet.
347 +- `description` expects a label per `\item`, given as `\item[Term]`; use `\item[$\alpha^2$]` or similar for a
348 + custom label in `enumerate`/`itemize` too, overriding the automatic number/bullet for that one item.
349 +
350 +## Numbering/bullet style
351 +
352 +Both `enumerate` and `itemize` take an optional style class right after `\begin{...}`, e.g.
353 +`\begin{enumerate}[Roman]`. Recognized values:
354 +
355 +- `enumerate`: `arabic` (1. 2. 3. - the default), `alph` (a) b) c)), `Alph` (A. B. C.), `roman` (i. ii. iii.),
356 + `Roman` (I. II. III.)
357 +- `itemize`: `bullet` (• - the default), `dash` (-), `ast` (∗), `dot` (·), `square` (▪), `circle` (∘), `arrow` (▸)
358 +
359 +```LaTeX
360 +\begin{enumerate}[Roman]
361 + \item First item
362 + \item Second item
363 +\end{enumerate}
364 +```
365 +
366 +If you don't set a style class, nesting one list of the same kind (`enumerate` in `enumerate`, `itemize` in
367 +`itemize`) inside another automatically steps through a default sequence with nesting depth - for `enumerate`:
368 +`arabic` → `alph` → `roman` → `Alph`; for `itemize`: `bullet` → `dash` → `ast` → `dot`. Nesting an `itemize`
369 +inside an `enumerate` (or vice versa) resets this back to depth 1 for the inner list.
370 +
371 +<div class="alert green">Lists are also usable in static article/example text, which has always worked. Using
372 +them specifically inside <code>\text{}</code>/<code>\explanation{}</code> - i.e. in the actual question or
373 +explanation text a student sees, with variables already filled in - only became reliable since mid-September
374 +2026; on older MUMIE-course installations this could show an error, or show the list without any
375 +numbering/bullets, when the student opened the problem, even though saving/compiling the document itself
376 +showed no error.</div>
377 +
378 +<div class="alert">In that same personalized <code>\text{}</code>/<code>\explanation{}</code> case, the style
379 +class support is currently more limited than in static article/example text: for <code>enumerate</code>, all
380 +five styles above work; for <code>itemize</code>, only <code>circle</code> currently renders distinctly - the
381 +other style classes (<code>bullet</code>, <code>dash</code>, <code>ast</code>, <code>dot</code>, <code>arrow</code>)
382 +fall back to a plain default bullet there. The automatic depth-based nesting style also doesn't apply in this
383 +case. None of this applies to lists in static article/example text, where all styles and automatic nesting work
384 +as described above.</div>
328 385