I downloaded a latex template for a CV here https://www.latextemplates.com/template/medium-length-professional-cv
in the cls
file it defines a newenvironment rSection
that is then used for each section within the CV document. My problem is that sometimes the heading of the section which is provided as input #1
will be followed by a pagebreak. How can I avoid a pagebreak within the newenvironment
? I tried simply adding \nopagebreak
as well as including a \begin{samepage}
but nothing worked. Here is the code that leads to a pagebreak
\newenvironment{rSection}[1]{ % 1 input argument - section name
\sectionskip
\MakeUppercase{\bf #1} % Section title
\sectionlineskip
\hrule % Horizontal line
\begin{list}{}{ % List for each individual item in the section
\setlength{\leftmargin}{1.5em}% Margin within the section
}
\item[]
}{
\end{list}
}
Any help is very much appreciated
resume
is very old and should not used any longer. Have a look tomoderncv
, stylebanking
...