Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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.

share|improve this question
    
Can you give an example of your code? Have you had a look at the latex wiki here? –  user1368342 May 3 '13 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 '13 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 '13 at 19:41
add comment

migrated from stackoverflow.com May 3 '13 at 18:58

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

marked as duplicate by Werner, Xavier, Guido, Kurt, Marco Daniel May 3 '13 at 21:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 0 down vote accepted

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}

Result

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

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.