# Array problem, can only have one row.

I'm not sure what I'm doing wrong, I'm trying to create a line of bits with labels. I'm trying to do this with an array:

$\begin{array}{c|ccccccc} \mbox{L1} & \mbox{L2} & \mbox{L3} & \mbox{L4} & \mbox{L5} & \mbox{L6} & \mbox{L7} & \mbox{L8} 0 & 0 & 1 & 0 & 1 & 0 & 1 & 1 \end{array}$


However this doesn't work, I get the error:

! Extra alignment tab has been changed to \cr.
0 & 1 & 0 & 1 & 0 & 1 & 1 \end{array}$?  It does work if I only have one row. What is going wrong? I'm compiling with pdfLaTeX. Alternatively if there's a better way to do this (I'm trying to label a row of bits so that the distances between the 1s and 0s remains constant) let me know. - ## 1 Answer You have to break line after \mbox{L8}. The following is compiled without any errors: \documentclass{article} \begin{document}$\begin{array}{c | c c c c c c c}

Ah, I thought the  \\  was just an indication of a carriage return, rather than something that needed to be typed, thanks for the help! –  fredley Mar 22 '11 at 20:05
@fredley: Newlines are (usually) treated as spaces by TeX, unless there are two in a row in which case the second is treated like \par. –  TH. Mar 23 '11 at 1:16