2

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

\begin{align*} 

\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} \\

\end{align*}

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 :)

  • 1
    Insert more vertical space between the lines using \\[1em] for example, is a good starting. – Sigur Feb 27 '15 at 22:57
3

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:

\documentclass{article}
\usepackage{mathtools, nicefrac, nccmath, etoolbox}
\DeclarePairedDelimiterX\norm[1]\lVert\rVert{\ifblank{#1}{\: · \:}{#1}}
\usepackage[showframe]{geometry}
\begin{document}

\mbox{}\vskip1cm
\begin{alignat*}{2}
  \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 }} \\
\end{alignat*}

\end{document} 

enter image description here

6

Use \dfrac and larger parentheses. I used \DeclarePairedDelimiter for better management of the sizes.

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter\PAR{(}{)}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}

\begin{document}
\begin{align*} 
\dfrac{\Re(u'')}{(1+\| u'' \|^2)^{1/2}}
  &= \dfrac{\Re\PAR[\bigg]{\dfrac{u}{\norm{u}^2}\PAR[\Big]{\dfrac{u^hvu^j}{\norm{u}}}^{-1}}}
           {\PAR[\bigg]{1+\norm[\Big]{\dfrac{u}{\norm{u}^2}
            \PAR[\Big]{\dfrac{u^hvu^j}{\norm{u}}}^{-1}}^2}^{1/2}} \\[2ex]
  &= \dfrac{\Re\PAR{u^{1-j} v^{-1} u^{-h}}}
           {\norm{u}\PAR[\Big]{1+\dfrac{\mathstrut 1}
                                       {\norm{u}^2}\norm{u^{1-j}v^{-1}u^{-h}}^2}^{1/2}} \\[2ex]
  &= \dfrac{\Re\PAR{u^{1-j} v^{-1} u^h}}
           {\PAR{1+\|u\|^2}^{1/2}}
     \quad \parbox[t]{.5\displaywidth}{since $v$ is a unit quaternion and since $j+h=1$} \\[2ex]
  &= \dfrac{\Re(v)}{(1+\| u \|^2)^{1/2}}
     \quad \parbox[t]{.5\displaywidth}{
             since $\Re(ab)=\Re(ba)$ and 
             since $\Re(v^{-1}) = \Re(v)$, because $v$ is a unit quaternion}
\end{align*}
\end{document}

enter image description here

3

The suggestion with extra vertical spacing as suggested by Sigur works fine, but the fractions do not look very nice. A further improvement can be achieved with \dfrac instead of \frac.

\documentclass{article}

\usepackage{nicefrac}
\usepackage{mathtools}

\begin{document}

Original...
\begin{align*} 
\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} \\
\end{align*}

With dfrac - command
\begin{align*} 
\dfrac{\Re(u'')}{(1+\| u'' \|^2)^{\nicefrac{1}{2}}} &= \dfrac{\Re(\dfrac{u}{\|u\|^2}(\dfrac{u^hvu^j}{\|u\|})^{-1})}{(1+\| \dfrac{u}{\| u \|^2}(\dfrac{u^hvu^j}{\|u\|})^{-1} \|^2)^{\nicefrac{1}{2}}} \\[1em]
                                            &= \dfrac{\Re(u^{1-j} v^{-1} u^{-h})}{\|u\|(1+\dfrac{1}{\|u\|^2} \| u^{1-j}v^{-1}u^{-h} \|^2)^{\nicefrac{1}{2}}} \\[1em]
                                            &= \dfrac{\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 \\[1em]
                                            &=\dfrac{\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} \\[1em]
\end{align*}
\end{document}

enter image description here

  • +1 Maybe some use of \Bigl( \Bigr) could be nice. – Sigur Feb 27 '15 at 23:54
  • @Sigur:Thanks, I had that in mind, but the non-math-text is disturbing in my point of view too, however, this would lead to too much changes... – user31729 Feb 27 '15 at 23:56

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.