1

How would I set the vertical spacing after intertext to the same amount as for the first equation? Using \\ gives to much vertical space plus adds a new equation what i do not want ofc. Without \\ there's no space at all. Without the nccmath package everything works fine, but I really like to keep the \mfrac{}{} statements. Also the blank line before align is mandatory to recreate the issue.

\documentclass[]{scrreprt}
\usepackage{eurosym,bm,amsmath}     % Mathematische Notationen
\usepackage{nccmath} %<------- causing the issue (needed for \mfrac)

\begin{document}

Für das Forget Gate ergibt sich das Resultat dabei durch

\begin{align}
\begin{split}
\hat{f}_{t,k}^{(i)} &= b^{(i)f}_k + \sum_{l} \omega^{(i)f}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)f}_{kl} x^{(i)}_{t-1,l} \\
f_{t,k}^{(i)} &=  \varphi_{sig}\left( \hat{f}_{t,k}^{(i)} \right) 
\end{split}
\intertext{analog erhält man auch für das Input Gate}
\begin{split}
\hat{i}_{t,k}^{(i)} &= b^{(i)i}_k + \sum_{l} \omega^{(i)i}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)i}_{kl} x^{(i)}_{t-1,l} \\
i_{t,k}^{(i)} &=  \varphi_{sig}\left( \hat{i}_{t,k}^{(i)} \right) 
\end{split}
\intertext{ebenso wie für das Output Gate}\\
\begin{split}
\hat{o}_{t,k}^{(i)} &= b^{(i)o}_k + \sum_{l} \omega^{(i)o}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)o}_{kl} x^{(i)}_{t-1,l} \\
o_{t,k}^{(i)} &=  \varphi_{sig}\left( \hat{o}_{t,k}^{(i)} \right) 
\end{split}
\end{align}

\end{document}

enter image description here

  • 2
    Please start by making your MWE compilable. Using the article class and adding amsmath I only see an issue with \intertext{...}\\ which is resolved by removing the \\ – daleif Sep 13 '19 at 13:48
  • 2
    With your latest MWE I do not get the image you posted. – daleif Sep 13 '19 at 13:53
  • You're right, me neither, even if I include all my settiings and packages I dont get that missing space. No clue why it happens in my main document though... – Quastiat Sep 13 '19 at 13:58
  • 1
    You have to keep trying. Unless you can recreate the issue, we cannot help. – daleif Sep 13 '19 at 14:20
  • finally found it, after reducing the million packages and settings step by step. Problem comes from the nccmath package which I use for \mfrac{}{} Seems very strange to me as I dont even use \mfrac in here – Quastiat Sep 13 '19 at 14:31
1

Here are two possibilities: nccmath adds an optional argument to \intertext, which is added to the vertical spacing of this command. You also can use the spreadlines environment, from mathtools , which adds a vertical spacing (mandatory argument) between all rows of an amsmath environment.

\documentclass[]{scrreprt}
\usepackage{eurosym,bm, mathtools} % Mathematische Notationen
\usepackage{amssymb,verbatim}
\usepackage{amsthm} % Beweise / Theorem
\usepackage{nccmath}

\begin{document}

Für das Forget Gate ergibt sich das Resultat dabei durch
\begin{align}
\begin{split}
\hat{f}_{t,k}^{(i)} &= b^{(i)f}_k + ∑_{l} \omega^{(i)f}_{kl} x^{(i-1)}_{t,l} + ∑_{l} \nu^{(i)f}_{kl} x^{(i)}_{t-1,l} \\
f_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{f}_{t,k}^{(i)} \right)
\end{split}
\intertext[3ex]{analog erhält man auch für das Input Gate}
\begin{split}
\hat{i}_{t,k}^{(i)} &= b^{(i)i}_k + ∑_{l} \omega^{(i)i}_{kl} x^{(i-1)}_{t,l} + ∑_{l} \nu^{(i)i}_{kl} x^{(i)}_{t-1,l} \\
i_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{i}_{t,k}^{(i)} \right)
\end{split}
\intertext[3ex]{ebenso wie für das Output Gate}
\begin{split}
\hat{o}_{t,k}^{(i)} &= b^{(i)o}_k + ∑_{l} \omega^{(i)o}_{kl} x^{(i-1)}_{t,l} + ∑_{l} \nu^{(i)o}_{kl} x^{(i)}_{t-1,l} \\
o_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{o}_{t,k}^{(i)} \right)
\end{split}
\end{align}

Für das Forget Gate ergibt sich das Resultat dabei durch
\begin{spreadlines}{2ex}
\begin{align}
\begin{split}
\hat{f}_{t,k}^{(i)} &= b^{(i)f}_k + \sum_{l} \omega^{(i)f}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)f}_{kl} x^{(i)}_{t-1,l} \\
f_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{f}_{t,k}^{(i)} \right)
\end{split}
\intertext{analog erhält man auch für das Input Gate}
\begin{split}
\hat{i}_{t,k}^{(i)} &= b^{(i)i}_k + \sum_{l} \omega^{(i)i}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)i}_{kl} x^{(i)}_{t-1,l} \\
i_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{i}_{t,k}^{(i)} \right)
\end{split}
\intertext{ebenso wie für das Output Gate}
\begin{split}
\hat{o}_{t,k}^{(i)} &= b^{(i)o}_k + \sum_{l} \omega^{(i)o}_{kl} x^{(i-1)}_{t,l} + \sum_{l} \nu^{(i)o}_{kl} x^{(i)}_{t-1,l} \\
o_{t,k}^{(i)} &= \varphi_{sig}\left( \hat{o}_{t,k}^{(i)} \right)
\end{split}
\end{align}
\end{spreadlines}%

\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.