1

I have no idea how to build the following tcolorbox. Any suggestion will be very helpfull.

enter image description here

nbach
  • 43

1 Answers1

2

Conceptually this is the same as an earlier answer by Ignasi, but of course a few keys different and also using \newtcolorbox. It also uses a trick from here to get a nice dotted line. EDIT: Added the changes suggested by Ignasi.

\documentclass{article}
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}[2][]{enhanced,title=#2, 
fonttitle=\sffamily\bfseries,top=2pt,bottom=2pt,boxrule=0pt,arc=0pt,colframe=white,
coltitle=white,colback=white,
attach boxed title to top left={yshift=-1pt,xshift=-1pt},
borderline north={0.5mm}{0mm}{orange,dash pattern=on 0.1pt off 4pt,line
width=2pt,line cap=round},
borderline south={0.5mm}{0mm}{orange,dash pattern=on 0.1pt off 4pt,line
width=2pt,line cap=round},
boxed title style = {colback=orange, colframe=red, sharp corners, rounded
corners=northeast, arc=3mm, boxrule=0pt},
#1}
\begin{document}
\begin{mybox}{EXAMPLE 1}
\vspace{10em}
\end{mybox}
\end{document}

enter image description here

  • 1
    Thank you for pointing to my answer! After re-reading it, I propose an alternative solution without underlay boxed title and using just a boxed title style: attach boxed title to top left={yshift=-2pt, xshift=-1pt},boxed title style = {colback=orange, colframe=red, sharp corners, rounded corners=northeast, arc=3mm, boxrule=0pt}. – Ignasi Mar 17 '20 at 08:12