# Too much space between the last line of the splitted fraction and the fraction line

Does someone know how to remove the space between the last line and the fraction line when using \splifrc in the following code?

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{mathtools}
\begin{document}

$\frac{\left( \splitfrac{\splitfrac{\splitfrac{-t^{2n+2}+t^2+1-t^{2n}(nt^2- n-1)^2+t^{4n+4}}{-t^{2n+4}-t^{2n+2} +t^{4n+2}(nt^2-n-1)^2-n^2t^{4n+2}}} {+2n^2t^{4n+4} -n^2t^{4n+4} +2nt^{2n+2} + 2t^{2n+2}}}{-2nt^{4n+2}- t^{4n+2}-2nt^{2n+4}+2nt^2-t^2 } \right)^{\frac{1}{2}}}{(t^2-1)^2}$

\end{document}


I am sure there are many different approaches. Here is one with TABstacks.

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{amsmath,amssymb,amsthm,tabstackengine}
\usepackage{mathtools}
\stackMath
\begin{document}
\TABbinary \frac{\left( \alignCenterstack{ -t^{2n+2}+&t^2+1-t^{2n}(nt^2- n-1)^2+t^{4n+4}\\ -&t^{2n+4}-t^{2n+2} +t^{4n+2}(nt^2-n-1)^2-n^2t^{4n+2}\\ +&2n^2t^{4n+4} -n^2t^{4n+4} +2nt^{2n+2} + 2t^{2n+2}\\ -&2nt^{4n+2}- t^{4n+2}-2nt^{2n+4}+2nt^2-t^2 } \right)^{\frac{1}{2}}}{(t^2-1)^2}
\end{document}


For more of a stair-step effect, I would just use \quad spacers on a left-aligned stack:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{amsmath,amssymb,amsthm,tabstackengine}
\usepackage{mathtools}
\stackMath
\begin{document}
$\frac{\left( \Centerstack[l]{ -t^{2n+2}+t^2+1-t^{2n}(nt^2- n-1)^2+t^{4n+4}\\ \quad{}-t^{2n+4}-t^{2n+2} +t^{4n+2}(nt^2-n-1)^2-n^2t^{4n+2}\\ \qquad{}+2n^2t^{4n+4} -n^2t^{4n+4} +2nt^{2n+2} + 2t^{2n+2}\\ \quad\qquad{}-2nt^{4n+2}- t^{4n+2}-2nt^{2n+4}+2nt^2-t^2 } \right)^{\frac{1}{2}}}{(t^2-1)^2}$
\end{document}


• @Sandra Please see my edit May 9, 2018 at 10:18
• the plus and minuses on the lines after the first should be binary, not unary. putting {} in front of the sign of operation will fix the spacing. May 9, 2018 at 18:40
• @barbarabeeton Thank you for reminding me of that. May 9, 2018 at 18:47

Another simple way would be to use a multlined environment in the numerator. Note that, if you load mathtools, you don't have to load amsmath. I also used the \mfrac(medium-sized fraction) from nccmath:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage{amssymb,amsthm}
\usepackage{mathtools, nccmath}

\begin{document}

$\mfrac{\left(\begin{multlined}-t^{2n+2}+t^2+1-t^{2n}(nt^2- n-1)^2+t^{4n+4}\\-t^{2n+4}-t^{2n+2} +t^{4n+2}(nt^2-n-1)^2-n^2t^{4n+2} \\ +2n^2t^{4n+4} -n^2t^{4n+4} +2nt^{2n+2} + 2t^{2n+2}\\-2nt^{4n+2}- t^{4n+2}-2nt^{2n+4}+2nt^2-t^2\end{multlined}\right)^{\mkern-6mu\tfrac{1}{2}}}{n(t^2-1)^2}$

\end{document}