# How can I be sure that there are also lines between the boxes that are empty [duplicate]

I have a problem with Latex, TeXmaker (program). I would like to make a table but the last two boxes are empty, but how can I be sure that there are also lines between the boxes that are empty? Now there is just one big opening? This is the code that I am using:

\begin{tabular}{|c|c|c|}
\hline
1 & 2 & 3\\ \hline
4 & 5 & 6\\ \hline
7 \\
\hline
\end{tabular}


## migrated from matheducators.stackexchange.comMay 27 '16 at 13:52

This question came from our site for those involved in the field of teaching mathematics.

• Welcome to TeX.SX! Your post was migrated here from another Stack Exchange site. 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. – user36296 May 27 '16 at 14:00
• try 7 & & \\ . – user36296 May 27 '16 at 14:01
• As there are an awful lot of lines in your table, maybe you are interested to have a look at inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf – user36296 May 27 '16 at 14:06

As samcarter already said, you have to use 7 & & \\. This is required because in the case of 7 \\ Latex can not determine, if you mean 7 & & \\, & 7 &\\ or & & 7\\.
• if there are no &s preceding the 7, latex will assume that it is in the first column. the problem is that latex assumes that the later columns don't need to be delineated since they are empty. (there actually do exist tables that are asymmetrical in this manner.) – barbara beeton May 27 '16 at 14:23