Skip to content

Exercise Sheets or Exams

Marei Peischl edited this page Apr 3, 2022 · 2 revisions

Add an indent for the solution environment

The issue https://github.com/tudace/tuda_latex_templates/issues/351 requested an indent for the solution environment. Luckily LaTeX's hook management simplifies this requirement by far. It requires a LaTeX installation of TL 2021 or newer.

\AddToHook{env/solution/before}[solutionindent]{\begin{addmargin}[2em]{0pt}}
\AddToHook{env/solution/after} [solutionindent]{\end{addmargin}}

The addmargin environment is provided by KOMA-Script. The optional argument (if provided) adjusts the left indent, the mandatory one either sets both sides or the right one. Please refer to the documentation for defails.

Clone this wiki locally