I am trying to get the boxed title box environment from the Peter Atkins Physical Chemistry book which looks like this,
After reading documentation of tcolorbox
pacakge I have found out that in Manual for the tcolorbox
package, in section '10.2.3 Options for the Boxed Title Box' there is one customized tcolorbox style.
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum}
\usepackage{varwidth}
\newtcolorbox{mybox}[2][]{enhanced,
before skip=2mm,after skip=2mm, colback=black!5,colframe=black!50,boxrule=0.2mm,
attach boxed title to top left={xshift=1cm,yshift*=1mm-\tcboxedtitleheight}, varwidth boxed title*=-3cm,
boxed title style={frame code={
\path[fill=tcbcolback!30!black]
([yshift=-1mm,xshift=-1mm]frame.north west)
arc[start angle=0,end angle=180,radius=1mm]
([yshift=-1mm,xshift=1mm]frame.north east)
arc[start angle=180,end angle=0,radius=1mm];
\path[left color=tcbcolback!60!black,right color=tcbcolback!60!black,
middle color=tcbcolback!80!black]
([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
[rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
-- (frame.south east) -- (frame.south west)
-- ([xshift=-1mm,yshift=-1mm]frame.north west)
[sharp corners]-- cycle;
},interior engine=empty,
},
fonttitle=\bfseries,
title={#2},#1}
\begin{document}
\begin{mybox}[colbacktitle=green]{Lorem Ipsum}
\lipsum[1]
\end{mybox}
\end{document}
which looks bit similar to the Atkins one is given, but I am unable to achieve the Atkins box style
Any help is appreciated.
Edit: After some efforts I have got this result
using
tcolorbox
package,
\documentclass{article}
\usepackage{lipsum}
\usepackage[most]{tcolorbox}
\usepackage{xcolor}
\definecolor{mygreen}{HTML}{07a56d}
\newtcbtheorem{briefillus}{Brief Illustration}{
enhanced,
sharp corners,
attach boxed title to top left={
xshift=0pt,
yshift=-\tcboxedtitleheight,
yshifttext=-\tcboxedtitleheight/2
},
colback=white,
colframe=mygreen,
fonttitle=\bfseries,
coltitle=white,
boxed title style={
rounded corners,
arc=2pt,
size=small,
colback=mygreen,
colframe=mygreen,
},
leftrule=0pt,
rightrule=0pt,
}{thm}
\begin{document}
\begin{briefillus}{Lorem Ipsum}{}
\lipsum[1]
\end{briefillus}
\end{document}
But I am still not able to achieve that inverted isoceles trapezium for title box with rounded corners on lower side.