# tcolorbox with bicolor, but only right frame outlined

How would I be able to create the following using a tcolorbox?

Everytime I try, the best I can manage to get is this:

MWE:

    \documentclass[12pt]{article}

\usepackage[many]{tcolorbox}
\usepackage{tikz}

\definecolor{myblue}{RGB}{0,46,142}
\newtcolorbox[auto counter]{mytheorem}[1][]{
enhanced jigsaw,colback=white,colframe=myblue,coltitle=myblue,
fonttitle=\bfseries,
sharp corners,
detach title,
leftrule=18mm,
underlay unbroken and first={\node[above,text=white,font=\bfseries,align=center]
at ([xshift=-9mm,yshift=0mm]interior.west) {\thetcbcounter};},
#1,
code={\ifdefempty{\tcbtitletext}{}{\tcbset{before upper={\tcbtitle\par\medskip}}}},
}

\begin{document}\raggedright

\begin{mytheorem}[title=Important Note]
Important content. A body remains in a state of rest or continuous uniform motion unless acted on by an unbalanced external force.
\begin{align*}
45x^2-4x  & =75x
\end{align*}
\end{mytheorem}

\end{document}


Also wondering what would be required to have the box number in the centre of its column, or alternatively at the top of the column in line with the heading.

Many thanks

• Can you give us a MWE to have something to start with? Jun 29, 2017 at 11:26
• I have just provided one above Jun 30, 2017 at 1:30

Instead of the increased rule width, I would increase the left margin and place the number there.

\documentclass[12pt]{article}

\usepackage[many]{tcolorbox}
\usepackage[%
margin=2cm,
includefoot,
bottom=2.55cm,
top=2.025cm,
footskip=0.65cm
]{geometry}

\definecolor{myblue}{RGB}{0,46,142}

\newtcolorbox[auto counter]{mytheorem}[1][]{%
enhanced jigsaw,
colback=white,
colframe=myblue,
coltitle=myblue,
fonttitle=\bfseries,
sharp corners,
detach title,
enlarge left by=18mm,
width=\linewidth-18mm,
underlay unbroken and first={%
\node[above,text=myblue,font=\bfseries,align=center] at ([xshift=-.5\textwidth,yshift=-7mm]interior.north) {\thetcbcounter};
},
breakable,
#1,
code={\ifdefempty{\tcbtitletext}{}{\tcbset{before upper={\tcbtitle\par\medskip}}}},
}

\begin{document}\raggedright

\begin{mytheorem}[title=Important Note]
Important content. A body remains in a state of rest or continuous uniform motion unless acted on by an unbalanced external force.
\begin{align*}
45x^2-4x  & =75x
\end{align*}
\end{mytheorem}

\end{document}