# How to reduce the vertical distance before a \begin{addmargin}

I have the following texts. My problem is that between my text and myothertext a distance is inserted that is about the equal of a full line. As I want to avoid this but not sure as to how I can do that my question is how can I reduce this vertical distance?

Mytext
MyOtherText


for the documentclass I'm using its this one:

\documentclass[8pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full, openany]{scrbook}

• Where does addmargin come from? I suspect some \abovedisplayskip etc. to be changed, but without knowing the package...
– user31729
Jun 21, 2015 at 8:51
• you mean which documentclass I'm using? else addmargin is a standard thing (like itemize) where I don't need to import additional things. Jun 21, 2015 at 8:52
• Nope, addmargin is an KOMA extension, apparently. It's not in the LaTeX kernel or in the standard classes ;-)
– user31729
Jun 21, 2015 at 8:55
• that is the default behaviour. addmargin starts a new paragraph and with your setting of parksip=full you'll get an empty line for the paragraph skip.
– user2478
Jun 21, 2015 at 8:55
• @ChristianHupfer ah sorry overlooked that (didn't see that when I looked it up). Jun 21, 2015 at 8:57

\documentclass[parskip=full,]{scrartcl}
\makeatletter
\vspace{-\bigskipamount}
\makeatother
\begin{document}

Mytext
MyOtherText

\end{document}

• That worked tnx. (for me in particular it was medskipamount but that aside works nicely tnx) Jun 21, 2015 at 9:09

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}

\begin{document}

Mytext
MyOtherText

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
\makeatother

\begin{document}

Mytext
MyOtherText

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.

• The sad thing is, that apparently the OP didn't upvote any answer :-( +1 though, not just for the very last line :-) Jun 21, 2015 at 11:15