How do I prevent Item that is started on one page from continuing in another in Latex?

4

I work with a COPPE / UFRJ Coppetex template in my dissertation work.

I made a numbered list with the command \item but as the list was at the bottom of the page there is one of the points that started at the end of the page and finished at the beginning of the next page.

The problem that was so little in the last line on the new page that looks ugly.

Dai wanted to know if anyone knows a command that puts that whole item on the next page, or better yet if someone who knows some packages that solve this problem.

PS. > There are those who told me to use \pagebreak which resolves, but I think that is not the case to use include a command each time this problem appears.

  \begin{enumerate}
   \item As âncoras são progressivamente movidas avante à medida que o lançamento é feito. Um barco de movimentação de âncora move sucessivamente cada âncora da proa enquanto outro barco movimenta as âncoras de popa, Figura 3.5;
%\pagebreak
\item Um barco de alimentação ou uma balsa auxiliar fornece os tubos (em geral, 12m);
\item O tubo é corretamente posicionado e avança sucessivamente para as estações de soldagem com um ou mais passos de solda sendo executados em cada uma delas;

\end{enumerate}

    
asked by anonymous 15.06.2015 / 22:00

2 answers

3

You can try to use minipage to force the content of an item to always be on the same page. It's not much better than your current solution, in the sense that you need to use this command along with every \item where you want to avoid splitting, but it's better than pagebreak because you do not force page break and leave it to LaTeX.

The solution I once used was to create a new command to use with the item command, making it easy to create minipage :

\newcommand{\samepageblock}[1]{\begin{minipage}[t]{\linewidth}#1\end{minipage}}

Dai, when creating an item, simply include the text in the new command:

\item \samepageblock{Aqui vai o texto que não pode ser separado em páginas diferentes}

In this example available online in Overleaf , without the use of this command the result is this:

Andwiththeuseofthecommandonlyinthelastitem(forillustrativepurposes)theresultisthis:

It should be possible to change the command item directly (using renewcommand ) to always include a minipage in text so you do not have to manually use this new command for each new item you create. But I do not know if this is a good idea, because all the documentation I've read about it says to avoid at all costs changing the behavior of the item command directly.

Full example code:

\documentclass{article}

\begin{document}

% ---------------------------------
\newcommand{\samepageblock}[1]{\begin{minipage}[t]{\linewidth}#1\end{minipage}}
% ---------------------------------

\begin{itemize}

\item Morbi vitae sapien odio. Ut ipsum lectus, viverra nec vehicula nec, consectetur in turpis.

\item Curabitur sagittis ipsum nec purus imperdiet, a vestibulum nunc ultrices.

\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sagittis ut velit nec auctor. Fusce convallis arcu id sem rhoncus tristique. Sed blandit, dui ac eleifend ultricies, neque arcu luctus ligula, suscipit euismod ligula metus nec diam. Vestibulum non tristique est. Duis venenatis rhoncus felis, non ultrices nulla malesuada et. Duis quis dolor laoreet nisi accumsan tempor. Donec ac nibh vitae mi tempus laoreet.

\item Proin a semper nisi. Vivamus ut erat sapien. Praesent quis nisl ut nisl ultricies dictum sed eu est. Etiam varius tincidunt ante id aliquam. Nullam felis lorem, pulvinar suscipit turpis eu, ultrices porta justo. Quisque non nunc vitae elit blandit viverra. Suspendisse malesuada finibus odio ut aliquet. Pellentesque finibus purus erat, non suscipit velit malesuada id. Nunc finibus magna metus, non vulputate diam rhoncus dictum. Nullam pellentesque lorem erat, dictum sagittis dui cursus congue. Integer eget lacus at arcu fringilla porta in at augue.

\item Aliquam pulvinar metus ante, id porttitor velit hendrerit eu. Sed vitae mattis purus. Integer efficitur turpis elit, id volutpat libero sollicitudin ac. Nunc a justo quis nulla porta tempus. Aliquam sit amet purus eros. Curabitur mattis urna eget justo hendrerit porttitor. Phasellus iaculis metus vel lacus lacinia, vel tempor mi ullamcorper. Donec interdum sapien eu auctor faucibus. Donec luctus mattis faucibus. Sed velit neque, sollicitudin eget urna vel, feugiat fringilla mi. Duis vehicula elit quis sapien egestas, a varius eros facilisis.

\item Proin finibus, risus a sollicitudin faucibus, libero nulla tempor felis, eu posuere est augue at ante. Vivamus pulvinar laoreet purus vel consequat. Phasellus eget pharetra lorem. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec augue orci, suscipit eget tortor quis, feugiat tristique risus. Maecenas augue odio, varius sed risus molestie, interdum lacinia elit. Aenean magna ex, consectetur a volutpat quis, feugiat at enim. Proin eget accumsan augue. Nulla vitae ornare nibh. Suspendisse aliquam, velit posuere eleifend auctor, ex metus sollicitudin ligula, vitae ultrices orci nulla ut mauris. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut fringilla fermentum mauris et ultricies. Phasellus semper dictum turpis, laoreet consequat massa pulvinar ut. Suspendisse est augue, tempus non enim at, rhoncus pellentesque eros. Sed et aliquam leo.

\item \samepageblock{Duis sed elit ut elit pellentesque aliquam non at risus. Fusce libero tellus, tincidunt quis tellus id, faucibus aliquet mauris. Ut in ornare turpis. Nullam a lobortis odio. Nunc non elit vitae ligula imperdiet euismod. Fusce blandit et diam sed blandit. Maecenas lobortis egestas magna vitae hendrerit. Donec efficitur libero ut leo dictum, non accumsan elit luctus. Integer ut tincidunt leo. Nullam ut nulla enim. Maecenas sodales, arcu non ornare posuere, tellus elit mollis arcu, non tincidunt mi turpis vel urna. Pellentesque porttitor nunc et lectus efficitur pretium. Nam fermentum id purus luctus tempor.}

\end{itemize}

\end{document}
    
16.06.2015 / 02:21
0

Latex can handle this by itself ... In this case try:

\item
\begin{samepage}
Um barco de alimentação ou uma balsa auxiliar fornece os tubos (em geral, 12m);
\end{samepage}
\item ...

A hug. JJ

    
10.07.2015 / 11:53