I am trying to make sure the items in my list remain in the same page so I put them in a samepage environnment, but the line distance of the previous page automatically changed to fit the change that go with the samepage environment. Is there a way to keep the distance between lines of previous page the same?
1 Answers
It would have been really helpful if you had provided an MWE (from \documentclass... to \end{document}) that showed your problem. As it is I have no idea what you have done so I had to waste time coming up with something that might be like your code.
Try using a minipage environment that will not break across pages.
% samepageprob.tex SE 565746
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1-6]
\begin{samepage}
%\begin{minipage}{\textwidth}
\begin{itemize}
%\begin{minipage}{\textwidth}
\item First
\item Second
\item Third
%\end{minipage}
\end{itemize}
%\end{minipage}
\end{samepage}
\lipsum[2]
\end{document}
The above MWE is an attempt at what your code might look like. Try (un)commenting the several environments to see what their effects are.
In any case my use of the samepage hs no effect on the surrounding text.
- 28,066
\samepagecommand still works, but is now of little use." – Peter Wilson Oct 07 '20 at 16:54