0

When using 2 minipages side by side this works (part 1 of MWE), but not inside an environmen (part 2 of MWE). There I get "underfull \hbox (badness 10000)". What is the reason?

\documentclass{article}

\newenvironment{myenv}
{\noindent
\begin{minipage}{.5\textwidth}
}
{
\end{minipage}%
\begin{minipage}[t][][b]{.5\textwidth}
\vfill

!
\end{minipage}
}
  
\begin{document}

Test

\noindent
\begin{minipage}{.5\textwidth}
Text
\begin{enumerate}
\item A
\item B
\end{enumerate}
\end{minipage}%
\begin{minipage}[t][][b]{.5\textwidth}
\vfill

!
\end{minipage}

Test

\begin{myenv}
Text
\begin{enumerate}
\item A
\item B
\end{enumerate}
\end{myenv}

\end{document}

1 Answer 1

3

Beware adding unwanted space tokens.

\newenvironment{myenv}
{\noindent
\begin{minipage}{.5\textwidth}%
}
{%
\end{minipage}%
\begin{minipage}[t][][b]{.5\textwidth}
\vfill

!
\end{minipage}%
}

works without having an underfull white line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .