Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
avaish92 opened this issue Jun 14, 2020 · 6 comments
Open

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

avaish92 opened this issue Jun 14, 2020 · 6 comments

Comments

@avaish92
Copy link

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

@avaish92 avaish92 changed the title Entire cvitem moving to a new page, if the number of lines exceed. Entire cvitem moves to a new page, if the number of lines exceed. Jun 14, 2020
@omid-web
Copy link

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

@dcsim
Copy link
Contributor

dcsim commented Jan 15, 2022

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
Copy link

zxdawn commented Sep 24, 2022

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
Copy link
Contributor

dcsim commented Sep 21, 2023

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

@h31nr1ch
Copy link

h31nr1ch commented Dec 9, 2023

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
Copy link

TheFermi0n commented Feb 18, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants