# What messes up the space between the second itemlabel and text in this example?

I am trying to wrap pictures around list environments. I've found this question: Wrapping itemize around figure using floatflt in multicol environment - figure doesn't show And the answer of this question is working almost perfectly.

One of the problems I've noticed is that if I am trying to make two points with \itempicture (from my code) in one list then something makes the second number point be further away from the text.

Can somebody point out why and help to fix this?

PS. I see that \end{enumerate}\vspace*{-\baselineskip}\begin{enumerate}[resume*] between itempictures actually solves this problem. But I'm genuinely interested what am I missing.

MY MWE

\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{graphicx}
\input{insbox.tex}
\usepackage{xargs}
\usepackage{etoolbox}
\usepackage{calc}
\usepackage[margin=1cm, footskip = 1 cm]{geometry}
\usepackage[font=footnotesize]{caption}
\usepackage{microtype}
\usepackage{threeparttable}
\usepackage{changepage}
\usepackage{printlen}

\newcommand*\wrapitem{%
\item
}

\makeatletter
\newcommand{\InsertListR}[3][0]{%
\mbox{}%
\vspace*{-\baselineskip}%
\setlength{\leftskip}{\leftmargin}%
\InsertBoxR{#2}{\hskip-\leftmargin#3\hskip\leftmargin}[#1]%
}%

\newcommand{\itempicture}[3][5]{
\wrapitem
\InsertListR[#1]{0}{\begin{threeparttable}\begin{tabular}{c@{}}\captionsetup{type=figure}\includegraphics[width=#3\textwidth]{#2}\end{tabular}\captionof{figure}{}\label{#2}\end{threeparttable}}
}

\begin{document}
\begin{enumerate}
\itempicture[5]{example-image-a}{0.15}
\lipsum[1]
\itempicture[5]{example-image-a}{0.15}
\lipsum[1]
\end{enumerate}
\end{document}

• What is in insbox.tex people cannot tat the mwe without it. Is it relevant? Jun 29 '19 at 15:46
• @daleif it's a generic pack­age which is very useful when wrapping images and insbox often works better than other packages, because it's based on plain TeX. ctan.org/pkg/insbox And yes, it is the the most important part.
– user98432
Jun 29 '19 at 15:55