# How to make an environment like itemize to break when it reaches the end of the page?

I am currently using the Smart Twenty Seconds CV for creating my CV:

The template has a sidebar on the left and text area on the Right. It uses some Kind of an own created environment which hold \items. However, if there are too many items Latex does not break the page, however it stores the whole list on a separate page:

The MWE for my created page:

\documentclass{article}
\usepackage{lmodern}
\usepackage{lipsum}
\setlength{\tabcolsep}{0pt}

% New environment for the long list
\newenvironment{twenty}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}

\newcommand{\twentyitem}[4]{%
#1&\parbox[t]{0.82\textwidth}{%
\textbf{#2}%
\hfill%
{#3}\\% %
#4\vspace{10pt}%
}\\
}

\begin{document}

\section{Education}

\lipsum[3] \par
\vspace{1cm}
\begin{twenty} % Environment for a list with descriptions
\twentyitem{Date}{Description}{Location}{
\begin{itemize}
\item \lipsum[3]
\item \lipsum[3]
\item \lipsum[3]
\item \lipsum[3]
\item \lipsum[3]
\end{itemize}
}
\end{twenty}

\end{document}


Does anyone know how I cann tell Latex that when an \item reach the end of the page it just should use the next page? One Problem could be that the Twenty Seconds template trigger \makeprofile to print the left sidebar when a new page is created. Many thanks in advance

Well, the template you are using is build to have only one page ...

If you need more you can fool the environment tweety which is defined as:

\newenvironment{twenty}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}


The issue here is that an tabular can not span pages ...

So one possibility would be to use longtable I did not test if it works ...

The other possibility is to simply end environment twenty (and of yourse all other open environments or commands) and start it again on the next page.

That is more an manual solution, but for an CV it should be work.

\end{itemize}}\end{twenty}\begin{twenty}\twentyitem{Date2}{Description2}{Location2}{\begin{itemize}


to end environment twenty and restart it again. Then you will get the page break between those two environments twenty.

\documentclass{article}

\usepackage{lmodern}
\usepackage{lipsum}
\setlength{\tabcolsep}{0pt}

% New environment for the long list
\newenvironment{twenty}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}

\newcommand{\twentyitem}[4]{%
#1&\parbox[t]{0.82\textwidth}{%
\textbf{#2}%
\hfill%
{#3}\\% %
#4\vspace{10pt}%
}\\
}

\begin{document}

\section{Education}

\lipsum[3] \par
\vspace{1cm}
\begin{twenty} % Environment for a list with descriptions
\twentyitem{Date}{Description}{Location}{
\begin{itemize}
\item \lipsum[3]
\item \lipsum[3]
\item \lipsum[3]
\end{itemize}}\end{twenty}\begin{twenty}\twentyitem{Date2}{Description2}{Location2}{\begin{itemize}
\item \lipsum[3]
\item \lipsum[3]
\end{itemize}
}
\end{twenty}

\end{document}


and its result:

# EDIT:

Command \makeprofile works only on the first page. If you want to have the gray color on the second page you can use the following code (please see that I have to load packages because they are usid in your cv template, but not in your given code!):

\usepackage{xcolor} % <=================================================
\definecolor{asidecolor}{HTML}{E7E7E7}
\RequirePackage[absolute,overlay]{textpos}
\usepackage{tikz}
\newcommand{\makeprofilea}
{
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, fill=asidecolor, anchor=north, minimum width=9.90cm, minimum height=\paperheight+1cm] (box) at (-5cm,0.5cm){};
\end{tikzpicture}

\begin{textblock}{6}(0.5, 0.2)
\begin{flushleft}
\hspace{13pt}
\end{flushleft}
\end{textblock}
\vspace{-10pt}
} % <===================================================================


and then you can start the second page with \clearpage\makeprofilea ...

See the complete new mwe

\documentclass{article}

\usepackage{lmodern}
\usepackage{lipsum}
\setlength{\tabcolsep}{0pt}

\usepackage{xcolor} % <=================================================
\definecolor{asidecolor}{HTML}{E7E7E7}
\RequirePackage[absolute,overlay]{textpos}
\usepackage{tikz}
\newcommand{\makeprofilea}
{
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, fill=asidecolor, anchor=north, minimum width=9.90cm, minimum height=\paperheight+1cm] (box) at (-5cm,0.5cm){};
\end{tikzpicture}

\begin{textblock}{6}(0.5, 0.2)
\begin{flushleft}
\hspace{13pt}
\end{flushleft}
\end{textblock}
\vspace{-10pt}
} % <===================================================================

% New environment for the long list
\newenvironment{twenty}{%
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
\end{tabular*}
}

\newcommand{\twentyitem}[4]{%
#1&\parbox[t]{0.82\textwidth}{%
\textbf{#2}%
\hfill%
{#3}\\% %
#4\vspace{10pt}%
}\\
}

\begin{document}

\section{Education}

\lipsum[3] \par
\vspace{1cm}
\begin{twenty} % Environment for a list with descriptions
\twentyitem{Date}{Description}{Location}{
\begin{itemize}
\item \lipsum[3]
\item \lipsum[3]
\item \lipsum[3]
\end{itemize}}\end{twenty}
\clearpage\makeprofilea % <=============================================
\begin{twenty}\twentyitem{Date2}{Description2}{Location2}{\begin{itemize}
\item \lipsum[3]
\item \lipsum[3]
\end{itemize}
}
\end{twenty}

\end{document}


and its result:

• Man's thanks i will Test it! :-) – SRel Jul 27 '19 at 20:57