线太长或中线太短

线太长或中线太短

可能是因为我在表格中设定了规格,所以我无法画一条线覆盖所有的列。如果我画出线,它太宽了,而当我画出中间线时,它又太短了。有人能帮我画一条长度合适的线吗?

\begin{table}[h!]
  \centering
  \caption{Response of \glspl{Tas2r} stimulated with bitter compounds}
    \begin{tabular}{p{15.93em}p{13.57em}p{12.57em}}
    \textbf{Taste receptor} & \textbf{Ligand} & \textbf{Article} \\
    \hline
    TAS2R38 & ptc   & \cite{meyerhof2010molecular} \\
    TAS2R1, TAS2R10 & dxm   & \cite{meyerhof2010molecular} \\
    TAS2R4, TAS2R7, TAS2R10, TAS2R14, TAS2R39, TAS2R40, TAS2R43, TAS2R44, TAS2R46 & quinine & \cite{meyerhof2010molecular} \\
    mouse Tas2r5 & cycloheximide & \cite{chandrashekar2000t2rs} \\
    chicken Tas2r1 & 10 (5 natural and 5 synthetic) & \cite{behrens2014tuning} \\
    chicken Tas2r2 & 8 (6 natural and 2 synthetic) & \cite{behrens2014tuning} \\
    chicken Tas2r7 & 17 (14 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    turkey Tas2r3 & 15 (12 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    turkey Tas2r4 & 8 (5 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r5 & 5 (1 natural and 4 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r6 & 3 (2 natural and 1 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r7 & 5 (3 natural and 2 synthetic) & \cite{behrens2014tuning} \\
    \end{tabular}%
  \label{tab:ligand}%
\end{table}%

答案1

最大的问题是您过度指定了宽度,因此表格比可用的文本宽度更宽。

我建议 X列(来自tabularx)来应对过长的第一列条目,同时也使用垂直空间来分隔各组。

\begin{filecontents*}[overwrite]{\jobname.bib}
@article{meyerhof2010molecular,
 author={X. Meyerhof},
 title={title},
 journal={Journal},
 year={2010},
}
@article{chandrashekar2000t2rs,
 author={Chandrashekar, Y.},
 title={title},
 journal={Journal},
 year={2000},
}
@article{behrens2014tuning,
 author={Behrens, Z.},
 title={title},
 journal={Journal},
 year={2014},
}
\end{filecontents*}

\documentclass{article}
\usepackage{booktabs}
\usepackage{tabularx,array}

\newcommand{\glspl}[1]{#1}% because there is no hint on how glossary is used

\begin{document}

\begin{table}[htp!]
  \centering
  \caption{Response of \glspl{Tas2r} stimulated with bitter compounds}
  \label{tab:ligand}

  \begin{tabularx}{\textwidth}{
    @{}
    >{\raggedright}X
    l
    @{}
    c
    @{}
  }
  \toprule
    \textbf{Taste receptor} & \textbf{Ligand} & \textbf{Article} \\
  \midrule
    TAS2R38 & ptc   & \cite{meyerhof2010molecular} \\
  \addlinespace
    TAS2R1, TAS2R10 & dxm   & \cite{meyerhof2010molecular} \\
  \addlinespace
    TAS2R4, TAS2R7, TAS2R10, TAS2R14, TAS2R39, TAS2R40, TAS2R43, TAS2R44, TAS2R46 & quinine & \cite{meyerhof2010molecular} \\
  \addlinespace
    mouse Tas2r5 & cycloheximide & \cite{chandrashekar2000t2rs} \\
  \addlinespace
    chicken Tas2r1 & 10 (5 natural and 5 synthetic) & \cite{behrens2014tuning} \\
%  \addlinespace
    chicken Tas2r2 & 8 (6 natural and 2 synthetic) & \cite{behrens2014tuning} \\
%  \addlinespace
    chicken Tas2r7 & 17 (14 natural and 3 synthetic) & \cite{behrens2014tuning} \\
  \addlinespace
    turkey Tas2r3 & 15 (12 natural and 3 synthetic) & \cite{behrens2014tuning} \\
%  \addlinespace
    turkey Tas2r4 & 8 (5 natural and 3 synthetic) & \cite{behrens2014tuning} \\
  \addlinespace
    zebra finch Tas2r5 & 5 (1 natural and 4 synthetic) & \cite{behrens2014tuning} \\
%  \addlinespace
    zebra finch Tas2r6 & 3 (2 natural and 1 synthetic) & \cite{behrens2014tuning} \\
%  \addlinespace
    zebra finch Tas2r7 & 5 (3 natural and 2 synthetic) & \cite{behrens2014tuning} \\
  \bottomrule
  \end{tabularx}
\end{table}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

我添加了模拟书目条目来获取实际数字。第三列之前可以没有列间空间,因为这样不会因“文章”标题较宽而产生冲突的风险。

\label与 相关,\caption因此它属于其附近。

在此处输入图片描述

答案2

在此处输入图片描述

\begin{tabular}{p{3cm}p{2cm}p{1cm}}
    \textbf{Taste receptor} & \textbf{Ligand} & \textbf{Article} \\
    \hline
    TAS2R38 & ptc   & \cite{meyerhof2010molecular} \\
    TAS2R1, TAS2R10 & dxm   & \cite{meyerhof2010molecular} \\
    TAS2R4, TAS2R7, TAS2R10, TAS2R14, TAS2R39, TAS2R40, TAS2R43, TAS2R44, TAS2R46 & quinine & \cite{meyerhof2010molecular} \\
    mouse Tas2r5 & cycloheximide & \cite{chandrashekar2000t2rs} \\
    chicken Tas2r1 & 10 (5 natural and 5 synthetic) & \cite{behrens2014tuning} \\
    chicken Tas2r2 & 8 (6 natural and 2 synthetic) & \cite{behrens2014tuning} \\
    chicken Tas2r7 & 17 (14 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    turkey Tas2r3 & 15 (12 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    turkey Tas2r4 & 8 (5 natural and 3 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r5 & 5 (1 natural and 4 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r6 & 3 (2 natural and 1 synthetic) & \cite{behrens2014tuning} \\
    zebra finch Tas2r7 & 5 (3 natural and 2 synthetic) & \cite{behrens2014tuning} \\
\end{tabular}%][1]][1]

相关内容