使红色文本适合合并单元格/行的宽度并自动换行而不是导致溢出到下一个单元格和单元格内容的最佳方法是什么?
PS:我从来没有使用过包表格型。
代码:
\documentclass[a4paper]{report}
\usepackage{multirow}
\usepackage{array}
\usepackage{color}
\begin{document}
\begin{table}[h]
\begin{center}
\renewcommand{\arraystretch}{3}
\begin{tabular}{|p{2,5cm}|p{2,5cm}|p{3cm}|p{2cm}|p{2cm}|}
\hline
\multirow{2}*{\textcolor{red}{this is a long text long}} & \multirow{2}*{here is a text} & \multirow{2}*{\textcolor{red}{this is a long text long}} & \multicolumn{2}{c|}{text}\\
\cline{4-5}
& & & \textcolor{green}{it works here text} & here is a text\\
\hline
\multirow{3}*{text} & \multirow{3}*{\textcolor{red}{this is a long text long long}} & \textcolor{green}{split like this long text } & \multirow{3}*{text} & \multirow{3}*{text}\\
& & text & \\
& & text & \\
\hline
\end{tabular}
\end{center}
\end{table}
\end{document}
代码如下:我如何获得具有这种布局的表格?