有了我的tcolorbox
,我想有一个枚举列表检查点下图。
有人能帮我创建一个编号列表,就像图片里面的图片一样吗tcolorbox
?我添加了一个简短的 MWE,非常感谢您宝贵的时间和帮助。问候。塞巴斯蒂亚诺。
\documentclass[12pt]{book}
\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry} %
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage{times}
\usepackage{classico}
\usepackage{microtype}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\newtcolorbox{mybox}[1]{colback=teal!10,coltitle=black,colframe=gray!5,fonttitle=\bfseries,title=#1}
\newtcolorbox{mybox1}[1]{colback=yellow!40,coltitle=black,colframe=gray!5,fonttitle=\bfseries,title=#1, arc=0mm}
\begin{document}
\parindent 0cm
\chapter{Bla}
\section{One}
\begin{mybox}{}
\begin{equation}\label{Lorentz5}
t'=\frac{t-\dfrac{vx}{c^2}}{\sqrt{1-(v/c)^{2}}}
\end{equation}
\end{mybox}
\begin{mybox1}{}
\begin{equation}
\begin{aligned}
|\Delta \overline r| & =\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\\
& =\sqrt{(\Delta x)^2+(\Delta y)^2+(\Delta z)^2}, \quad \text{\small (distanza spaziale)}
\end{aligned}
\end{equation}
\end{mybox1}
\end{document}
答案1
这不是我喜欢的风格和喜好,但这里有一个\tcbsubtitle
带有字幕覆盖的解决方案。
我认为最重要的参数是left skip
的值,subtitle style
以控制红色标题框的位置。
该\CheckmarkBold
命令来自bbding
包。
\documentclass[12pt]{book}
\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry} %
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage[most]{tcolorbox}
\usepackage{bbding}
\newtcolorbox[auto counter]{checkmarkbox}[1][]{
colback=yellow!40,
coltitle=black,
colframe=gray!5,
fonttitle=\bfseries,
enhanced jigsaw,
sharp corners,
subtitle style={enhanced jigsaw,
left skip=-0.5cm,
boxsep=2pt,
width=5cm,
fontupper=\bfseries\Large,
colback={red!60!white},
colupper={red!60!black},
boxrule=0pt,
halign=center,
valign=center,
overlay={\node [left,outer sep=0.5em,green!60!black,draw,rectangle,line width=1.5pt] at (frame.west) {\CheckmarkBold};}},
before upper={\tcbsubtitle{Checkpoint \thetcbcounter}%
},
#1
}
\begin{document}
\parindent0em
\chapter{Bla}
\section{One}
\begin{checkmarkbox}
\begin{equation}
\begin{aligned}
|\Delta \overline r| & =\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\\
& =\sqrt{(\Delta x)^2+(\Delta y)^2+(\Delta z)^2}, \quad \text{\small (distanza spaziale)}
\end{aligned}
\end{equation}
\end{checkmarkbox}
\begin{checkmarkbox}
\begin{equation}
\begin{aligned}
|\Delta \overline r| & =\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\\
& =\sqrt{(\Delta x)^2+(\Delta y)^2+(\Delta z)^2}, \quad \text{\small (distanza spaziale)}
\end{aligned}
\end{equation}
\end{checkmarkbox}
\begin{checkmarkbox}
\begin{equation}
\begin{aligned}
|\Delta \overline r| & =\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\\
& =\sqrt{(\Delta x)^2+(\Delta y)^2+(\Delta z)^2}, \quad \text{\small (distanza spaziale)}
\end{aligned}
\end{equation}
\end{checkmarkbox}
\end{document}