# Using \frac within a table

Does \frac not work from within a table? I need to reproduce the formulae for various methods on this page - here. I for example use

Normalized Square Difference & \frac{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}\\


but I see no fraction in the table. Any suggestions?

-
Have you tried enclosing the equation in $<equation>$? If that doesn't help, you should post a complete minimal working example to reproduce the problem. – Jake Jun 18 '11 at 0:50
I even tried just a normal \frac{1}{1} instead of the above and it doesnt work.Could you tell me the code for one of these?I'd translate it accordingly – rty Jun 18 '11 at 0:55
Try $\frac{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}$, i.e. enclose the equation in dollar signs to put them into math mode. – Jake Jun 18 '11 at 0:59
Or, if most of the table is in math mode, surround the entire table with $ and $, and surround the non-math within a \text{} macro. – Peter Grill Jun 18 '11 at 1:36
@Jake : Thanks a lot! it worked :) – rty Jun 18 '11 at 5:44

## 1 Answer

Equations need to be in math mode, so you should surround the equations with dollar ($) signs: Normalized Square Difference &$\frac{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}{\sum_{x',y'} (A(x',y')-B(x+x',y+y'))^2}\$\\

-