# tcolorbox breakable behaving unexpectedly

According to the documentation, the breakable flag of tcolorbox should create two partialy boxed parts, that is, the first page part has no bottomrule and the second page part has no toprule.

Unfortunately, I do not understand why my example yields two parts with two completely boxed parts. What am I missing here?

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{natbib}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{tcolorbox}
\usepackage{amsmath}
\tcbuselibrary{breakable}

\newcounter{myexamplectr}
\newenvironment{example}[1][]
{\refstepcounter{myexamplectr} \begin{tcolorbox}[boxrule=0.5mm, arc=0mm, breakable=true, #1]
\texttt{Example \themyexamplectr}: }{\end{tcolorbox}}

\begin{document}

\lipsum[1]
\begin{example}[before skip=1cm,after skip=1cm]
\lipsum[1-6]
\end{example}
\lipsum[1]
\end{document}


The appearance of the three different kinds of parts of a breakable box is governed by three skins: /tcb/skin first, /tcb/skin middle and /tcb/skin last. By default, they are all set to standard, thus you obtain the same appearance for the various parts. You need to use a skin that has visually-distinguishable variants to see the difference. For instance, you can use enhanced from the skins library:

\documentclass{article}
\usepackage{lipsum}
\usepackage{tcolorbox}
\tcbuselibrary{skins, breakable}

\newcounter{myexamplectr}

\newenvironment{example}[1][]{%
\refstepcounter{myexamplectr}%
\begin{tcolorbox}[enhanced, boxrule=0.5mm, arc=0mm, breakable=true, #1]
\texttt{Example \themyexamplectr}: % one space token here
\ignorespaces}
{\unskip
\end{tcolorbox}%
\ignorespacesafterend
}

\begin{document}

\lipsum[1]
\begin{example}[before skip=1cm,after skip=1cm]
\lipsum[1-6]
\end{example}
\lipsum[1]

\end{document}


Page 1:

Page 2:

You may want to read section Break Sequence for the Skins of the tcolorbox manual (page 388 in the manual for version 4.20).