8

I'm trying to insert multiple equations in a tabular environment in LaTeX. My problem is simple yet I haven't found any particular solution to it: the equations displayed are too small, and I'd like to increase their size so that I can obtain something less ugly than that (especially the last equation):

What I got so far...

I tried various tricks found here and there (\displaystyle, \def\arraystretch{3}, etc.), but nothing work really well.

Werner
  • 603,163
ecniv
  • 83

1 Answers1

14

It may just be that you're not placing \displaystyle in the appropriate place. Here are some options, and there are many more, depending on your requirements:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\verb|tabular (default)|:\par
\begin{tabular}{ccl}
  Eq1 & $\sum_{i=1}^N |x A_i-x_i^B|$ & $a+b-2c$ \\ \\
  Eq2 & $\sqrt{\sum_{i=0}^N(x A_i-x B_i)^2}$ & $\sqrt{a+b-2c}$ \\ \\
  Eq3 & $\frac{\sum_{i=0}^N|x A_i-x B_i|}{\sum_{i=0}^N\max(x A_i-x B_i)}$ & $\frac{a+b-2c}{a+b-c}$
\end{tabular}
\bigskip

\verb|tabular (\displaystyle)|:\par
\begin{tabular}{ccl}
  Eq1 & $\displaystyle\sum_{i=1}^N |x A_i-x_i^B|$ & $a+b-2c$ \\ \\
  Eq2 & $\displaystyle\sqrt{\sum_{i=0}^N(x A_i-x B_i)^2}$ & $\sqrt{a+b-2c}$ \\ \\
  Eq3 & $\displaystyle\frac{\displaystyle\sum_{i=0}^N|x A_i-x B_i|}{\displaystyle\sum_{i=0}^N\max(x A_i-x B_i)}$ & 
    $\displaystyle\frac{a+b-2c}{a+b-c}$
\end{tabular}
\bigskip

\verb|array (amsmath)|:\par
\[\begin{array}{c@{\quad}c@{\qquad}l}
  \text{Eq1} & \displaystyle\sum_{i=1}^N |x A_i-x_i^B| & a+b-2c \\ \\
  \text{Eq2} & \displaystyle\sqrt{\sum_{i=0}^N(x A_i-x B_i)^2} & \sqrt{a+b-2c} \\ \\
  \text{Eq3} & \dfrac{\displaystyle\sum_{i=0}^N|x A_i-x B_i|}{\displaystyle\sum_{i=0}^N\max(x A_i-x B_i)} & 
    \dfrac{a+b-2c}{a+b-c}
\end{array}\]

\end{document}

Since you are displaying math, it's advisable to use an array environment, or perhaps amsmath's align environments. This would allow you to automatically number the equations.

You can change the spacing between columns using a @{<stuff>} specifier (as I've done in the last example). Vertical spacing is achieved through adding additional empty rows, or increasing \arraystretch. For more on this topic, see Column padding in tables.

Moriambar
  • 11,466
Werner
  • 603,163