由于表格比页面宽,最右边会出现一条黑色条纹。我尝试\\
在第一行的单词之间添加,但这似乎不是正确的答案,因为它会破坏所有内容。
我的问题是,在不改变字体大小的情况下,如何才能使第一行(\toprule
和之间\midrule
)变窄?
\documentclass{article}
\usepackage{amssymb}
\usepackage{booktabs,threeparttable}
\begin{document}
\begin{table}[ht]
\caption{Synthesizable circuits summary.}
\label{tab:summary}
\centering
\begin{threeparttable}
\begin{tabular}{lccccc}
\toprule
$\;$ & TDC~[4] & LDO~[8] & VCO~[10] & Flash~ADC~[9] & VCO-based~ADC~[18] \\
\midrule
\textbf{Technology~(nm)} & 65 & 130 & 65 & 90 & 65 \\
\textbf{Synthesizable} & Yes & Yes & Yes & Yes & Yes\textsuperscript{\textdaggerdbl} \\
\textbf{Supply Voltage~(V)} & 1.2* & 0.6 & 1.2 & 1.2\textsuperscript{$\blacklozenge$} & 1.2* \\
\textbf{Power~(mW)} & 0.010-0.150\textsuperscript{\textbullet} & --- & --- & 34.8\textsuperscript{$\blacklozenge$} & 1.4 \\
\textbf{Dye Area~(mm\textsuperscript{2})} & 0.001 & --- & --- & 0.18 & --- \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item * Assumed
\item \textbullet~Normalized to 1MS/s
\item $\blacklozenge$~One of the tested modes
\item \textdaggerdbl~Needs 2 exterior passive components
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
结果表:
答案1
在标题单元格中引入换行符、不将单元加粗以及消除表格左右边缘不需要的空白,使得表格材料适合文本块。
既然您正在使用该软件包,那么请养成正确threeparttable
使用它的机器的习惯。\tnote
(以下问题中的问号是因为\cite
无法解决指令而出现的。)
\documentclass[draft]{article}
\usepackage{threeparttable}
\usepackage{booktabs,amssymb,siunitx} % these three packages are also needed...
\newcommand\gls[1]{#1} % ?? % please provide the correct definition...
\begin{document}
\begin{table}[ht]
\caption{Synthesizable circuits summary.}
\label{tab:summary}
\centering
\begin{threeparttable}
\begin{tabular}{@{} lccccc@{}}
\toprule
& \gls{TDC} & \gls{B} & \gls{VCO} & Flash & \gls{VCO}-based \\
& \cite{A} & \cite{C} & \cite{D} & \gls{ADC}~\cite{E} & \gls{ADC}~\cite{F} \\
\midrule
\textbf{Technology} (\si{\nano\meter}) & 65 & 130 & 65 & 90 & 65 \\
\textbf{Synthesizable} & Yes & Yes & Yes & Yes & Yes\tnote{\textdaggerdbl} \\
\textbf{Supply Voltage} (\si{\volt}) & 1.2\tnote{*} & 0.6 & 1.2 & 1.2\tnote{$\blacklozenge$} & 1.2\tnote{*} \\
\textbf{Power}~(\si{\milli\watt}) & 0.010--0.150\tnote{\textbullet} & -- & -- & 34.8\tnote{$\blacklozenge$} & 1.4 \\
\textbf{Dye Area}~(\si{\milli\meter\squared}) & 0.001 & -- & -- & 0.18 & -- \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item[*] Assumed
\item[\textbullet] Normalized to 1MS/s % huh?!
\item[$\blacklozenge$] One of the tested modes
\item[\textdaggerdbl] Needs 2 exterior passive components
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
答案2
与 Mico 的答案类似,但对于列标题,我建议使用包thead
中的makecell
选项,对于第一列使用选项>{\bfseries}
:
编辑:
第一次尝试时,表格仍然溢出到右侧。可以使用以下方法获得等于文本宽度的表格宽度,\begin{tabular*}{\linewidth}{...}
然后设置列分隔@{\extracolsep{\fill}}
:
\documentclass{article}
\usepackage{booktabs, makecell, threeparttable}
\renewcommand\theadfont{\bfseries\normalsize}
\usepackage{amssymb}
\usepackage{showframe}% for shoe page layout, in real application had to be deleted
\renewcommand*\ShowFrameColor{\color{red}}
\begin{document}
\begin{table}[ht]
\caption{Synthesizable circuits summary.}
\label{tab:summary}
\setlength\tabcolsep{3pt}
\centering
\begin{threeparttable}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}>{\bfseries}lccccc}
\toprule
& \thead{TDC\\ \cite{4}} & \thead{LDO\\ \cite{8}} & \thead{VCO\\ \cite{10}}
& \thead{Flash ADC\\ \cite{9}} & \thead{VCO-based\\ ADC \cite{18}} \\
\midrule
Technology (nm) & 65 & 130 & 65 & 90 & 65 \\
Synthesizable & Yes & Yes & Yes & Yes & Yes\tnote{\textdaggerdbl} \\
Supply Voltage (V) & 1.2\tnote{*} & 0.6 & 1.2 & 1.2\tnote{$\blacklozenge$} & 1.2* \\
Power~(mW) & 0.010-0.150\tnote{$\bullet$}
& --- & --- & 34.8\tnote{$\blacklozenge$}& 1.4 \\
Dye Area (mm\textsuperscript{2})
& 0.001 & --- & --- & 0.18 & --- \\
\bottomrule
\end{tabular*}
\begin{tablenotes}
\small
\item[*] Assumed
\item[$\bullet$] Normalized to 1MS/s
\item[$\blacklozenge$] One of the tested modes
\item[\textdaggerdbl] Needs 2 exterior passive components
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}