表格合并单元格后指定列宽不能自动换行

2019-12-18 13:32发布

如题,下面是MWE。 ```tex \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{a...

如题,下面是MWE。 ```tex \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{multirow} \usepackage[left=3.18cm, right=3.18cm, top=2.54cm, bottom=2.54cm]{geometry} \begin{document} {\renewcommand{\arraystretch}{1.5} \begin{table*}[htbp] \caption{xxxxx} \centering %\setlength{\tabcolsep}{1.3mm}{ \begin{tabular}{p{2.7cm}|p{2cm}|p{3cm}|p{3cm}|p{4.5cm}} \hline\hline xxxxxx & xxxxx & xxxx xxxx & xxxxxx & xxxxxx \\ \hline xxxxxxxxxxxx & \multirow{4}*{This is example This is example This is example } & \multirow{4}*{This is example This is example This is example } & \multirow{4}*{This is example This is example This is example } &This is example This is example This is example This is example\\ \cline{1-1}\cline{5-5} xxxxxxxxx xxxxxxxxx & ~ & ~ & ~ &\begin{itemize} \item This is example This is example This is example This is example This is example \item This is example \end{itemize}\\ \hline \end{tabular} \end{table*} } \end{document} ```
2条回答
没有仔细看用法: ```tex \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{multirow} \usepackage[left=3.18cm, right=3.18cm, top=2.54cm, bottom=2.54cm]{geometry} \begin{document} {\renewcommand{\arraystretch}{1.5} \begin{table*}[htbp] \caption{xxxxx} \centering %\setlength{\tabcolsep}{1.3mm}{ \begin{tabular}{p{2.7cm}|p{2cm}|p{3cm}|p{3cm}|p{4.5cm}} \hline\hline xxxxxx & xxxxx & xxxx xxxx & xxxxxx & xxxxxx \\ \hline xxxxxxxxxxxx & \multirow{4}{2cm}{This is example This is example This is example } & \multirow{4}{2cm}{This is example This is example This is example } & \multirow{4}{2cm}{This is example This is example This is example } &This is example This is example This is example This is example\\ \cline{1-1}\cline{5-5} xxxxxxxxx xxxxxxxxx & ~ & ~ & ~ &\begin{itemize} \item This is example This is example This is example This is example This is example \item This is example \end{itemize}\\ \hline \end{tabular} \end{table*} } \end{document} ```

一周热门 更多>