You are using parskip=full
and scrbook
duly obeys it: addmargin
starts a new paragraph and so it is separated from the preceding paragraph with a full parskip.
If you want to remove the parskip in your addmargin
environment, I suggest you to define a new environment.
\documentclass[
parskip=full
]{scrartcl}
\newenvironment{thomasaddmargin}
{\setlength{\parskip}{0pt plus 1pt}\addmargin}
{\endaddmargin}
\begin{document}
Mytext
\begin{thomasaddmargin}[0.3cm]{0cm}
MyOtherText
\end{thomasaddmargin}
Mytext
Mytext
\end{document}
If you want to follow the “remove the vertical space approach”, you have to patch the right command, which is not \@addmargin
, but the internal one called by it. This is easy with xpatch
; note that the glue to remove is \parskip
, not \bigskipamount
.
\documentclass[
parskip=full
]{scrartcl}
\usepackage{xpatch}
\makeatletter
\pretocmd{\@addmargin}{\vspace{-\parskip}}{}{}
\makeatother
\begin{document}
Mytext
\begin{addmargin}[0.3cm]{0cm}
MyOtherText
\end{addmargin}
Mytext
Mytext
\end{document}
The output is the same because there is only one paragraph in the addmargin
environment.
The difference between the two solutions is that in the former no parskip will be used between paragraphs inside addmargin
; the normal parskip will be used in the latter solution. Take your pick.
Final exhortation: don't use parskip=full
.
addmargin
come from? I suspect some\abovedisplayskip
etc. to be changed, but without knowing the package...addmargin
is an KOMA extension, apparently. It's not in the LaTeX kernel or in the standard classes ;-)addmargin
starts a new paragraph and with your setting ofparksip=full
you'll get an empty line for the paragraph skip.