I use the following code to draw a table:
\makebox[\textwidth]{%
\begin{tabularx}{\textwidth}{|X|S|S|S|S|S|X|}
\hline
& $--$ & $-$ & $-/+$ & $+$ & $++$ &\\
\hline
The necessary information was easy to find & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & The necessary information was hard to find\\
\hline
Information retrieval requires redundant user input & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & Information retrieval does not require redundant user input\\
\\\hline
\end{tabularx}%
}
Now the table looks like this:
If I dont use the last \\\hline
:
\makebox[\textwidth]{%
\begin{tabularx}{\textwidth}{|X|S|S|S|S|S|X|}
\hline
& $--$ & $-$ & $-/+$ & $+$ & $++$ &\\
\hline
The necessary information was easy to find & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & The necessary information was hard to find\\
\hline
Information retrieval requires redundant user input & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & Information retrieval does not require redundant user input\\
\end{tabularx}%
}
It looks like this:
So how can I make the last line correctly?
Best Answer
You have two
\\
now:Before you had no
\\
:which causes the mentioned error.
You need only one
\\
:And then it works properly.
The reason why some lines are missing when you have two
\\
is that the cells are not filled out, e.g. there are not&
in the last row. The lines are only drawn with the cells. Therefore no cells -> no lines.