# LaTeX \bar in table [duplicate]

I'm very new to Latex. So i want to put a \bar W in a table but the bar is covered by the horizontal line of table.So it becomes invisible. I tried adding \noalign{\smallskip} after \hline but it cuts the vertical line of the table. Any suggestion?

Here is the code:

\begin{center}
\begin{tabular}{ | l |  l |}
\hline
$\bar W$ & $A$  \\ \hline  \noalign{\smallskip}
$\bar W$ & $A$  \\ \hline
... & ... \\ \hline
\end{tabular}
\end{center}


First bar is invisible and second one cuts the table.

-
Can you give an example of your code? Have you had a look at the latex wiki here? –  user1368342 May 3 at 14:45
You can use vertical struts in your table rows to move content up/down. For example, a vertical strut \rule{0pt}{1em} is high enough to expose the \bar. It's a zero-width rule of height 1em. There are other ways as well, most of which are contained in Column padding in tables. –  Werner May 3 at 16:51
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  egreg May 3 at 19:41

## migrated from stackoverflow.comMay 3 at 18:58

This question came from our site for professional and enthusiast programmers.

## marked as duplicate by Werner, Xavier, Guido, Kurt, Marco DanielMay 3 at 21:06

Package array provides the length \extrarowheight that is added to each table row:

\documentclass{article}
\usepackage{array}
\setlength{\extrarowheight}{.5ex}
\begin{document}
\begin{center}
\begin{tabular}{ | l |  l |}
\hline
$\bar W$ & $A$  \\ \hline
$\bar W$ & $A$  \\ \hline
... & ... \\ \hline
\end{tabular}
\end{center}
\end{document}


The effect can also be limited to the single table by setting \extrarowheight inside the center environment.

-