答案1
也可以使用theorems
和中skins
的库来完成tcolorbox
。
\documentclass{article}
\usepackage{amsmath, amsthm}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\newtcbtheorem{axiom}{Axioma}{
enhanced,
frame hidden,
arc=0mm,
boxrule=0mm,
borderline west={.7mm}{.2mm}{purple},
left=2mm,
colframe=purple,
coltitle=black,
colback=purple!15,
theorem style=plain,
label separator=.,
terminator sign=.,
description delimiters={(}{)},
description font=\normalfont,
fonttitle=\normalfont\bfseries,
}{ax}
\begin{document}
\begin{axiom}{O Axioma da união}{}
Para cada conjunto \(\mathcal{A}\), existe um conjunto \(B\) tal que, para todo o \(A \in \mathcal{A}\) e todo o \(x \in A\), tem-se \(x \in B\).
\end{axiom}
\end{document}
答案2
您可以使用手册中的第 18.4 节来使用tcolorbox
和包装axiom
以标准方式定义的环境。\tcolorboxenvironment
\documentclass{article}
\usepackage{amsmath, amsthm}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\tcbuselibrary{skins}
\theoremstyle{definition}
\newtheorem{axiom}{Axioma}
\definecolor{axiombackground}{RGB}{254,227,234}
\definecolor{axiombar}{RGB}{252,0,65}
\tcolorboxenvironment{axiom}{
enhanced,
frame hidden,
arc=0mm,
boxrule=0mm,
borderline west={.7mm}{.2mm}{purple},
left=2mm,
colframe=axiombar,
colback=axiombackground,
}
\begin{document}
\begin{axiom}[O Axioma da união]
Para cada conjunto \(\mathcal{A}\), existe um conjunto \(B\) tal que,
para todo o \(A \in \mathcal{A}\) e todo o \(x \in A\), tem-se \(x \in B\).
\end{axiom}
\end{document}
我用数字测色仪测量了您图片的颜色,但结果并不完美。请根据您的需要进行调整。
答案3
ntheorem
使用和包可以轻松完成mdframed
:
\documentclass[11pt]{book} %
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}%
\usepackage{amssymb,amsmath}
\usepackage[amsmath,framed]{ntheorem}
\usepackage[ntheorem]{mdframed}
\theoremheaderfont{\bfseries}
\theorembodyfont{\upshape}
\theoremstyle{plain}
\newmdtheoremenv[topline=false, bottomline=false, rightline=false, leftline=true, linewidth=2pt, linecolor=Tomato, backgroundcolor=MistyRose, innertopmargin=10pt, innerbottommargin=10pt]{axiom}{Axioma}
\begin{document}
\setcounter{axiom}{3}
\begin{axiom}[O axioma da união]
Para cada conjunto $\mathcal A$, existe um conjunto $B$ tal que, para todo o $A \in\mathcal A$ e todo $x\in A$, tem-se $x\in B$.
\end{axiom}
\end{document}