我是 Latex 新手,我需要制作一个与此完全一样的框。我试过使用 tcolorbox,但它看起来和
这是我目前所拥有的
\documentclass[oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[most]{tcolorbox}
\begin{document}
\definecolor{main}{HTML}{5989cf}
\definecolor{sub}{HTML}{cde4ff}
\tcbset{sharp corners, colback = white, before skip = 0.2cm, after skip = 0.5cm }
\newtcolorbox{boxH}{ colback = sub, colframe = main, boxrule = 0pt, leftrule = 6pt % left rule weight
}
\begin{boxH}
\textsf{\textbf{Claim}} -- We can prove.
\end{boxH}
\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
\textsf{\textbf{Claim}} -- We can prove $a<b$
\end{tcolorbox}
\end{document}
答案1
\documentclass[12pt]{article}
\usepackage[most]{tcolorbox}
\newtcolorbox{colorb}{
enhanced,
boxrule=0pt,frame hidden,
borderline west={2pt}{0pt}{green!50!black},
colback=green!05!white,
sharp corners
}
\begin{document}
\begin{colorb}
\textcolor{green!50!black}{\textbf{\textsf{Claim --}}} The only such function is $f(x)=0$.
\end{colorb}
\end{document}