Wie könnte ich etwas Ähnliches machen? (Das farbige Kästchen)

Wie könnte ich etwas Ähnliches machen? (Das farbige Kästchen)

Bildbeschreibung hier eingeben

Ich habe vor, dies während einer Vorlesung zu tun, daher ist die schnellste Methode für mich die beste. Alle Vorschläge sind willkommen!

Antwort1

Das Paket tcolorboxeignet sich hervorragend für die Herstellung solcher Boxen.

\documentclass{article}
\usepackage{newpxtext}
\usepackage{newpxmath}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem{theorem}{Theorem}{
    arc=0mm,
    fonttitle=\bfseries,
    fontupper=\itshape,
    coltitle=black,
    colback=red!10,
    colframe=red!10,
}{thm}
\begin{document}
\begin{theorem}{Fundamental Theorem of Algebra}{fundalg}
If
\[
p(x) = a_nx^n + a_{n-1}x^{n-1} + \hdots + a_0
\]
is a polynomial with \(a_n \neq 0\), and \(a_n, a_{n-1}, \hdots, a_0 \in C\), then \(p(x)\) factors into linear factors,
\[
p(x) = a_n \cdot (x - r_1) \cdot (x - r_2) \cdot \hdots \cdot (x - r_n).
\]
\end{theorem}
\end{document}

verwandte Informationen