Skip to content

表格中同时使用强制换行和自动换行对不齐 #782

Answered by LogCreative
qiaoxiaoyue asked this question in 提问
Discussion options

You must be logged in to vote

\tabincell 应该是自定义的宏,或许你参考了 这个博客,那么你应当修改宏的定义为

\newcommand{\tabincell}[2]{\begin{tabular}[t]{@{}#1@{}}#2\end{tabular}}
\begin{document} % 添加 [t] 参数

更多信息可以参考 learnlatex.org 更多:表格

MWE
\documentclass{ctexart}
\usepackage{array}
\newcommand{\tabincell}[2]{\begin{tabular}[t]{@{}#1@{}}#2\end{tabular}}
\begin{document}
    \begin{table}
        \begin{tabular}{|l|l|l|p{3cm}|p{3cm}|}
            \hline
            \multicolumn{1}{|c|}{时间} & \multicolumn{1}{c|}{提出者} & \multicolumn{1}{c|}{原理} & \multicolumn{1}{c|}{优势特点} & \multicolumn{1}{c|}{劣势不足} \\
            \hline
            1985 & \tabincell{c}{Raugh M R \\ 斯坦福大学} & 群论 & 确定自校准基本模型,奠定理论基础 & 未实验论证,对噪声敏感 \\
            \hline
        \end{tabular

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@qiaoxiaoyue
Comment options

Answer selected by qiaoxiaoyue
Comment options

You must be logged in to vote
1 reply
@LogCreative
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
提问
Labels
None yet
3 participants