Alignment of item number in list containing a minipage
This may be solved with \valign
\newcommand{\MyMiniPage}{%
\leavevmode\vtop{\hrule height 0pt \kern-\baselineskip
\valign{\vfill##\vfill\cr
\hbox to 1in{$\begin{aligned}
a &= b\\
c &= d
\end{aligned}$\hfill}\cr
\hbox to1in{$\begin{aligned}
y &= z
\end{aligned}$\hfill}\cr}}
}
I put everything into a \vtop
, where I care to set the first line aligned with the \item
; then it's just a "trivial" \valign
. :)
--- Added after having seen the example ---
In the case of an included standalone file the approach is different:
\documentclass{standalone}
\usepackage{standalone}
\usepackage{paralist}
\newcommand{\iteminput}[2][\topskip-1bp]{%
\leavevmode\vtop{\hrule height 0pt\kern-\dimexpr#1\relax
\input{#2}}}
\usepackage{mathtools}
\usepackage{nccmath} % Removing fixes align, but changes spacing
\begin{document}
\input{ListsProblem-Minipage.tex} % These two correctly yields
\input{ListsProblem-Minipage.tex} % the desired 4 columns
\begin{enumerate}[(a)]
\item First item
\item \iteminput{ListsProblem-Minipage.tex}
\item Third item
\end{enumerate}
\end{document}
The command \iteminput
has an optional argument in case the default back up in the \vtop
is not correct
\iteminput[<dimension>]{filename}