posquit0 / Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application
LaTeX Project Public License v1.3c
22.73k stars 4.75k forks source link

Entire cvitem moves to a new page, if the number of lines exceed. #331

Open avaish92 opened 4 years ago

avaish92 commented 4 years ago

How do I prevent a cvitem from from moving to a new page, because of it's size, in the experience section?

omid-web commented 4 years ago

I'm having a similar issue but instead of a new page, the titles in the experience section move to the center

dcsim commented 2 years ago

cventry is a tabular* and the expected behavior is that it will not break the table across pages. cvitems within the cventry are part of the tabular*.

Spanning multiple pages and keeping a table environment would require the use of longtable / longtabu.

@OJFord: #288, #331, and #341 are duplicates in so far as they are all issues related to the behavior of tabular* and a desire to implement a longtable version.

zxdawn commented 1 year ago

I'm having the same issue with a long publication list and am not sure how to apply longtable.

Temporary solution: Split into several cvhonors.

\cvsection{Publications}

\begin{cvhonors}
............
\end{cvhonors}

\begin{cvhonors}
............
\end{cvhonors}
dcsim commented 11 months ago

As far as I know this is expected behavior for tabular* and a "proper" solution is implementing one of the fixes mentioned above.

h31nr1ch commented 9 months ago

Hi everyone, an alternative solution that I use can be found in longtable section 5 pg 7 .

Apparently

\begin{tabular*}{\textwidth}{@{\extracolsep{...}}...}

is equivalent to

\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{@{\extracolsep{...}}...}

So just replace if you want to use longtable. It's NOT a perfect fix, but may be helpful.

TheFermi0n commented 6 months ago

I tried implementing the solution shared by @h31nr1ch. While it fixed the issue with tables not breaking with page breaks, it introduced some issues such as extra space between rows and subsection headings.

Therefore, I've adjusted it as follows:

% Define an environment for cventry
\newenvironment{cventries_ltb}{%
  \vspace{\acvSectionContentTopSkip}
  \setlength{\LTleft}{0pt}
  \setlength{\LTright}{0pt}
  \setlength{\LTpre}{0pt}
  \setlength{\LTpost}{-5pt}
  \begin{longtable}{@{\extracolsep{\fill}} R{3.3cm} L{\textwidth - 3.7cm}}
    }{%
  \end{longtable}
}

\newcommand*{\addedu}[4]{%
  \entrydatestyle{#4} & \entrypositionstyle{#1} \hfill \entrylocationstyle{#3}\\
  & \entrytitlestyle{#2} \\
}

Observations:

I hope this helps. I might be wrong or missing some easy solution, but so far I can only make this work.

andrewSC commented 3 weeks ago

I tried implementing the solution shared by @h31nr1ch. While it fixed the issue with tables not breaking with page breaks, it introduced some issues such as extra space between rows and subsection headings.

Therefore, I've adjusted it as follows:

% Define an environment for cventry
\newenvironment{cventries_ltb}{%
  \vspace{\acvSectionContentTopSkip}
  \setlength{\LTleft}{0pt}
  \setlength{\LTright}{0pt}
  \setlength{\LTpre}{0pt}
  \setlength{\LTpost}{-5pt}
  \begin{longtable}{@{\extracolsep{\fill}} R{3.3cm} L{\textwidth - 3.7cm}}
    }{%
  \end{longtable}
}

\newcommand*{\addedu}[4]{%
  \entrydatestyle{#4} & \entrypositionstyle{#1} \hfill \entrylocationstyle{#3}\\
  & \entrytitlestyle{#2} \\
}

Observations:

* Keep the table environment separate.

* Avoid enclosing the table within a `\begin{center}` element.

* Use approx. `-5pt` for the `\LTpost` to remove extra spacing with subsections.

I hope this helps. I might be wrong or missing some easy solution, but so far I can only make this work.

While I appreciate this immensely, I'm not entirely sure what I'm doing wrong but applying this to the awesome-cv.cls and updating the experience.tex ends up causing the Experience section to be a mess. Date is far left, title center, location right hand, then company name in the center again... Followed by each cvitem being basically wrapped to a 1/5 of the page width, aligned left.

Any thoughts or suggestions on how to resolve this? Or alternative solutions?