6

I have the following equation in my tex document:

\documentclass{article}
\begin{document}
  \begin{equation}
    x_{ij} = \frac{
                \sum_{t}{e_i(t)e_j(t)}
             } { 
                \sqrt{\sum_t{e_i^2(t)}} 
                \sqrt{\sum_t{e_j^2(t)}}
             }
  \end{equation}
\end{document}

The equation is printed like this:

demo equation

The problem is that despite having almost the same content, the two square root symbols are rendered with a different size.

Is it possible to equalize the size of the two square root symbols?

7

enter image description here

\documentclass{article}
\begin{document}
  \begin{equation}
    x_{ij} = \frac{
                \sum_{t}{e_i(t)e_j(t)}
             } { 
                \sqrt{\strut\sum_t{e_i^2(t)}} 
                \sqrt{\strut\sum_t{e_j^2(t)}}
             }
  \end{equation}
\end{document}
7

Square roots are very sensitive to ascenders and descenders. Just look at the two of them and you'll realize that the culprit is the j in the second one:

\documentclass{article}
\begin{document}

\begin{equation}
  x_{ij} =
  \frac{
        \sum_{t}{e_i(t)e_j(t)}
       }
       {
        \sqrt{\sum_t{e_{i\vphantom{j}}^2(t)}}
        \sqrt{\sum_t{e_j^2(t)}}
       }
\end{equation}

\end{document}

enter image description here

However, it may be a good idea to have \mathstrut in the exponents, so they don't risk touching the vinculum.

\documentclass{article}
\begin{document}

\begin{equation}
  x_{ij} =
  \frac{
        \sum_{t}{e_i(t)e_j(t)}
       }
       {
        \sqrt{\sum_t{e_{i}^{\mathstrut 2}(t)}}
        \sqrt{\sum_t{e_{j}^{\mathstrut 2}(t)}}
       }
\end{equation}

\end{document}

The output is the same.

1

More of a workaround than a regular answer to your question: using \limits.

\documentclass{article}
\begin{document}
  \begin{equation}
    x_{ij} = \frac{
                \sum\limits_{t}{e_i(t)e_j(t)}
             } { 
                \sqrt{\sum\limits_t{e_i^2(t)}} 
                \sqrt{\sum\limits_t{e_j^2(t)}}
             }
  \end{equation}
\end{document}

enter image description here

  • 2
    the radical signs are really too large, and the use of \limits spaces the numerator farther from the fraction line than desirable. a publisher's copyeditor would probably reject this formulation. – barbara beeton May 12 '15 at 16:24

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.