我一直在尝试让表格看起来好看一些。我一直在使用多行,但垂直对齐效果很差。我想使用修复选项(下面 MWE 中的 -0.8in)来移动“跨行文本”的位置。问题在于修复超过某个值时,它似乎只是放大了顶行,我不知道为什么。有人知道发生了什么吗?
谢谢
梅威瑟:
\documentclass[11pt]{report}
\usepackage[left=2.cm,right=2.cm,top=2.cm,bottom=2.cm]{geometry} % Make margins bigger
%%%%%%%%%% Packages %%%%%%%%%%
\usepackage[table,svgnames]{xcolor}
\usepackage{caption}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\caption{Obach results.}
\centering
\begin{tabular}{cccccc} \toprule
Strategy & Details & Cost, \$ & Life expectancy, y & QALE, y & ICER, \$/DALY averted \\ \midrule
\multirow{4}{*}[-0.8in]{1}& 2&7430 & 20.70 & 18.32& \(\cdots\) \\ \cmidrule{2-6}
& 3 & 8190 & 20.67 & 18.22 & Dominated\\ \cmidrule{2-6}
&4 &9400& 20.40 & 17.34 & Dominated \\ \cmidrule{2-6}
& No treatment & 9180 & 19.99 & 17.02 & Dominated \\ \cmidrule{1-6}
\end{tabular}
\label{Obach_results}
\end{table}
\end{document}
答案1
你实际上不需要这样的调整:0.56ex 就足够了:
\documentclass[11pt]{report}
\usepackage[left=2.cm,right=2.cm,top=2.cm,bottom=2.cm]{geometry} % Make margins bigger
%%%%%%%%%% Packages %%%%%%%%%%
\usepackage[table,svgnames]{xcolor}
\usepackage{caption}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\caption{Obach results.}
\centering
\begin{tabular}{cccccc} \toprule
Strategy & Details & Cost, \$ & Life expectancy, y & QALE, y & ICER, \$/DALY averted \\ \midrule
& 2&7430 & 20.70 & 18.32& \(\cdots\) \\ \cmidrule{2-6}
\multirow{2}{*}[-0.6ex]{1} & 3 & 8190 & 20.67 & 18.22 & Dominated\\ \cmidrule{2-6}
&4 &9400& 20.40 & 17.34 & Dominated \\ \cmidrule{2-6}
& No treatment & 9180 & 19.99 & 17.02 & Dominated \\ \cmidrule{1-6}
\end{tabular}
\label{Obach_results}
\end{table}
\end{document}