I intend to combine the itemize environment with the minipage environment to prevent paragraphs from appearing on separate pages, but as a result the alignment of the bullet and the text changes from

to

To clarify, I'm looking for a way to combine minipage and itemize/enumerate like the code below to get the same spacing between the bullet and text as in the first example.
\documentclass{article}
\begin{document}
\begin{itemize}
\item
\begin{minipage}{\textwidth}
Lorem\\
Ipsum
\end{minipage}
\end{itemize}
\end{document}
EDIT:
The option [t] for minipage has been suggested, and generally works, but is not fully compatible with other environments. When pairing it with the array environment as follows, the bullet resets to a centered position.
\documentclass{article}
\begin{document}
\begin{itemize}
\item
\begin{minipage}[t]{\textwidth}
$\begin{array}{rcl}
x &=& y\\
y &=& x\\
2x &\neq& 5y
\end{array}$
\end{minipage}
\end{itemize}
\end{document}




\begin{minipage}[t]{\textwidth}, it works. – Bernard Mar 04 '19 at 14:10\textwidthwith\linewidth. No\dimexprnecessary. – Bernard Mar 04 '19 at 14:15lstlistingenvironment from thelistingspackage. Using the same logic with which you solved the array exception, I get a ton of errors I'm not expecting. – Iterniam Mar 04 '19 at 14:34lstlisting, andmintedorverbatimare very special environments. However, do you really want to have alstlistingin an\item? It is very rare! – Mar 04 '19 at 14:39\sectionanditemize. I found that forlstlistingthe command\vspace{-1.5\baselineskip}before starting the environment works well. – Iterniam Mar 04 '19 at 14:54\begin{array}[t]should work too – koleygr Mar 04 '19 at 14:56