In a table I want to combine some of the columns, but not in all rows. How can I realize this with LaTeX?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
\multicolumn{<number>}{<formatting>}{<contents>}
Where the arguments are
- Number of columns to merge
- the justification and formating string (just like you use in the table header, i.e. "
|c|
" or the like) - The contents to put in the merged columns
This command simply replaces the <number>
columns and is used inline.
Addition: This is also how you change the formatting of a single field in only one row of the table. Just use \multicolumn{1}{<new format>}{<contents>}
.