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.

The code

\documentclass[a4paper]{article}
\usepackage{multirow}
\begin{document}

\begin{tabular}{|l|l|l|l|l|l|l|}
  \hline
  \multirow{2}{*}{Color Type} & \multirow{2}{*}{Channels} & \multicolumn{5}{c}{Bits per
    channel} \\

  \cline{3-7}

  & & 1 & 2 & 4 & 8 & 16 \\

  \hline

\end{tabular}

\end{document}

Results in the table

enter image description here

How may I fix this code so that a vertical line is also added after "Bits per channel"?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

The reason is as simple as the notation of the column is overwritten by \multicolumn{5}{c}. Try instead: \multicolumn{5}{c|}{Bits per channel}.

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.