How do I align the fbox
in the second column to the top so that the top rows of the two match?
I have tried with minipage
and makecell
and a ton of other things but I can't make it work. Any ideas?
PS! The fbox
es will be removed later, they are just for illustration purposes 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}
flalign
for anything else than alignment on the left side?\parbox
command messes up the alignment here. If you use\parbox[t]{...}
instead, bow boxes are to aligned. Since you mention the\fbox
command just being for demonstration purposes, do you really need the\parbox
commands in your actual document?fbox
es andparbox
es. I want the parbox on the left side to add padding to theflalign
and I use it in the other as well for consistency... you have a better idea? Feel free to answer the question and I shall accept the answer. Thanks!