5

This is the formula I'd like to reproduce:

To be reproduced

And here is my poorly working MWE:

\documentclass{book}
\usepackage{amsmath}
\usepackage{fixltx2e}
\usepackage[english]{babel}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[T1]{fontenc} 

\begin{document}

\begin{equation}
G_i(d) = \displaystyle\frac{\displaystyle\sum_j w_{ij} (d) x_j - W_i\bar{x}(i)} 
{s(i)\{[(n - 1) S_{1i} - W_i^2]}}/{{(n - 2)}^{1/2}}, j\neq i.
\end{equation}

\end{document}

Any help is appreciated.

Cost
  • 4,517
  • 3
    Please specify in words in your question as well as the title what exactly you're struggling with. A picture of your current output would be helpful, too. As it is, your question is way too localized and should be closed. It is highly unlikely that anybody needs to reproduce the exact same formula as you do. And even if somebody did, they probably wouldn't find this question because of its lack of description. – doncherry Sep 05 '12 at 19:08

1 Answers1

7

How about this

screenshot

\documentclass{book}
\usepackage{amsmath}


\begin{document}

   \begin{equation}
        G_i(d) = \frac{\sum_j w_{ij} (d) x_j - W_i\bar{x}(i)} 
                      {s(i)\{[(n - 1) S_{1i} - W_i^2]/{{(n - 2)}\}^{1/2}}},\qquad  j\neq i.
\end{equation}

\end{document}

Following the comment, you could also try

\begin{equation}
        G_i(d) = \frac{\displaystyle\sum_j w_{ij} (d) x_j - W_i\bar{x}(i)} 
                      {s(i)\{[(n - 1) S_{1i} - W_i^2]/{{(n - 2)}\}^\frac{1}{2}}},\qquad  j\neq i.
\end{equation}

which gives

enter image description here

The error I got with your code is

! Extra }, or forgotten $.
l.8 {s(i)\{[(n - 1) S_{1i} - W_i^2]}}
                                     /{{(n - 2)}^{1/2}}, j\neq i.
? 

which is one of TeX's more helpful errors. I find that in these situations it is helpful to copy the offending line, comment out the original, and then strip the copy down to a bare minimum. You can then build it back up slowly to try and avoid the errors.

One particularly useful piece of advice is always open and close grouping parenthesis/brackets/braces at the same time.

cmhughes
  • 100,947