1

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}  

enter image description here

2 Answers 2

1

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}  

enter image description here

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} 

enter image description here

3
  • @Sandra Please see my edit May 9, 2018 at 10:18
  • 1
    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
2

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} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .