如何对齐多行表格内容(文本)并保持表格行的高度相似?

如何对齐多行表格内容(文本)并保持表格行的高度相似?

我已经使用 Tex/Latex 两周了,我是个初学者,但同时对花费我数小时制作表格感到沮丧。
我想很好地对齐这个简单表格(有多行)的元素,即:

1) 每一行应具有相似的高度(尝试解决此 \parbox 但失败了:尽管前两行的高度参数高于其余行,但行高较小???[参见所附的输出图片]
2)多行单元格的内容应始终位于“合并”单元格的中间,或始终与同一行的其他单元格对齐。 3)表格单元格中的所有文本都应水平左对齐并垂直居中(无对齐或分组样式)

非常感谢您的帮助。提前致谢。迈克尔

\begin{table} 
\caption{this is one text example \autocite [Vgl.] [695-770] {Reference29}}
\begin{flushleft}
%\begin{tabularx}{\textwidth}{XXX}
%\begin{tabularx}{\textwidth}{P{0.2\linewidth}P{0.4\linewidth}P{0.4 \linewidth}}
\begin{tabularx}{\textwidth}{P{0.2\linewidth}P{0.3\linewidth}X}
    \toprule
  xxxxxxxxxxxx & xxxxxxxxxxx & xxxxxxxxxxx \\
    \cmidrule{1-3}
    \multirow{4}{\linewidth} {this is one text example} & \multirow{2}{\linewidth}  {this is one text example} & {\parbox[t][4.5ex]{\linewidth}{this is one text example}}\\
    \cmidrule{3-3}
    &  & \parbox[t][4.5ex]{\linewidth}{this is one text example}\\
    \cmidrule{2-3}
    & {this is one text example}
    & {\parbox[t][4.5ex]{\linewidth}{}}\\
    \cmidrule{2-3}  
    & {this is one text example}
    & {\parbox[t][4.5ex]{\linewidth}{}}\\
    \cmidrule{2-3}      
    & {this is one text example}
    & {\parbox[t][4.5ex]{\linewidth}{}}\\
    \cmidrule{1-3}
    this is one text example&{}&{\parbox[t][3.5ex]{\textwidth}{}}\\
    \cmidrule{1-3}
    this is one text example&{}&{\parbox[t][3.5ex]{\textwidth}{}}\\ 
    \cmidrule{1-3}
    \multirow{2}{\linewidth} {this is one text example} &{Bthis is one text example}&{\parbox[t][3.5ex]{\textwidth}{}}\\
    \cmidrule{2-3}
    &{this is one text example}&{\parbox[t][3.5ex]{\textwidth}{}}\\
    \bottomrule
 \end{tabularx}
 \label{tab:Bewertungsmodelle}
 \end{flushleft}
 \end{table}

上述代码示例的 TEX 输出

答案1

在此处输入图片描述

\documentclass{article}
\usepackage{booktabs,array}
\newlength\tabl
\begin{document}
\begin{table} 

\caption{this is one text example }
\tabl=\dimexpr\textwidth-6\tabcolsep\relax
\begin{tabular}{m{0.3\tabl}p{0.35\tabl}p{0.35\tabl}}
    \toprule
  xxxxxxxxxxxx & xxxxxxxxxxx & xxxxxxxxxxx \\
    \cmidrule{1-3}
    this is one text example & 
\multicolumn{2}{@{}c@{}}{\begin{tabular}{p{0.35\tabl}p{0.35\tabl}}
this is one text example &
\multicolumn{1}{@{}c@{}}{\begin{tabular}{p{0.35\tabl}}
this is one text example\\
    \cmidrule{1-1}
    this is one text example
\end{tabular}}\\
    \cmidrule{1-1}
    this is one text example\\
    \cmidrule{1-2}  
    this is one text example
\end{tabular}}\\
    \cmidrule{1-3}      
    this is one text example&&\\
    \cmidrule{1-3}
    this is one text example&&\\
    \cmidrule{1-3}
 this is one text example &
\multicolumn{2}{@{}c@{}}{\begin{tabular}{p{0.35\tabl}p{0.35\tabl}}
Bthis is one text example&\\
    \cmidrule{1-2}
    this is one text example&
\end{tabular}}\\
    \bottomrule
 \end{tabular}
 \label{tab:Bewertungsmodelle}

 \end{table}

\end{document}

相关内容