我想制作一个表格,将其完全分开,与线条下标区分开,我想在上面和下方的行,但没有其他行。
我正在尝试此代码但它并没有给我我想要的东西。
\begin{table}[!ht]
\centering
\caption*{Common Notation}
\begin{tabular}{|l|l|l|}
\hline
{\bf Symbol} & {\bf Description} & {\bf Units} \\ \hline
$\alpha$ & Thermal expansion coefficient & $^\circ$C$^{-1}$ \\ \hline
$\kappa$ & Thermal diffusivity & m$^2$/s \\ \hline
$\eta$ & Dynamic viscosity & Pa s \\ \hline
$\nu$ & Kinematic viscosity & m$^2$/s \\ \hline
C$_{p}$ & Specific Heat Capacity & J/kg$^\circ$C \\ \hline
$\rho$ & Density & kg/m$^3$ \\ \hline
T & Temperature & $^\circ$C \\ \hline
k & Thermal conductivity & W/m$^\circ$C \\ \hline
v & Velocity & m/yr \\ \hline
$\Delta$T=T$_h$-T$_\infty$ & Temperature Difference & $^\circ$C \\ \hline
$\eta$$^*$=$\eta$$_h$-$\eta$$_\infty$ & Viscosity Contrast & Pa s \\ \hline
U & Speed & m/s \\ \hline
y$_T$ & Thermal boundary layer & m \\ \hline
l$_c$ & Plume height after about 2 hours & m \\ \hline
$\tau$$_c$ & Diffusion time & s \\ \hline
$\tau$ & Time the plume first emerges & s \\ \hline
g & Gravitational acceleration & m/s$^2$ \\ \hline
D & Plume Diameter & m \\ \hline
H & Height of the tank &\\ \hline
P & Pressure & Pa \\
\end{tabular}
\begin{tabular}{|l|} subscript \\
\end{tabular}
\begin{tabular}{|l|l|l|}
h & Heater & \\ \hline
$\infty$ & Ambient & \\ \hline
b & Buoyancy & \\ \hline
\end{tabular}
\label{corn}
\end{table}
任何帮助都将不胜感激。非常感谢!
答案1
你想要的看起来像\multicolumn{}{}{}
\begin{tabular}{|l|l|l|}
\hline
something & something & something\\
\hline
\multicolumn{3}{|l|}{very very long line}\\
\hline
something & something & something\\
\hline
something & something & something\\
\hline
\end{tabular}
给你一个这样的表格:
如您所见,第一个参数{}
决定应组合多少列。第二个参数{}
代表这些单元格的格式,第三个参数代表实际内容。
您无需使用新tabular
环境,只需用此行替换它即可\multicolimn
获得所需的结果。
应用这些更改后,您的完整示例应如下所示:
\begin{table}[!ht]
\centering
\caption{Common Notation}
\begin{tabular}{|l|l|l|}
\hline
{\bf Symbol} & {\bf Description} & {\bf Units} \\
\hline
$\alpha$ & Thermal expansion coefficient & $^\circ$C$^{-1}$ \\
\hline
$\kappa$ & Thermal diffusivity & m$^2$/s \\
\hline
$\eta$ & Dynamic viscosity & Pa s \\
\hline
$\nu$ & Kinematic viscosity & m$^2$/s \\
\hline
$C_{p}$ & Specific Heat Capacity & J/kg$^\circ$C \\
\hline
$\rho$ & Density & kg/m$^3$ \\
\hline
T & Temperature & $^\circ$C \\
\hline
k & Thermal conductivity & W/m$^\circ$C \\
\hline
v & Velocity & m/yr \\
\hline
$\Delta$T=T$h$-T$\infty$ & Temperature Difference & $^\circ$C \\
\hline
$\eta$$^*$=$\eta$$h$-$\eta$$\infty$ & Viscosity Contrast & Pa s \\
\hline
U & Speed & m/s \\ \hline
y$_T$ & Thermal boundary layer & m \\
\hline
l$_c$ & Plume height after about 2 hours & m \\
\hline
$\tau$$_c$ & Diffusion time & s \\
\hline
$\tau$ & Time the plume first emerges & s \\
\hline
g & Gravitational acceleration & m/s$^2$ \\
\hline
D & Plume Diameter & m \\
\hline
H & Height of the tank & \\
\hline
P & Pressure & Pa \\
\hline
\multicolumn{3}{|l|}{subscript} \\
\hline
h & Heater & \\
\hline
$\infty$ & Ambient & \\
\hline
b & Buoyancy & \\
\hline
\end{tabular}
\label{corn}
\end{table}