이와 비슷한 것을 어떻게 만들 수 있습니까? (채색된 상자)

이와 비슷한 것을 어떻게 만들 수 있습니까? (채색된 상자)

여기에 이미지 설명을 입력하세요

나는 강의 중에 이것들을 할 계획이므로 가장 빠른 방법이 나에게 가장 좋습니다. 어떤 제안이라도 환영합니다!

답변1

패키지는 tcolorbox이런 종류의 상자를 만들기에 좋습니다.

\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}

관련 정보