“名义参数”下有 3 个变量,“系数”下有 4 个变量。到目前为止,我有以下内容:
\begin{table}[H]
\centering
\begin{tabular}{| |l|c|c|c|c|c|c|| }
\hline
\multicolumn{7}{|c||}{Nominal parameters}{Coefficients}\\
\hline
1000$C_{E,nom}$ & $v_{s,nom}$ & $a_{CE}$ & $b_{CE}$ & $c_{CE}$ & $d_{CE}$ & $k_{CE}$\\ \hline
10.6863 & 15 & 0.333 & 10.2 & 0.07 & -15 & -0.06\\\hline
\hline
\end{tabular}
\caption{Coefficients of specific resistance\cite{Sui}}
\label{tab:specificres}
\end{table}
我该如何解决这个问题?谢谢
答案1
希望以下标签可以满足您的要求:
\documentclass{book}
\begin{document}
\begin{table}
\centering
\begin{tabular}{l|c|c|c|c|c|c}
\hline
& \multicolumn{3}{|c|}{Nominal parameters} &\multicolumn{3}{|c}{Coefficients}\\
\hline
1000$C_{E,nom}$ & $v_{s,nom}$ & $a_{CE}$ & $b_{CE}$ & $c_{CE}$ & $d_{CE}$ & $k_{CE}$\\ \hline
10.6863 & 15 & 0.333 & 10.2 & 0.07 & -15 & -0.06\\
\hline
\end{tabular}
\caption{Coefficients of specific resistance\cite{Sui}}
\label{tab:specificres}
\end{table}
\end{document}
答案2
我想要的表格设计——根据我的品味——看起来不太好看。我会按如下方式设计:
booktabs
上表是使用 if和tabularx
包编写的:
\documentclass{article}
\usepackage{booktabs, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand\CE{\mathit{CE}}
\newcommand\nom{\mathrm{nom}}
\begin{document}
\begin{table}
\centering
\begin{tabularx}{\linewidth}{@{} l *{6}{C} @{}}
\toprule
& \multicolumn{3}{c}{Nominal parameters}
& \multicolumn{3}{c}{Coefficients} \\
\cmidrule(r){2-4}\cmidrule(l){5-7}
$1000C_{E,\nom}$ & $v_{s,\nom}$ & $a_{\CE}$
& $b_{\CE}$ & $c_{\CE}$ & $d_{\CE}$ & $k_{\CE}$ \\
\midrule
10.6863 & 15 & 0.333
& 10.2 & 0.07 & -15 & -0.06 \\
\bottomrule
\end{tabularx}
\caption{Coefficients of specific resistance \cite{Sui}}
\label{tab:specificres}
\end{table}
\end{document}
我怀疑您的表格中还有更多行,其数字与显示的行相似。在这种情况下,我会考虑使用包S
中的列类型 siunitx
。为了说明如何使用它,您需要提供更多行的内容(如果存在)以证实我的怀疑。
答案3
如果你想尝试以下表格cals 软件包:
\documentclass{book}
\usepackage{cals}
\usepackage{nccmath}
\let\nc=\nullcell % Shortcuts
\let\sc=\spancontent
\begin{document}
\begin{table}
\begin{calstable}
\colwidths{{\dimexpr(\columnwidth/40 *4)\relax} % Table columns relative to margins
{\dimexpr(\columnwidth/40* 7)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}
{\dimexpr(\columnwidth/40* 5)\relax}%
}
% Layout elements
\makeatletter
\def\cals@framers@width{1.2pt}
\def\cals@framecs@width{0pt}
\cals@setpadding{Ag}
\cals@setcellprevdepth{Al}
\def\cals@cs@width{0.4pt}
\def\cals@rs@width{0.4pt}
\abovedisplayskip=-1pt
\belowdisplayskip=-1pt
% R1 Heading
\thead{\bfseries
\brow
\def\cals@cs@width{0.4pt}
\def\cals@rs@width{1.2pt}
\setlength\cals@paddingL{0pt} % Remove left side bearing
\cell{}
\cals@setpadding{Ag}
\nc{ltb}
\nc{tb}
\nc{rtb}\alignC\sc{\vfil Nominal parameters}
\nc{ltb}
\nc{tb}
\nc{tb}
\setlength\cals@paddingR{0pt}
\nc{rtb}\alignC\sc{\vfil Coefficients}
\cals@setpadding{Ag}
\erow
\mdseries}
% R2
\brow
\setlength\cals@paddingL{0pt}
\def\cals@rs@width{0.4pt}
\cell{}
\cals@setpadding{Ag}
\alignC\cell{\vfil 1000$C_{E,nom}$}
\alignC\cell{\vfil$v_{s,nom}$ }
\alignC\cell{\vfil$a_{CE}$}
\alignC\cell{\vfil$b_{CE}$}
\alignC\cell{\vfil$c_{CE}$}
\alignC\cell{\vfil$d_{CE}$}
\alignC\cell{\vfil$k_{CE}$}
\setlength\cals@paddingR{0pt}
\cals@setpadding{Ag}
\erow
%R3
\brow
\setlength\cals@paddingL{0pt}
\alignC\cell{\vfil Value}
\cals@setpadding{Ag}
\alignC\cell{\vfil 10.6863}
\alignC\cell{\vfil 15}
\alignC\cell{\vfil 0.333}
\alignC\cell{\vfil10.2}
\alignC\cell{\vfil0.07}
\alignC\cell{\vfil $-$15}
\alignC\cell{\vfil $-$0.06}
\setlength\cals@paddingR{0pt}
\cals@setpadding{Ag}
\erow
\makeatother
\end{calstable}
\caption{Coefficients of specific resistance\cite{Sui}}
\label{tab:specificres}
\end{table}
\end{document}