![在 tabularx 中将 flalign 和 itemize 对齐到顶部](https://linux22.com/image/418980/%E5%9C%A8%20tabularx%20%E4%B8%AD%E5%B0%86%20flalign%20%E5%92%8C%20itemize%20%E5%AF%B9%E9%BD%90%E5%88%B0%E9%A1%B6%E9%83%A8.png)
如何将fbox
第二列中的对齐到顶部,以便两行的顶部匹配?我尝试过minipage
和makecell
以及大量其他方法,但无法成功。有什么想法吗?
PS!fbox
es 稍后将被删除,它们只是为了说明目的 DS
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{amsmath}
\begin{document}
\begin{tabularx}{\linewidth}{|>{\centering\arraybackslash}X|>{\centering\arraybackslash}X|}
\hline
\fbox{\parbox{0.9\linewidth}{
\vspace{-4mm}
\begin{flalign}
&a + b = 100 &&\\[2mm]
&10c + e = 1000 &&\\[2mm]
&a + b = 100 &&\\[2mm]
&c + e = 1000 &&
\end{flalign}
\vspace{-6mm}
}}
&
\fbox{\parbox{0.9\linewidth}{
\begin{itemize}[topsep=0pt, leftmargin=*]
\item{B1}
\end{itemize}
}}\\
\hline
\end{tabularx}
\end{document}
答案1
您可能对以下内容感兴趣:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{amsmath}
\begin{document}
\noindent
{
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\begin{tabularx}{\linewidth}{|@{\hspace{0.5cm}}>{\centering\arraybackslash}X@{\hspace{0.5cm}}|>{\centering\arraybackslash}X|}
\hline
{\begin{flalign}
&a + b = 100 &&\\
&10c + e = 1000 &&\\
&a + b = 100 &&\\
&c + e = 1000 &&
\end{flalign}}
&
\begin{itemize}[topsep=0pt, leftmargin=*]
\item{B1}
\end{itemize}
\\
\hline
\end{tabularx}
}
\end{document}