5

Regarding to question of voduchoangvu from Create a color box?, I would also like to make a box like the figure below. Can you assist me with tex code using tcolorbox as well?

Thank you so much. enter image description here

10

Something like that?

enter image description here

\documentclass{article}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}

\definecolor{myblue}{RGB}{0,163,243}

\newtcolorbox[auto counter,number within=section]{mytheorem}[1][]{
  enhanced jigsaw,colback=white,colframe=myblue,coltitle=myblue,
  fonttitle=\bfseries\sffamily,
  sharp corners,
  detach title,
  leftrule=22mm,
  underlay unbroken and first={\node[below,text=white,font=\sffamily\bfseries,align=center]
    at ([xshift=-11mm,yshift=-1mm]interior.north west) {THEOREM\\\thetcbcounter};},
  breakable,pad at break=1mm,
  #1,
  code={\ifdefempty{\tcbtitletext}{}{\tcbset{before upper={\tcbtitle\par\medskip}}}},
}


\begin{document}

\section{Test section}

\begin{mytheorem}[title=Normal Sampling Distributions]
\lipsum[1]
\end{mytheorem}

\begin{mytheorem}
\lipsum[2]
\end{mytheorem}

\begin{mytheorem}[title=Test]
\lipsum[3-5]
\end{mytheorem}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.