I'm trying to use two minipages inside an lstnewenvironment and I'm struggling with top- aligning the two minipages.
\lstnewenvironment{code}
{
\lstset{
language=Python,
mathescape=true,
backgroundcolor=\color{cellbackground},
numbers=right,
numbersep=5pt,
resetmargins=true,
rulecolor=\color{cellbackground}
}
\addtocounter{inputcounter}{1}
\minipage[t]{0pt}
\footnotesize\ttfamily\llap{{\color{incolor}In [\theinputcounter]:\hspace{3pt}\boxspacing}}
\endminipage%
\minipage[t]{\pagewidth}
}{
\endminipage
}
But when I use the new environment, the output looks like this:
Is there any way to make the In [1]: and the 2 + 2 lines aligned (on the same baseline)?
