15

I created a table in LaTeX, however, I can not put a space after the first row. As you can see the bar of X mean overlaps the \hline. I tried \\[1pt] after \hline, but it produced much more space than I expected. The code I wrote is shown below. Table

\begin{center}
\begin{tabular}{l@{\hskip 0.3in}c@{\hskip 0.2in} c@{\hskip 0.2in} c@{\hskip 0.2in} c@{\hskip 0.3in} l}
\hline
& $\delta$ & $\varepsilon$ & $\eta$ & $w$ & $c_{i}~(i=1,...,k)$\\ 
\hline
$\overline{y}_{RW(st)}=\overline{y}_{st} \dfrac{\overline{X}}{w\overline{x}_{st}+(1-w)\overline{X}}$ & -1 & -1 & -1 & & $(-w)^{i}$\\[10pt]
$\overline{y}_{Gu(st)}=\overline{y}_{st}\left[w\dfrac{\overline{X}}{\overline{x}_{st}}+(1-w)\left(\dfrac{\overline{X}}{\overline{x}_{st}}\right)^{2}\right]$ & -1 & -1 & 1 & & $(-1)^{i}[i(1-w)+1]$\\

....

\hline
\end{tabular}
\end{center}
Mico
  • 506,678
ARAT
  • 555

2 Answers2

19

IMHO the most convenient way is to use the booktabs package to add extra white space around the horizontal lines which are called according to their position \toprule, \midrule and \bottomrule.

\documentclass[a4paper]{article}

\usepackage{amsmath}
\usepackage{booktabs}

\begin{document}
\begin{center}
\begin{tabular}{l@{\hskip 0.3in}c@{\hskip 0.2in} c@{\hskip 0.2in} c@{\hskip 0.2in} c@{\hskip 0.3in} l}
\toprule
 & $\delta$ & $\varepsilon$ & $\eta$ & $w$ & $c_{i}~(i=1,...,k)$\\ 
 \midrule
$\overline{y}_{RW(st)}=\overline{y}_{st} \dfrac{\overline{X}}{w\overline{x}_{st}+(1-w)\overline{X}}$ & -1 & -1 & -1 & & $(-w)^{i}$\\[10pt]
$\overline{y}_{Gu(st)}=\overline{y}_{st}\left[w\dfrac{\overline{X}}{\overline{x}_{st}}+(1-w)\left(\dfrac{\overline{X}}{\overline{x}_{st}}\right)^{2}\right]$ & -1 & -1 & 1 & & $(-1)^{i}[i(1-w)+1]$\\    
\bottomrule
\end{tabular}
\end{center}

\end{document}

booktabs-MWE

Mico
  • 506,678
hakaze
  • 2,978
12

If you don't want to use the approach suggested by @hakaze, viz., to use the rule-drawing commands of the booktabs package, you could inserts a "strut" -- a typographic term as well as a construction/engineering term -- to create more vertical clearance above (for a "top strut") and/or below (for a "bottom strut") the point where the strut is inserted.

The following modified form of your MWE shows how this may be done. Note that I've inserted a top strut in the numerator of the first big math expression and a bottom strut in the subscript of the denominator in one of the terms in second big math expression. For good measure, I've also thrown in a couple of these struts in the header line.

In addition, I've (i) used an array instead of a tabular environment (because all of the environment's contents seem to be in math mode and because the default amount of intercolumn white space is slightly larger for array environments), (ii) replaced the heavy-looking \overline instructions with \bar instructions, and (iii) used explicit size-setting instructions for the large round parentheses and square brackets. (The sizes that result from \left and \right instructions are just too large.)

\documentclass{article}
\usepackage{amsmath}
\newcommand\Tstrut{\rule{0pt}{2.6ex}}       % top strut
\newcommand\Bstrut{\rule[-1.1ex]{0pt}{0pt}} % bottom strut

\begin{document}
$\begin{array}{l rrr c l}
\hline
& \delta & \varepsilon & \eta & w & c_{i}\ (i=1,\dots,k)\Tstrut\Bstrut \\ 
\hline
\bar{y}_{RW(st)}=\bar{y}_{st} \dfrac{\bar{X}\Tstrut}{w\bar{x}_{st}+(1-w)\bar{X}} 
  & -1 & -1 & -1 & & (-w)^{i}\\[10pt]
\bar{y}_{Gu(st)}=\bar{y}_{st}\biggl[
w\dfrac{\bar{X}}{\bar{x}_{st}}+(1-w) 
\biggl(\dfrac{\bar{X}}{\bar{x}_{st\Bstrut}} \biggr)^{2}\,
\biggr] 
  & -1 & -1 & 1 & & (-1)^{i}[i(1-w)+1]\\
\hline
\end{array}$
\end{document}

enter image description here

Mico
  • 506,678