i have two tables, each of them has 4 columns. one is just below the other. i want to know how to make every column of the below table have same width of the column of the above table. it looks like this:
|-------|-------|-------|-------|
| | | | |
|-------|-------|-------|-------|
| | | | |
|-------|-------|-------|-------|
| | | | |
|-------|-------|-------|-------|
some space lines are here.
|-------|-------|-------|-------|
| | | | |
|-------|-------|-------|-------|
| | | | |
|-------|-------|-------|-------|
adding one more hline
will make one table septable
, which it looks like two tables with good vertical alignment.
\documentclass{article}
\begin{document}
\begin{tabular}[b]{|c|c|c|c|}
\hline
\textbf{Item-No.} & \textbf{name} & \textbf{cross section} & \textbf{grade}\\
\hline
\textbf{W1} & Z-column & HN350x175 -- 346x174 & Q235\\
\hline
\textbf{W17} & Horiz. support transversal hoist beam & HW100x100 & Q235\\
\hline
\hline
\textbf{P11} & longitudinal hoist beam & HN300x150 -- 300x150 & Q235\\
\hline
\end{tabular}
\end{document}
but one more thing, how to add vertical spacing
between the tables?
Best Answer
The simplest way to add some vertical space between the two logical tables while having the same column width is to only use one real table and add the vertical white space as
\multicolumn
row which includes a\vspace
to make it as high as required. Note that the\multicolumn
is required to disable the vertical borders in the normal cells. Without this a simple empty cell with\vspace
would be enough.You can adjust the white space with the argument of
\vspace{<distance>}
. The value wont be the exact distance because the cell\strut
is also in effect, which adds also a certain depth. If you need exact distances you have to calculate this in.Example Code:
Result: