[Tex/LaTex] Alignment of item number in list containing a minipage

#enumeratelistsminipagevertical alignment

I would like to have the list number at the beginning of the item, and not centered as is the case for item (b) the example below. If I comment out the \usepackage{nccmath}, I get this, but then the spacing gets messed up. I'd rather keep the nccmath package if possible.

I also do need to keep the [c] for the minipages.

I have looked at Preventing itemize environment to insert initial vertical space and Including an itemized list within a tabular column using the paralist package, but can not get that to work for me.

\documentclass{standalone}

\usepackage{standalone}
\usepackage{paralist} 

\usepackage{mathtools}
\usepackage{nccmath} % Removing fixes vertical align, but changes spacing

\newcommand{\MyMiniPage}{
\begin{minipage}[c]{1.0in}
  \begin{align*}
    a &= b\\
    c &= d
  \end{align*}
\end{minipage}
\begin{minipage}[c]{1.0in}
  \begin{align*}
    y &= z
  \end{align*}
\end{minipage}
}

\begin{document}
\begin{enumerate}[(a)]
  \item First item
  \item \MyMiniPage
  \item Third item
\end{enumerate}
\end{document}

I attempted to use \compress as mentioned in the other posts above, but was not able to get it to work.

—————- Revised posting using \input ————-

This is in the file ListsProblem-Minipage.tex:

\documentclass[preview=false]{standalone}

\usepackage{standalone}
\usepackage{amsmath}

\begin{document}
\begin{minipage}[c]{1.0in}
    \begin{align*}
        a &= b\\
        c &= d
    \end{align*}
\end{minipage}
\begin{minipage}[c]{1.0in}
    \begin{align*}
        y &= z
    \end{align*}
\end{minipage}
\end{document}

This is in the file ListsProblem-Minipage2.tex:

\documentclass[preview=false,fleqn]{standalone}

\usepackage{standalone}
\usepackage{amsmath}

\begin{document}
%\begin{minipage}{3.0in}
\begin{align*}
                (-3)^4 &= 81\\
\frac{5^{23}} {5^{21}} &= 25
\end{align*}
%\end{minipage}
\end{document}

And here is the main file:

\documentclass[fleqn]{standalone}

\usepackage{standalone}
\usepackage{paralist} 

\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 \input{ListsProblem-Minipage.tex}
    \item \input{ListsProblem-Minipage2.tex}  % not in a mini-page
    \item Third item
\end{enumerate}
\end{document}

Note that the item label (b) is not aligned with the top of the two center aligned mini pages. The alignment of the (b) with the mini-pages that I want can be seen by commenting out the \usepackage{nccmath}. But I want a solution that does not require me to abandon the nccmath package. Commeting this out also screws up the spacing.

Best Answer

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}