I was working on some tables and thought about having the text for the leftmost index wrapped on two lines.
However, I wish to have the linespacing for cells with text wrapped – Connected components
and Estimated sequence length
– to be smaller than the overall setting for the document just to make clear we are still within the same cell. See below for an example:
and related code
\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}
\begin{document}
\begin{longtable}{@{\extracolsep{\fill}} p{0.20\linewidth} *{4}{S[table-format=2.2]}}
\caption[\textbf{}]{\textbf{} }
\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}
\centering\textbf{Node Count} & \\
\centering\textbf{Edge Count} & \\
\centering\textbf{Total length} & \\
\centering\textbf{Dead ends} & \\
\centering\textbf{Connected components} & \\
\centering\textbf{Median depth} & \\
\centering\textbf{Estimated sequence length} & \\
\midrule[\heavyrulewidth]
\end{longtable}
\end{document}
Now, I tried some options but they all screwed up the between-cell spacing... is there a way to do so locally just for those two cells preserving the overall document formatting? Thanks in advance!
\centering
doesn't take an argument.