6

With my tcolorbox, I would to have an enumerate list as Checkpoint of the below figure.

enter image description here Can anyone help me to create a numbered list as from picture in the picture inside tcolorbox? I add a short MWE and thank you so much for your precious time and help. Regards. Sebastiano.

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

1 Answer 1

4

Not my preferred style and liking, but here is a solution with \tcbsubtitle and having an overlay for the subtitle.

The most important parameter in my point of view is the left skip value of the subtitle style in order to control the position of the red title box.

The \CheckmarkBold command is from bbding package.

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

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .