最少的代码
\documentclass{article}
\usepackage
{%
array,
calc,
amsmath,
longtable,
varwidth%
}
\newsavebox\TBox
\newcolumntype{B}[1]
{%
@{}%
>{\begin{lrbox}{\TBox}\varwidth{\linewidth}}%
m{#1\linewidth-1.5\arrayrulewidth}%
<{%
\endvarwidth\end{lrbox}\fboxrule=0pt%
\fboxsep=15pt\fbox{\usebox\TBox}%
}%
@{}%
}
\begin{document}
\begin{longtable}{|*2{B{0.5}|}}\hline
\begin{align}
a &= b
\end{align}
& c \tabularnewline\hline
\end{longtable}
\end{document}
在表格单元格中&
使用时如何避免冲突?\begin{align}
答案1
如果您在单元格中使用\parbox
或,则将按预期工作,并且您还会获得方程编号。例如:minipage
&
\begin{longtable}{|*2{B{0.5}|}}\hline
\parbox{.5\linewidth}{%
\begin{align}
a &= b
\end{align}}
& c \tabularnewline\hline
\end{longtable}