如何在沒有列劃分的表中放置一行,但表的其餘部分有劃分

如何在沒有列劃分的表中放置一行,但表的其餘部分有劃分

我想製作一個表格,除了行下標之外,它完全網格化,我只想在上面和下面有行,但沒有其他行。

我正在嘗試這段程式碼,但它沒有給我我想要的。

\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}

相關內容