1

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

enter image description here

  • 2
    It can be done with a small variation of an answer to one of your earlier questions, which you never bothered to accept. – user194703 Mar 16 at 22:36
  • Yes, I tried to modify that very useful suggestion for that tcolorbox, but I don't know how to include top and bottom line as in this new one. – nbach Mar 17 at 1:39
1

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

| improve this answer | |
  • 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 at 8:12

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.