[Tex/LaTex] Make big fractions look nicer


I've got a few lines of calculation that involve large fractions and it is looking horrible on Latex. Does anyone have any suggestions as to how to make the fractions bigger with more space so that they are more readable?

Here is my code

This function is well defined as the definitions agree on the coordinate overlap. Indeed


\frac{\Re(u'')}{(1+\| u'' \|^2)^{\nicefrac{1}{2}}} &= \frac{\Re(\frac{u}{\|u\|^2}(\frac{u^hvu^j}{\|u\|})^{-1})}{(1+\| \frac{u}{\| u \|^2}(\frac{u^hvu^j}{\|u\|})^{-1} \|^2)^{\nicefrac{1}{2}}} \\

                                            &= \frac{\Re(u^{1-j} v^{-1} u^{-h})}{\|u\|(1+\frac{1}{\|u\|^2} \| u^{1-j}v^{-1}u^{-h} \|^2)^{\nicefrac{1}{2}}} \\
                                            &= \frac{\Re(u^{1-j} v^{-1} u^h)}{(1+\|u\|^2)^{\nicefrac{1}{2}}}  \quad \text{since} \hskip2pt v \hskip2pt \text{is a unit quaternion and since} \hskip2pt j+h=1 \\
                                            &=\frac{\Re(v)}{(1+\| u \|^2)^{\nicefrac{1}{2}}} \quad \text{since} \hskip2pt \Re(ab)=\Re(ba) \hskip2pt \text{and since} \hskip2pt \Re(v^{-1}) = \Re(v) \hskip2pt \text{since} \hskip2pt v \hskip2pt \text{is a unit quaternion} \\


And here is what it looks like

enter image description here

Also if anyone can advise on how to nicely structure the two comments beside the last two lines that would also be greatly appreciated. Thanks 🙂

Best Answer

Here is a solution with alignat and medium-sized fractions from nccmath. I replaced all occurrences of pairs of \| … \| with a command norm that can adjust the size of the delimiters, borrowed from mathtools. The placement of the comments is adjusted through the use of rlap and \mathrlap:

\usepackage{mathtools, nicefrac, nccmath, etoolbox}
\DeclarePairedDelimiterX\norm[1]\lVert\rVert{\ifblank{#1}{\: · \:}{#1}}

  \frac{\Re(u'')}{\bigl(1+\norm{ u'' }^2\bigr)^{\nicefrac{1}{2}}} &= \mathrlap{\frac{\Re\Bigl(\mfrac{u}{\norm{u}^2}\Bigl(\mfrac{u^hvu^j}{\norm{u}}\Bigr)⁻¹\Bigr)}{\biggl(1+\norm[\bigg]{ \mfrac{u}{\norm{ u }^2}\Bigl(\mfrac{u^hvu^j}{\norm{u}}\Bigr)⁻¹ }^2\biggr)^{\nicefrac{1}{2}}}} \\[1ex]
  &= \mathrlap{\frac{\Re(u^{1-j} v⁻¹ u^{-h})}{\norm{u}\Bigl(1+\mfrac{1}{\norm{u}^2} \norm[\big]{ u^{1-j}v⁻¹u^{-h} }^2\Bigr)^{\nicefrac{1}{2}}}} \\[1ex]
    & = \frac{\Re(u^{1-j} v⁻¹ u^h)}{(1+\norm{u}^2)^{\nicefrac{1}{2}}} & \qquad & \text{\footnotesize since $ v $ is a unit quaternion \rlap{and $ j+h=1 $}} \\[1ex]
    & =\frac{\Re(v)}{(1+\norm{ u }^2)^{\nicefrac{1}{2}}} & & \rlap{\parbox{0.4\linewidth}{\footnotesize since $ \Re(ab)=\Re(ba) $ and $ \Re(v⁻¹) = \Re(v) $ since $ v $ is a unit quaternion }} \\


enter image description here