The interaction issue of enumitem and KOMA-Script is:
enumitem does redefine trivlist environment by default. And this redefinition does call \@listi, \@listii. Something that the original definition of trivlist in the LaTeX kernel does not.
KOMA-Script classes has extra code in \@listi etc. for documents (or passages of documents) to avoid addition of \parskip and usual \topsep. This sets \topsep to zero whenever \parskip is greater than zero. But inside enumitem's trivlist \parskip is already greater than zero, when \@listi (etc.) is called. So \topsep is set to zero.
However enumitem does also provide an option ignoredisplayed as a workaround for such problems:
\documentclass[a4paper,10pt]{scrartcl}
\usepackage{amsthm}
\newtheorem{test}{Test}
\usepackage[ignoredisplayed]{enumitem}
\begin{document}
\begin{enumerate}
\item
Here is text.
\begin{test}
Here is a proposition.
\end{test}
Here is more text.
\end{enumerate}
\end{document}
or you can setup trivlist to explicitly set \topsep:
\documentclass[a4paper,10pt]{scrartcl}
\usepackage{amsthm}
\newtheorem{test}{Test}
\usepackage{enumitem}
\setlist[trivlist]{topsep=8pt plus 4pt minus 4pt}
\begin{document}
\begin{enumerate}
\item
Here is text.
\begin{test}
Here is a proposition.
\end{test}
Here is more text.
\end{enumerate}
\end{document}
a third suggestion would be to patch enumitem's redefinition of trivlist to not execute KOMA-Script's extra list code:
\documentclass[a4paper,10pt]{scrartcl}
\usepackage{amsthm}
\newtheorem{test}{Test}
\usepackage{enumitem}
\usepackage{xpatch}
\makeatletter
% Hack to not use KOMA-Script's extra list code inside enumitem's redefinition of trivlist
\xpatchcmd\trivlist{%
\csname @list\romannumeral\the\@listdepth\endcsname
}{%
\let\orig@list@extra\@list@extra
\let\@list@extra\relax
\csname @list\romannumeral\the\@listdepth\endcsname
\let\@list@extra\orig@list@extra
}{}{}
\makeatother
\begin{document}
\begin{enumerate}
\item
Here is text.
\begin{test}
Here is a proposition.
\end{test}
Here is more text.
\end{enumerate}
\end{document}
This is something, enumitem or KOMA-Script could do as a workaround to avoid the problem in this context. However, the problem does also occur using a standard class and package parskip, e.g.:
\documentclass[a4paper,10pt]{article}
\usepackage{parskip}
\usepackage{amsthm}
\newtheorem{test}{Test}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}
\item
Here is text.
\begin{test}
Here is a proposition.
\end{test}
Here is more text.
\end{enumerate}
\end{document}
so it is not related and not restricted to KOMA-Script. Here the second suggestion from above does also work:
\documentclass[a4paper,10pt]{article}
\usepackage{parskip}
\usepackage{amsthm}
\newtheorem{test}{Test}
\usepackage{enumitem}
\setlist[trivlist]{topsep=8pt plus 4pt minus 4pt}
\begin{document}
\begin{enumerate}
\item
Here is text.
\begin{test}
Here is a proposition.
\end{test}
Here is more text.
\end{enumerate}
\end{document}
but the others won't.
{article}and found that there's no problem with it, the problem is inside{scrartcl}class. – GiuTeX Nov 21 '18 at 23:30koma-scriptsince the problem occurs only in that context. – barbara beeton Dec 23 '18 at 02:29articleand add packageparskip. – Schweinebacke Dec 23 '18 at 08:31