I saw a lot solutions to this questions in here, unfortunately none of them works in my case. The code below works exactly as I would expect it. For my thesis however the \setlength{\abovedisplayskip}{30pt} doesnt work at all. I tried to construct a MWE, but I can't figure out whats causing the problem, and I dont think its gonna help to paste my entire preamble and settings here.
So my question is: Is there anything to keep in mind when using \setlength{\abovedisplayskip} ? I read that empty lines before \begin{align} might cause the problem, but removing them didnt help and also I want to keep them for clarity of the document as I got tons of aligns.
Any help or hint is very much appreciated! :)
\documentclass[a4paper,12pt,bibliography=totoc,parskip=false]{scrreprt}
\usepackage{eurosym,bm,amsmath} % Mathematische Notationen
\usepackage{amssymb,verbatim}
\usepackage{amsthm} % Beweise / Theorem
\usepackage{xfrac} % nice fracs
\usepackage{nccmath} % mfrac
\usepackage{bbold}
\usepackage{mathtools} % rcases
\begin{document}
\def\mycommand{\setlength{\abovedisplayskip}{30pt}% spacing before and after align
\setlength{\belowdisplayskip}{20pt}%
\let\oldselectfont\selectfont
\def\selectfont{\oldselectfont\mycommand}
\protect\setlength{\jot}{8pt}
\begin{proof}[Beweis von Gleichung \textit{\eqref{form:delta_n}}]
Per Definition \eqref{form:delta_1} gilt
\begin{align*}
\delta^{(n)}_k = \frac{\partial C}{\partial \hat{x}^{(n)}_k}.
\end{align*}
Nach Anwendung der Kettenregel lässt sich dieser Term als Summe über alle Neuronen $\partial x^{(n)}_l$ des Output-Layers umformulieren:
\begin{align*}
\delta^{(n)}_k = \sum_{l=1}^{m^{(n)}} \frac{\partial C}{\partial x^{(n)}_l} \frac{x^{(n)}_l}{\partial \hat{x}^{(n)}_k}.
\end{align*}
Dabei gilt $\sfrac{x^{(n)}_l}{\partial \hat{x}^{(n)}_k} =0$ für $l\neq k$, da $x^{(n)}_k = \varphi(\hat{x}^{(n)}_k)$ und somit die Aktivierung des $k$-ten Neurons auch nur von $\hat{x}^{(n)}_k$ abhängt. Dadurch fallen alle bis einen Summanden weg und die Gleichung lässt sich zu
\begin{align*}
\delta^{(n)}_k = \frac{\partial C}{\partial x^{(n)}_k} \frac{\partial x^{(n)}_k}{\partial \hat{x}^{(n)}_k}
\end{align*}
vereinfachen. Der rechte Bruch ist gegeben durch $\varphi'(x^{(n)}_k)$ und somit erhalten wir
\begin{align*}
\delta^{(n)}_k = \frac{\partial C}{\partial x^{(n)}_k} \varphi'(x^{(n)}_k)
\end{align*}
was genau der geforderten Aussage \eqref{form:delta_1} entspricht.
\end{proof}
\end{document}
\abovedisplayskipand its cousins are links to the font size commands, so everything say\normalsizegets executed, your change to\abovedisplayskipgets reset to the default. – daleif Sep 12 '19 at 08:23not working at all? If I run your example I get a large gap above each align. BTW: It is not a good idea to use align for one-liners, then you never get the benefit of the space saving features of equation. – daleif Sep 12 '19 at 08:25\selectfont. Also I saidfont sizenotfont. You need to patch\normalsizeand friends. See thexpatchpackage and have a look inscrsize11pt.clofor how\normalsizeis defined in that case – daleif Sep 12 '19 at 08:32\documentclass[a4paper,12pt,bibliography=totoc,parskip=false]{scrreprt}– Quastiat Sep 12 '19 at 12:06