2

When some math expressions such as complex fractions are around the braces which should be on the same baseline, besides, equality sign should be aligned with vinculum, how can we handle? For example, in the following formula, is it possible to make the equality signs aligned with the fraction bars?

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
S_d=\left[\begin{array}{@{}c@{}}
\cfrac{\displaystyle\sum_{j=1}^{n}{(d_j-\bar{d})^2}}{n-1}
\end{array}\right]^{1/2}
=\left[\begin{array}{@{}c@{}}
\cfrac{\displaystyle\sum_{j=1}^{n}{d_j^2}-\cfrac{1}{n}\left(\sum_{j=1}^{n}{d_j}\right)^2}{n-1}
\end{array}\right]^{1/2}
\end{equation}
\end{document}

1
  • +1 for posting the complete equation; that's something one can work on. (Next time make it even better and post complete code with \documentclass and all, please.) Jan 21, 2011 at 14:31

3 Answers 3

4

Here's how I would typeset this:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
S_d  = \left[ \frac{1}{n-1} \sum_{j=1}^{n} (d_j-\bar{d})^2 \right]^{1/2}
     = \left[ \frac{1}{n-1} \right]^{1/2}
       \left[ \sum_{j=1}^{n} d_j^2
              - \frac{1}{n} \left( \sum_{j=1}^{n} d_j \right)^2
       \right]^{1/2}
\end{equation}
\end{document}

Herbert is quite right, the parentheses should always be symmetrical to the math baseline, and you should not use your above construct. Just try and avoid such fractions altogether.

2

That is not easy in fact of your unbalanced fractions. From the rules of mathematical typesetting the parentheses are always symmetrical to the math baseline:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
S_d = \left[ \dfrac{\sum\limits_{j=1}^{n}{(d_j-\bar{d})^2}
             \vphantom{ \left(\displaystyle\sum\limits_{j=1}^{n}{d_j} \right)^2 } 
             }{n-1}
      \right]^{1/2}
    = \left[ \dfrac{\sum\limits_{j=1}^{n}{d_j^2}-\cfrac{1}{n}
             \left(\sum\limits_{j=1}^{n}{d_j}\right)^2}{n-1} 
      \right]^{1/2}
\end{equation}

\end{document}

Making the parentheses smaller doesn't really look good. Examples can be found in Mathmode.pdf.

2

As Herbert mentioned, math typesetting isn’t really done this way anymore, but it’s what Karel Wick recommends in Rules for Type-setting Mathematics (1965). If you want this sort of thing in LaTeX, you can use the nath package which reproduces these rules. The drawback is that nath has a specific syntax for math, so you may have to rewrite all your formulas and if it’s for an article you’re going to publish, the journal may not want you to use nath. If none of these disadvantages bother you, here's what your equation would look like:

alt text

Personally, I find this looks a bit strange and would prefer what Hendrik suggested in his answer. Here’s the code:

\documentclass[12pt]{article}
\usepackage{nath}
\begin{document}
\begin{equation}
S_d=[\frac{\sum_{j=1}^{n}(d_j-\bar{d})^2}{n-1}]^{1/2}
=[\frac{\sum_{j=1}^{n} d_j^2 - \frac{1}{n}(\sum_{j=1}^{n}{d_j})^2}{n-1}]^{1/2}
\end{equation}
\end{document}

Notice that, with nath, there is no need for \left and \right, the correct sizes are automatically chosen for you.

1
  • 1
    ... and journals often have house styles which would override your choice in any case. Apr 3, 2011 at 0:18

You must log in to answer this question.

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