My situation
I have an environment that consists of an itemize set withing a minipage (or varwidth, whatever...)
Let's call this environment myItemize.
I am encountering difficulty regarding the vertical spacing after and \end{myItemize}
(I do not care about the vertical spacing before the \begin{)
All code is at the end.
regular spacing after myItemize : ok-ish
By fiddling in myItemize definition, I can just about have it behave when followed by "regular text".
Illustration :
spacing before \item after myItemize : not ok
If the myItemize is nested inside an itemize, the ad-hoc spacing is no longer relevant.
Can someone show me the magic to be cast to have the same spacing after myItemize as would be after a itemize in both cases ?
I tried a bit with \ignorespacesafterend but no luck !
Illustration :
The code
\documentclass[12pt]{article}
\begin{document}
\newenvironment{myItemize}
{%
\noindent
\begin{minipage}{\linewidth}
\begin{itemize}
}
{%
\end{itemize}
\strut
\end{minipage}
\vspace{-2.3\baselineskip}
\vspace{-\lineskip}
\strut
}
\newcommand\myCommand[2]
{
\begin{minipage}{.5\linewidth}
\begin{#1}
\item this is #2
\item spacing below is about \textsc{ok}
\end{#1}
dummy below
\hrulefill
\end{minipage}
}
\myCommand{myItemize}{{\verb!myItemize}}%
\myCommand{itemize}{{\verb!itemize}}
\begin{itemize}
\item dummy item
\begin{itemize}
\item this is \verb!itemize!
\item spacing is \textsc{ok}
\end{itemize}
\item dummy item
\begin{myItemize}
\item this is \verb!myItemize!
\item spacing below is not \textsc{ok}
\item I don't care about above spacing
\end{myItemize}
\item dummy item
\end{itemize}
\end{document}
Cheers,




itemizein your minipage directly, but use an own list defined by enumitem and adjust skips via its setup options. – TeXnician Jun 24 '17 at 20:07enumitem, but took this off for minimalism. What kind of list do you mean ? A regularlistenvironment ? I don't think I know much about these, of have much documentation at my disposal, either... – marsupilam Jun 24 '17 at 20:10\newlist). If you have such a new list you can configure it the enumitem way (including settings per nesting level). – TeXnician Jun 24 '17 at 20:13minipageenvironment changes explicitly the inter-item spacings. I've answered this some while ago... https://tex.stackexchange.com/a/257836/31729 – Jun 24 '17 at 20:25