我正在尝试在Latex中创建表,但没有成功.我尝试了不同的解决方案,但没人能解决我的问题. 我想创建一个表格,如下图所示:
I'm trying to create a table in Latex but without success. I tried different solutions but no one solves my problem. I would like create a table like the picture below:
任何人都可以在乳胶中显示如何做到这一点吗?
Can anyone show how to do this in latex please?
推荐答案第一个草图可能如下:
\documentclass{article} \usepackage{multirow} \begin{document} \begin{tabular}{|c|c|c|c|c|c|} \hline \multirow{3}{*}{A} & \multicolumn{2}{c|}{User B} & % \multicolumn{2}{c|}{User C} & \multirow{3}{*}{D}\\ \cline{2-5} & \multicolumn{2}{c|}{Value} & \multicolumn{2}{c|}{Value} & \\ \cline{2-5} & B1 & B2 & C1 & C2 & \\ \hline & & & & & \\ \hline & & & & & \\ \hline % etc. ... \end{tabular} \end{document}它产生:
附录:
\documentclass{article} \usepackage{multirow} \begin{document} {\sffamily % \begin{tabular}{|c|c|c|c|c|c|c|}% seven columns now, not six... \hline \multirow{3}{*}{A} & \multicolumn{2}{c|}{User B} & \multirow{3}{*}{X} & % \multicolumn{2}{c|}{User C} & \multirow{3}{*}{D}\\ \cline{2-3}\cline{5-6} & \multicolumn{2}{c|}{Value} & & \multicolumn{2}{c|}{Value} & \\ \cline{2-3}\cline{5-6} & B1 & B2 & & C1 & C2 & \\ \hline & & & & & & \\ \hline & & & & & & \\ \hline % etc. ... \end{tabular} }% \end{document}产生:
请严格检查原始代码与后者之间的所有差异.
Please, critically check all the differences between the original code and this latter.
别忘了几个LaTeX软件包可以帮助您改善样式,尺寸和桌子间距:其中,我建议您看看 bigstrut .
Don't forget that several LaTeX packages can help you improving style, dimensions and spacing of your table: among these, I advise you to have a look at bigstrut.
也:
\documentclass{article} \usepackage{multirow} \begin{document} \begin{tabular}{|c|c|c|c|c|c|c|} \hline \multirow{3}{*}{A} & \multirow{3}{*}{X} & \multicolumn{2}{c|}{User B} & \multicolumn{2}{c|}{User C} & \multirow{3}{*}{D}\\ \cline{3-6} & & \multicolumn{2}{c|}{Value} & \multicolumn{2}{c|}{Value} & \\ \cline{3-6} & & B1 & B2 & C1 & C2 & \\ \hline & & & & & & \\ \hline \end{tabular} \end{document}您现在应该可以对表格模型进行进一步的更改.
You should now be able to operate on your own further changes to the model of table.
更多推荐
乳胶表多行多列
发布评论