Custom Admonitions#
The custom admonition directives provide styled content blocks for educational materials.
Theory#
For presenting theoretical content:
Pythagoras’ Theorem
For a right triangle with sides \(a\) and \(b\) and hypotenuse \(c\):
This fundamental relation has been known since ancient times.
Example#
For worked examples:
Solving a Quadratic Equation
Solve: \(x^2 - 5x + 6 = 0\)
Using the quadratic formula: $\(x = \frac{5 \pm \sqrt{25 - 24}}{2} = \frac{5 \pm 1}{2}\)$
So \(x = 3\) or \(x = 2\)
Exercise#
For student exercises:
Practice Problem
Find the derivative of \(f(x) = x^3 + 2x^2 - 5x + 1\).
Explore#
For exploratory activities:
Investigation
Try different values and observe the pattern:
What happens when \(x = 0\)?
What happens when \(x\) is very large?
Can you find a general rule?
Goals#
For learning objectives and goals:
Learning Objectives
After this section, you should be able to:
Understand the concept of derivatives
Apply the chain rule
Solve optimization problems
Summary#
For section summaries:
Key Points
Derivatives measure rate of change
Integration finds area under curves
The fundamental theorem connects them
Hints#
For providing hints (default collapsed):
Hint
Start by factoring out the common term.
Custom Hint Title
This hint is always visible.
Answer#
For short answers (default collapsed):
Fasit
\(x = 42\)
Answer to Question 2
The solution is \(y = 2x + 3\).
Solution#
For full solutions (default collapsed):
Løsning
Step 1: Write down what we know
Initial velocity: \(v_0 = 0\)
Acceleration: \(a = 9.8\) m/s²
Time: \(t = 3\) s
Step 2: Apply the formula $\(v = v_0 + at = 0 + 9.8 \times 3 = 29.4 \text{ m/s}\)$
Answer: The final velocity is 29.4 m/s.
Alternative Method
This solution is always visible.
You can also solve this using energy conservation…
Nested Admonitions#
You can nest admonitions within each other:
Challenge Problem
Prove that \(\sqrt{2}\) is irrational.
Hint
Use proof by contradiction. Assume \(\sqrt{2} = \frac{p}{q}\) where \(p\) and \(q\) are coprime integers.
Løsning
Proof by contradiction:
Assume \(\sqrt{2} = \frac{p}{q}\) where \(p\) and \(q\) are coprime…
[Rest of proof here]
Conclusion: This contradicts our assumption, so \(\sqrt{2}\) is irrational.
Features
All these admonitions support:
LaTeX math: Both inline \(x^2\) and display $\(\int_0^1 x dx\)$
Markdown: Including bold, italic, and
codeDropdown: Optional collapsible sections
Theme awareness: Adapts to light/dark mode with custom icons
Custom titles: Most directives allow custom titles
MyST syntax: Full support for colon-fence syntax (:::)