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.

I have a simple table:

\begin{table}[htbp]
    \centering
    \begin{tabular}{|c|c|c|}
        \hline
        X & Y & Z \\ \hline
        &   &   \\ \hline 
        &   &   \\ \hline
        &   &   \\ 
        \hline
    \end{tabular}
\end{table}

I would like to remove the border from all cells in the last column Z.

Is this possible by any chance?

share|improve this question
    
Use \cline{1-2} instead of \hline and use {|c|c|c} in the column specification of your tabular environment. –  Jubobs Apr 7 '13 at 18:52
add comment

1 Answer 1

up vote 6 down vote accepted

You should remove the last vertical line from the tabular column specification, and use \clines:

enter image description here

\documentclass{article}
\begin{document}
\begin{tabular}{|c|c|c|}
    \hline
    X & Y & Z \\ \hline
    1 &   &   \\ \hline 
    & 2  &   \\ \hline
    &   & 3  \\ 
    \hline
\end{tabular}

\begin{tabular}{|c|c|c}
    \cline{1-2}
    X & Y & Z \\ \cline{1-2}
    1 &   &   \\ \cline{1-2} 
    & 2  &   \\ \cline{1-2}
    &   & 3  \\ 
    \cline{1-2}
\end{tabular}

\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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