I have the following but in the cells where there are the results the cell box lines are not showing correctly as you can see in the screenshot. Any help to solve this? Thanks
Table
\begin{table}[htbp]
\centering
\begin{tabular}{|{1cm}|{2.5cm}|{2.5cm}|{2.5cm}|}
\hline
Question & Yes & No & Maybe \\
\hline
As a Coach, would you use this type \\ of system instead of the traditional
method?
& 11 & 2 & 2 \\
\hline
Do you think that this system will \\ save you time to identify a player's
position? & 9 & 2 & 4 \\
\hline
Does the system has any errors/bugs \\ that interfered during the testing?
& 3 & 12 & 0 \\
\hline
Do you think the system achieved the \\ necessary results for your work?
& 10 & 4 & 1 \\
\hline
Is the System user-friendly to use? &
14 & 0 & 1 \\
\hline
\end{tabular}
\label{table:3}
\end{table}
Result.
Best Answer
Your code contains invalid column specifications. Instead of
{1cm}
you maybe intended to usep{1cm}
. However, if I add the missing letters to make the code compilable, I don't get the output you show in your question as the first column is very narrow. Changing the column specifier of the first column top{7cm}
or something else and the last three columns toc
type columns gives us a result that is close to the screenshot.The missing vertical lines are caused, because the second row of your table misses three
&
signs. If you add them, the vertical lines will be complete. However, if you usep
type columns, there is no need for manual linebreaks. See first table in my MWE.If you nevertheless insist on manual linebreaks inside of table cells, use
\newline
insead of\\
. To horizontally center the text in the first column, use>{\Centering}p{7cm}
. If you also want vertically centered, text, replacep
bym
. (See second table in my MWE).Personally, I would suggest a different layout using the
tabularx
package for anX
type column that automatically calculates the width of the respective column so that the whole table is as wide as a specified widht (textwidth inn my example). Also I'd avoid vertical lines and replace teh horizontal lines by rules from thebooktabs
package. (See third table in my MWE):