3

I need to make these tables look the same. With the same column width I would like to make the top row independant and not have any vertical lines. Below the first row the columns should have a line seperating them. (Nothing at the far right og left and double line below the first one). How do i do this?

\begin{table}[H]
\begin{tabular}{|p{1.5cm}S|p{5cm}S|p{1.5cm}S}
\hline
\textbf{Weight}  & \textbf{Velocity of the vehicle} & \textbf{Stable} \\ \hline \hline
\multicolumn{1}{l|}{1 kg}      &            &    \\ 
\multicolumn{1}{l|}{2 kg}      &            &    \\ 
\multicolumn{1}{l|}{3 kg}     &            &    \\ 
\multicolumn{1}{l|}{4 kg}      &            &    \\ 
\multicolumn{1}{l|}{5 kg}     &            &    \\ 
\multicolumn{1}{l|}{6 kg}    &            &    \\ 
\multicolumn{1}{l|}{7 kg}   &            &    \\ 
\multicolumn{1}{l|}{8 kg}  &            &    \\ 
\multicolumn{1}{l|}{9 kg} &            &    \\ 
\multicolumn{1}{l|}{10 kg}&            &    \\ \hline
\end{tabular}
\end{table}

\begin{table}[H]
\begin{tabular}{|p{1.5cm}S|p{5cm}S|p{1.5cm}S}
\hline
\textbf{Angular Velocity}  & \textbf{Velocity of the vehicle} & \textbf{Stable} \\ \hline \hline
\multicolumn{1}{l|}{1 rad/s}      &            &    \\ 
\multicolumn{1}{l|}{2 rad/s}      &            &    \\ 
\multicolumn{1}{l|}{3 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{4 rad/s}      &            &    \\ 
\multicolumn{1}{l|}{5 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{6 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{7 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{8 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{9 rad/s}       &            &    \\ 
\multicolumn{1}{l|}{10 rad/s}      &            &    \\ \hline
\end{tabular}
\end{table}
3

The following may be what you want: Both tables have three columns, the main column type is S, the column types are set to p{<some width>} for the three header cells, vertical bars only in interior (but not edges) of the body of the table.

Note that I suggest placing the common units of measurement -- \si{\kilo\gram} and \si{\radian\per\second}, resp. -- inside the header cell; doing so helps reduce clutter in the bodies of the tables.

You may also want to think about getting rid of the vertical lines entirely. Almost invariably, vertical lines in tables are the visual equivalent of crutches and training wheels. Unless the table is seriously complicated (which does not seem to be the case here), you'll find that the eye can move around much more freely and that the brain actually has more of a chance to take in the meaning of the table if the training wheels and crutches are removed.

\documentclass{article}
\usepackage{siunitx,float,booktabs}
\sisetup{per-mode = symbol} % use "/" symbol 
\begin{document}

\begin{table}
\begin{tabular}{S[table-format=2.0]|S|S}
\toprule
\multicolumn{1}{p{1.5cm}}{\textbf{Weight}}  & 
\multicolumn{1}{p{5cm}}{\textbf{Velocity of the vehicle}} &
\multicolumn{1}{p{5cm}}{\textbf{Stable}} \\
\multicolumn{1}{c}{[\si{\kilo\gram}]}\\
\hline \hline
1      &            &    \\
2      &            &    \\
3      &            &    \\
4      &            &    \\
5      &            &    \\
6      &            &    \\
7      &            &    \\
8      &            &    \\
9      &            &    \\
10     &            &    \\ 
\hline
\end{tabular}
\end{table}

\begin{table}[H]
\begin{tabular}{S[table-format=2.0]|S|S}
\toprule
\multicolumn{1}{p{1.5cm}}{\textbf{Angular Velocity}}  &
\multicolumn{1}{p{5cm}}{\textbf{Velocity of the vehicle}} &
\multicolumn{1}{p{5cm}}{\textbf{Stable}} \\
\multicolumn{1}{c}{[\si{\radian\per\second}]}\\
\hline \hline
1        &            &    \\
2        &            &    \\
3        &            &    \\
4        &            &    \\
5        &            &    \\
6        &            &    \\
7        &            &    \\
8        &            &    \\
9        &            &    \\
10       &            &    \\ 
\hline
\end{tabular}
\end{table}

\end{document} 
  • Thank you very much. This was very helpfull. We will proberly take your advice and remove the vertical lines :-) – Liv Oct 9 '15 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.