我正在一个longtable
环境中工作,并且已经对如何改进它和修复一些问题提出了一些建议。
现在,我继续前进,填充了表格,但我得到了一个\hbox 溢出警告可能与单元格内容的大小和S
列类型有关(我猜)。
我确实喜欢使用数学样式的格式和数字对齐,但我想避免警告...有没有办法修复此问题并保留当前样式?下面是结构和相关代码的视图:
\documentclass[12pt]{report}
\usepackage[letterpaper,margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{float}
\usepackage{longtable,booktabs,siunitx}
\renewcommand{\baselinestretch}{1.5}
\newcommand{\smallerbaseline}{\renewcommand{\baselinestretch}{1}\selectfont}
\begin{document}
\begin{longtable}{%
@{\extracolsep{\fill}}
>{\centering\arraybackslash\smallerbaseline\bfseries} p{0.20\linewidth} *{4}{S[table-format=2.2]}
}
\caption[\textbf{Graphs metrics for the \texttt{minigraph-CACTUS} and the \texttt{PGGB} toy-model pangenomes}]{\textbf{Graphs metrics for the \texttt{minigraph-CACTUS} and the \texttt{PGGB} toy-model pangenomes.} Most relevant set of metrics to describe pangenome graphs as per <reference>, the Total length and the Estimated sequence length are both in bp. All values have been derived from \texttt{BandageNG}.}
\label{table:graphs} \\
\toprule
& \multicolumn{4}{c}{\textbf{GRAPH}} \\
\cmidrule{2-5}
& \multicolumn{2}{c}{\texttt{minigraph-CACTUS}}
& \multicolumn{2}{c}{\texttt{PGGB}} \\
\cmidrule{2-3} \cmidrule{4-5}
& {\textit{GRCh38-only}} & {\textit{CHM13}} & {\textit{GRCh38-only}} & {\textit{CHM13}} \\
\cmidrule{2-5}
Node Count & 53471400 & 57987367 & & 61863301 \\
Edge Count & 73629600 & 80019027 & & 85339313 \\
Total length & 790625239 & 975120756 & & 0 \\
Dead ends & 10726 & 10717 & & 5711 \\
Connected components & 4539 & 4549 & & 408 \\
Median depth & 3 & 3 & & 12 \\
Estimated sequence length & 5085592535 & 5270088052 & & 4197455394 \\
\bottomrule
\end{longtable}
\end{document}
另外,表格没有textwidth
像标题那样延伸到顶部,这正常吗?此外,有没有办法让数字在文本换行的单元格中垂直居中例如连通分量和估计序列长度?如能提供任何帮助,我们将不胜感激,在此先行致谢!