答案1
tabularx
我会用和来做multirow
。注意 的第一个参数\multirow
不是行数,而是线,因此它实际上取决于行的实际内容,并且需要一个可选参数进行小幅修正。我还为行提供了一些垂直填充,设置\arraystretch
为值 > 1。
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage[showframe]{geometry}
\usepackage{array, tabularx, multirow}%
\newcolumntype{Y}{>{\hsize=.34\hsize\arraybackslash}X}
\newcolumntype{Z}{>{\hsize=.66\hsize\arraybackslash}X}
\begin{document}
\begin{table}[!htb]
\centering\renewcommand\arraystretch{1.25}
\begin{tabularx}{0.8\linewidth}{|Y|Y|Z|Z|}
\hline
\multicolumn{2}{|l|}{\bfseries Fonction} & \bfseries Description & \bfseries Degré \\
\hline
\multirow{8}{\hsize}[1.2ex]{\centering Some labels (centred)} & A & I want this text to be justified & \multirow{8}{\hsize}[1.2ex] {\centering Some description (I want it to be centred)}
\\
\cline{2-3}
& B & I want this text to be justified & \\
\cline{2-3}
& C & I want this text to be justified & \\
\cline{2-3}
& D & I want this text to be justified & \\
\hline
\multicolumn{2}{|l|}{Some labels} & I want this text to be justified & Some labels \\
\hline
\end{tabularx}
\end{table}
\end{document}