Page breaks within moderncv












15















I'm typesetting a document with lengthy itemize lists and in most cases LaTeX leaves lots of empty space before the environment in order to get it entirely on one page.



How can I encourage LaTeX to put page breaks within lists?



Update: I found that it works just fine when used not within cventry command.



Is there anyway to fix cventry definition in order to avoid non-breaking behavior?



From moderncvstylebanking.sty:



renewcommand*{cventry}[7][.25em]{
begin{tabular*}{textwidth}{l@{extracolsep{fill}}r}%
{bfseries #4} & {bfseries #5} \%
{itshape #3ifthenelse{equal{#6}{}}{}{, #6}} & {itshape #2}\%
end{tabular*}%
ifx&#7&%
else{\vbox{small#7}}fi%
paraddvspace{#1}}


Examples: Originally I've used cventry in the following way:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}
}


Probably I'm just misusing cventry because using the following makes it just fine:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{}
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}









share|improve this question




















  • 4





    LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

    – David Carlisle
    Feb 28 '12 at 17:30













  • Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

    – Werner
    Feb 28 '12 at 17:30











  • @David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

    – Regent
    Feb 28 '12 at 17:42











  • @Werner, I would say I concerned about not breaking the page within itemize in general.

    – Regent
    Feb 28 '12 at 17:49






  • 3





    Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

    – Werner
    Feb 28 '12 at 18:22


















15















I'm typesetting a document with lengthy itemize lists and in most cases LaTeX leaves lots of empty space before the environment in order to get it entirely on one page.



How can I encourage LaTeX to put page breaks within lists?



Update: I found that it works just fine when used not within cventry command.



Is there anyway to fix cventry definition in order to avoid non-breaking behavior?



From moderncvstylebanking.sty:



renewcommand*{cventry}[7][.25em]{
begin{tabular*}{textwidth}{l@{extracolsep{fill}}r}%
{bfseries #4} & {bfseries #5} \%
{itshape #3ifthenelse{equal{#6}{}}{}{, #6}} & {itshape #2}\%
end{tabular*}%
ifx&#7&%
else{\vbox{small#7}}fi%
paraddvspace{#1}}


Examples: Originally I've used cventry in the following way:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}
}


Probably I'm just misusing cventry because using the following makes it just fine:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{}
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}









share|improve this question




















  • 4





    LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

    – David Carlisle
    Feb 28 '12 at 17:30













  • Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

    – Werner
    Feb 28 '12 at 17:30











  • @David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

    – Regent
    Feb 28 '12 at 17:42











  • @Werner, I would say I concerned about not breaking the page within itemize in general.

    – Regent
    Feb 28 '12 at 17:49






  • 3





    Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

    – Werner
    Feb 28 '12 at 18:22
















15












15








15


2






I'm typesetting a document with lengthy itemize lists and in most cases LaTeX leaves lots of empty space before the environment in order to get it entirely on one page.



How can I encourage LaTeX to put page breaks within lists?



Update: I found that it works just fine when used not within cventry command.



Is there anyway to fix cventry definition in order to avoid non-breaking behavior?



From moderncvstylebanking.sty:



renewcommand*{cventry}[7][.25em]{
begin{tabular*}{textwidth}{l@{extracolsep{fill}}r}%
{bfseries #4} & {bfseries #5} \%
{itshape #3ifthenelse{equal{#6}{}}{}{, #6}} & {itshape #2}\%
end{tabular*}%
ifx&#7&%
else{\vbox{small#7}}fi%
paraddvspace{#1}}


Examples: Originally I've used cventry in the following way:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}
}


Probably I'm just misusing cventry because using the following makes it just fine:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{}
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}









share|improve this question
















I'm typesetting a document with lengthy itemize lists and in most cases LaTeX leaves lots of empty space before the environment in order to get it entirely on one page.



How can I encourage LaTeX to put page breaks within lists?



Update: I found that it works just fine when used not within cventry command.



Is there anyway to fix cventry definition in order to avoid non-breaking behavior?



From moderncvstylebanking.sty:



renewcommand*{cventry}[7][.25em]{
begin{tabular*}{textwidth}{l@{extracolsep{fill}}r}%
{bfseries #4} & {bfseries #5} \%
{itshape #3ifthenelse{equal{#6}{}}{}{, #6}} & {itshape #2}\%
end{tabular*}%
ifx&#7&%
else{\vbox{small#7}}fi%
paraddvspace{#1}}


Examples: Originally I've used cventry in the following way:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}
}


Probably I'm just misusing cventry because using the following makes it just fine:



cventry{March 2009--April 2011}{Software Developer}{Company}{City}{}{}
begin{itemize}
item Item 1;
% Lots of items here
item Item n.
end{itemize}






page-breaking moderncv






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 28 '12 at 20:17







Regent

















asked Feb 28 '12 at 17:23









RegentRegent

21029




21029








  • 4





    LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

    – David Carlisle
    Feb 28 '12 at 17:30













  • Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

    – Werner
    Feb 28 '12 at 17:30











  • @David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

    – Regent
    Feb 28 '12 at 17:42











  • @Werner, I would say I concerned about not breaking the page within itemize in general.

    – Regent
    Feb 28 '12 at 17:49






  • 3





    Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

    – Werner
    Feb 28 '12 at 18:22
















  • 4





    LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

    – David Carlisle
    Feb 28 '12 at 17:30













  • Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

    – Werner
    Feb 28 '12 at 17:30











  • @David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

    – Regent
    Feb 28 '12 at 17:42











  • @Werner, I would say I concerned about not breaking the page within itemize in general.

    – Regent
    Feb 28 '12 at 17:49






  • 3





    Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

    – Werner
    Feb 28 '12 at 18:22










4




4





LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

– David Carlisle
Feb 28 '12 at 17:30







LaTeX puts @itempenalty between items but this is already negative (in article class at least) indicating that this is a good place to break. Is something else samepage for example setting this penalty (samepage sets it to the maximum penalty possible.) A MWE would help...

– David Carlisle
Feb 28 '12 at 17:30















Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

– Werner
Feb 28 '12 at 17:30





Your concern is just before itemize? This can be controlled via enumitem's topsep key-value.

– Werner
Feb 28 '12 at 17:30













@David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

– Regent
Feb 28 '12 at 17:42





@David Carlisle, I'm using moderncv class, but as far as I can see it also have negative @itempenalty.

– Regent
Feb 28 '12 at 17:42













@Werner, I would say I concerned about not breaking the page within itemize in general.

– Regent
Feb 28 '12 at 17:49





@Werner, I would say I concerned about not breaking the page within itemize in general.

– Regent
Feb 28 '12 at 17:49




3




3





Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

– Werner
Feb 28 '12 at 18:22







Setting content in a box (like tabular), as is the case with cventry, keeps things together and doesn't allow breaking across the page boundary. Would you be able to supply a minimal example that highlights your use of cventry?

– Werner
Feb 28 '12 at 18:22












3 Answers
3






active

oldest

votes


















8














I believe you answered your question yourself Regent :)



In regular circumstances, you do not want the explanation / itemization that goes with a cv entry to be broken up across page. It makes reading your resume and understanding your career achievements harder, which should be avoided at all costs. So in most cases, you simply put your itemize environment inside the last argument of cventry



For special cases where you explicitly do want to split the explanation / itemize over 2 pages, you put it after the cventry command.

Finally, note that in these special cases and when using the classic or casual styles, you will have to do the left padding yourself. An (ugly) way around this is to manually break your input over 2 cventry or cvitem.






share|improve this answer
























  • Thanks, it's great to have the answer from moderncv package creator!

    – Regent
    Mar 1 '12 at 12:29





















7














I just discovered this problem today and ended up implementing a custom version of the cventry command (dubbed cventrylong) along with a customized itemize list environment cvitemize (via enumitem package):



% customize the enumerate environments (i.e. enumerate, itemize, ...)
usepackage{enumitem}
setlist{nolistsep}

% A custom version of the cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
newcommand*{cventrylong}[7][.25em]{%
begin{tabular}{@{}p{hintscolumnwidth}@{hspace{separatorcolumnwidth}}p{maincolumnwidth}@{}}%
raggedlefthintstyle{#2} &{%
{bfseries#3}%
ifthenelse{equal{#4}{}}{}{, {slshape#4}}%
ifthenelse{equal{#5}{}}{}{, #5}%
ifthenelse{equal{#6}{}}{}{, #6}%
}%
end{tabular}%
{small#7}%
paraddvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside cventylong
newlist{cvitemize}{itemize}{1}
setlist[cvitemize]{label=labelitemi,%
leftmargin=hintscolumnwidth+separatorcolumnwidth+labelwidth+labelsep}


Using a trimmed version of template.tex provided by the moderncv package, I can demonstrate the results:




  • Before:
    enter image description here


  • After:
    enter image description here







share|improve this answer
























  • This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

    – Mil
    May 30 '14 at 11:18











  • @tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

    – sinoTrinity
    Nov 11 '14 at 22:31











  • @tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

    – Enrico Maria De Angelis
    Oct 16 '16 at 9:40













  • Is it possible to do without using itemize? If yes, then it answers my question here.

    – kingmakerking
    Nov 28 '17 at 16:28





















2














Many document classes (notably, the standard classes article, book, and report, the KOMA-Script classes, memoir, and the AMS classes) include the code lines



@lowpenalty=51


and



@itempenalty=-@lowpenalty


i.e., they set @itempenalty to -51 and hereby encourage page breaks between list items. The moderncv class, however, only includes the second code line, i.e., the class sets @itempenalty implicitly to 0. I don't know if this was done on purpose or should be considered a bug. However, try to add the following to your document preamble (EDIT: stupid mistake corrected):



makeatletter
@itempenalty=-51
makeatother





share|improve this answer


























  • Unfortunately manual setting of @lowpenalty made no difference.

    – Regent
    Feb 28 '12 at 18:10











  • I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

    – Regent
    Feb 28 '12 at 18:12






  • 1





    @lockstep -- don't you mean to set @itempenalty=-51?

    – barbara beeton
    Feb 28 '12 at 18:13











  • @barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

    – lockstep
    Feb 28 '12 at 18:16













  • @lockstep, @itempenalty=-51 doesn't help too.

    – Regent
    Feb 28 '12 at 18:21











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f46123%2fpage-breaks-within-moderncv%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









8














I believe you answered your question yourself Regent :)



In regular circumstances, you do not want the explanation / itemization that goes with a cv entry to be broken up across page. It makes reading your resume and understanding your career achievements harder, which should be avoided at all costs. So in most cases, you simply put your itemize environment inside the last argument of cventry



For special cases where you explicitly do want to split the explanation / itemize over 2 pages, you put it after the cventry command.

Finally, note that in these special cases and when using the classic or casual styles, you will have to do the left padding yourself. An (ugly) way around this is to manually break your input over 2 cventry or cvitem.






share|improve this answer
























  • Thanks, it's great to have the answer from moderncv package creator!

    – Regent
    Mar 1 '12 at 12:29


















8














I believe you answered your question yourself Regent :)



In regular circumstances, you do not want the explanation / itemization that goes with a cv entry to be broken up across page. It makes reading your resume and understanding your career achievements harder, which should be avoided at all costs. So in most cases, you simply put your itemize environment inside the last argument of cventry



For special cases where you explicitly do want to split the explanation / itemize over 2 pages, you put it after the cventry command.

Finally, note that in these special cases and when using the classic or casual styles, you will have to do the left padding yourself. An (ugly) way around this is to manually break your input over 2 cventry or cvitem.






share|improve this answer
























  • Thanks, it's great to have the answer from moderncv package creator!

    – Regent
    Mar 1 '12 at 12:29
















8












8








8







I believe you answered your question yourself Regent :)



In regular circumstances, you do not want the explanation / itemization that goes with a cv entry to be broken up across page. It makes reading your resume and understanding your career achievements harder, which should be avoided at all costs. So in most cases, you simply put your itemize environment inside the last argument of cventry



For special cases where you explicitly do want to split the explanation / itemize over 2 pages, you put it after the cventry command.

Finally, note that in these special cases and when using the classic or casual styles, you will have to do the left padding yourself. An (ugly) way around this is to manually break your input over 2 cventry or cvitem.






share|improve this answer













I believe you answered your question yourself Regent :)



In regular circumstances, you do not want the explanation / itemization that goes with a cv entry to be broken up across page. It makes reading your resume and understanding your career achievements harder, which should be avoided at all costs. So in most cases, you simply put your itemize environment inside the last argument of cventry



For special cases where you explicitly do want to split the explanation / itemize over 2 pages, you put it after the cventry command.

Finally, note that in these special cases and when using the classic or casual styles, you will have to do the left padding yourself. An (ugly) way around this is to manually break your input over 2 cventry or cvitem.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 29 '12 at 20:38









XavierXavier

10.6k64772




10.6k64772













  • Thanks, it's great to have the answer from moderncv package creator!

    – Regent
    Mar 1 '12 at 12:29





















  • Thanks, it's great to have the answer from moderncv package creator!

    – Regent
    Mar 1 '12 at 12:29



















Thanks, it's great to have the answer from moderncv package creator!

– Regent
Mar 1 '12 at 12:29







Thanks, it's great to have the answer from moderncv package creator!

– Regent
Mar 1 '12 at 12:29













7














I just discovered this problem today and ended up implementing a custom version of the cventry command (dubbed cventrylong) along with a customized itemize list environment cvitemize (via enumitem package):



% customize the enumerate environments (i.e. enumerate, itemize, ...)
usepackage{enumitem}
setlist{nolistsep}

% A custom version of the cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
newcommand*{cventrylong}[7][.25em]{%
begin{tabular}{@{}p{hintscolumnwidth}@{hspace{separatorcolumnwidth}}p{maincolumnwidth}@{}}%
raggedlefthintstyle{#2} &{%
{bfseries#3}%
ifthenelse{equal{#4}{}}{}{, {slshape#4}}%
ifthenelse{equal{#5}{}}{}{, #5}%
ifthenelse{equal{#6}{}}{}{, #6}%
}%
end{tabular}%
{small#7}%
paraddvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside cventylong
newlist{cvitemize}{itemize}{1}
setlist[cvitemize]{label=labelitemi,%
leftmargin=hintscolumnwidth+separatorcolumnwidth+labelwidth+labelsep}


Using a trimmed version of template.tex provided by the moderncv package, I can demonstrate the results:




  • Before:
    enter image description here


  • After:
    enter image description here







share|improve this answer
























  • This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

    – Mil
    May 30 '14 at 11:18











  • @tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

    – sinoTrinity
    Nov 11 '14 at 22:31











  • @tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

    – Enrico Maria De Angelis
    Oct 16 '16 at 9:40













  • Is it possible to do without using itemize? If yes, then it answers my question here.

    – kingmakerking
    Nov 28 '17 at 16:28


















7














I just discovered this problem today and ended up implementing a custom version of the cventry command (dubbed cventrylong) along with a customized itemize list environment cvitemize (via enumitem package):



% customize the enumerate environments (i.e. enumerate, itemize, ...)
usepackage{enumitem}
setlist{nolistsep}

% A custom version of the cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
newcommand*{cventrylong}[7][.25em]{%
begin{tabular}{@{}p{hintscolumnwidth}@{hspace{separatorcolumnwidth}}p{maincolumnwidth}@{}}%
raggedlefthintstyle{#2} &{%
{bfseries#3}%
ifthenelse{equal{#4}{}}{}{, {slshape#4}}%
ifthenelse{equal{#5}{}}{}{, #5}%
ifthenelse{equal{#6}{}}{}{, #6}%
}%
end{tabular}%
{small#7}%
paraddvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside cventylong
newlist{cvitemize}{itemize}{1}
setlist[cvitemize]{label=labelitemi,%
leftmargin=hintscolumnwidth+separatorcolumnwidth+labelwidth+labelsep}


Using a trimmed version of template.tex provided by the moderncv package, I can demonstrate the results:




  • Before:
    enter image description here


  • After:
    enter image description here







share|improve this answer
























  • This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

    – Mil
    May 30 '14 at 11:18











  • @tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

    – sinoTrinity
    Nov 11 '14 at 22:31











  • @tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

    – Enrico Maria De Angelis
    Oct 16 '16 at 9:40













  • Is it possible to do without using itemize? If yes, then it answers my question here.

    – kingmakerking
    Nov 28 '17 at 16:28
















7












7








7







I just discovered this problem today and ended up implementing a custom version of the cventry command (dubbed cventrylong) along with a customized itemize list environment cvitemize (via enumitem package):



% customize the enumerate environments (i.e. enumerate, itemize, ...)
usepackage{enumitem}
setlist{nolistsep}

% A custom version of the cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
newcommand*{cventrylong}[7][.25em]{%
begin{tabular}{@{}p{hintscolumnwidth}@{hspace{separatorcolumnwidth}}p{maincolumnwidth}@{}}%
raggedlefthintstyle{#2} &{%
{bfseries#3}%
ifthenelse{equal{#4}{}}{}{, {slshape#4}}%
ifthenelse{equal{#5}{}}{}{, #5}%
ifthenelse{equal{#6}{}}{}{, #6}%
}%
end{tabular}%
{small#7}%
paraddvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside cventylong
newlist{cvitemize}{itemize}{1}
setlist[cvitemize]{label=labelitemi,%
leftmargin=hintscolumnwidth+separatorcolumnwidth+labelwidth+labelsep}


Using a trimmed version of template.tex provided by the moderncv package, I can demonstrate the results:




  • Before:
    enter image description here


  • After:
    enter image description here







share|improve this answer













I just discovered this problem today and ended up implementing a custom version of the cventry command (dubbed cventrylong) along with a customized itemize list environment cvitemize (via enumitem package):



% customize the enumerate environments (i.e. enumerate, itemize, ...)
usepackage{enumitem}
setlist{nolistsep}

% A custom version of the cventry command that supports large itemized lists
% inside argument #7 (the custom cvitemize lists should be used!)
newcommand*{cventrylong}[7][.25em]{%
begin{tabular}{@{}p{hintscolumnwidth}@{hspace{separatorcolumnwidth}}p{maincolumnwidth}@{}}%
raggedlefthintstyle{#2} &{%
{bfseries#3}%
ifthenelse{equal{#4}{}}{}{, {slshape#4}}%
ifthenelse{equal{#5}{}}{}{, #5}%
ifthenelse{equal{#6}{}}{}{, #6}%
}%
end{tabular}%
{small#7}%
paraddvspace{#1}}
% A custom version of the itemize environment that sets the appropriate left
% margin for use inside cventylong
newlist{cvitemize}{itemize}{1}
setlist[cvitemize]{label=labelitemi,%
leftmargin=hintscolumnwidth+separatorcolumnwidth+labelwidth+labelsep}


Using a trimmed version of template.tex provided by the moderncv package, I can demonstrate the results:




  • Before:
    enter image description here


  • After:
    enter image description here








share|improve this answer












share|improve this answer



share|improve this answer










answered Oct 16 '13 at 12:24









tjaneztjanez

52659




52659













  • This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

    – Mil
    May 30 '14 at 11:18











  • @tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

    – sinoTrinity
    Nov 11 '14 at 22:31











  • @tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

    – Enrico Maria De Angelis
    Oct 16 '16 at 9:40













  • Is it possible to do without using itemize? If yes, then it answers my question here.

    – kingmakerking
    Nov 28 '17 at 16:28





















  • This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

    – Mil
    May 30 '14 at 11:18











  • @tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

    – sinoTrinity
    Nov 11 '14 at 22:31











  • @tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

    – Enrico Maria De Angelis
    Oct 16 '16 at 9:40













  • Is it possible to do without using itemize? If yes, then it answers my question here.

    – kingmakerking
    Nov 28 '17 at 16:28



















This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

– Mil
May 30 '14 at 11:18





This appears to be a great solution for normal cventries, but doesn't help much in this case: tex.stackexchange.com/questions/181223/…

– Mil
May 30 '14 at 11:18













@tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

– sinoTrinity
Nov 11 '14 at 22:31





@tjanez I'm having a similar problem. I also have a section with long texts, not necessarily because of many list items. Half of my first page is blank as your results show before change. How can I get rid of the blank?

– sinoTrinity
Nov 11 '14 at 22:31













@tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

– Enrico Maria De Angelis
Oct 16 '16 at 9:40







@tjanez, your solution seems good, but it compromises the aligniment of the arguments befor the 7th (look at you screenshots). Anyway I'm interested in this solution, so could you tell me how to fix this problem?

– Enrico Maria De Angelis
Oct 16 '16 at 9:40















Is it possible to do without using itemize? If yes, then it answers my question here.

– kingmakerking
Nov 28 '17 at 16:28







Is it possible to do without using itemize? If yes, then it answers my question here.

– kingmakerking
Nov 28 '17 at 16:28













2














Many document classes (notably, the standard classes article, book, and report, the KOMA-Script classes, memoir, and the AMS classes) include the code lines



@lowpenalty=51


and



@itempenalty=-@lowpenalty


i.e., they set @itempenalty to -51 and hereby encourage page breaks between list items. The moderncv class, however, only includes the second code line, i.e., the class sets @itempenalty implicitly to 0. I don't know if this was done on purpose or should be considered a bug. However, try to add the following to your document preamble (EDIT: stupid mistake corrected):



makeatletter
@itempenalty=-51
makeatother





share|improve this answer


























  • Unfortunately manual setting of @lowpenalty made no difference.

    – Regent
    Feb 28 '12 at 18:10











  • I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

    – Regent
    Feb 28 '12 at 18:12






  • 1





    @lockstep -- don't you mean to set @itempenalty=-51?

    – barbara beeton
    Feb 28 '12 at 18:13











  • @barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

    – lockstep
    Feb 28 '12 at 18:16













  • @lockstep, @itempenalty=-51 doesn't help too.

    – Regent
    Feb 28 '12 at 18:21
















2














Many document classes (notably, the standard classes article, book, and report, the KOMA-Script classes, memoir, and the AMS classes) include the code lines



@lowpenalty=51


and



@itempenalty=-@lowpenalty


i.e., they set @itempenalty to -51 and hereby encourage page breaks between list items. The moderncv class, however, only includes the second code line, i.e., the class sets @itempenalty implicitly to 0. I don't know if this was done on purpose or should be considered a bug. However, try to add the following to your document preamble (EDIT: stupid mistake corrected):



makeatletter
@itempenalty=-51
makeatother





share|improve this answer


























  • Unfortunately manual setting of @lowpenalty made no difference.

    – Regent
    Feb 28 '12 at 18:10











  • I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

    – Regent
    Feb 28 '12 at 18:12






  • 1





    @lockstep -- don't you mean to set @itempenalty=-51?

    – barbara beeton
    Feb 28 '12 at 18:13











  • @barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

    – lockstep
    Feb 28 '12 at 18:16













  • @lockstep, @itempenalty=-51 doesn't help too.

    – Regent
    Feb 28 '12 at 18:21














2












2








2







Many document classes (notably, the standard classes article, book, and report, the KOMA-Script classes, memoir, and the AMS classes) include the code lines



@lowpenalty=51


and



@itempenalty=-@lowpenalty


i.e., they set @itempenalty to -51 and hereby encourage page breaks between list items. The moderncv class, however, only includes the second code line, i.e., the class sets @itempenalty implicitly to 0. I don't know if this was done on purpose or should be considered a bug. However, try to add the following to your document preamble (EDIT: stupid mistake corrected):



makeatletter
@itempenalty=-51
makeatother





share|improve this answer















Many document classes (notably, the standard classes article, book, and report, the KOMA-Script classes, memoir, and the AMS classes) include the code lines



@lowpenalty=51


and



@itempenalty=-@lowpenalty


i.e., they set @itempenalty to -51 and hereby encourage page breaks between list items. The moderncv class, however, only includes the second code line, i.e., the class sets @itempenalty implicitly to 0. I don't know if this was done on purpose or should be considered a bug. However, try to add the following to your document preamble (EDIT: stupid mistake corrected):



makeatletter
@itempenalty=-51
makeatother






share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 28 '12 at 18:15

























answered Feb 28 '12 at 17:52









locksteplockstep

190k52587719




190k52587719













  • Unfortunately manual setting of @lowpenalty made no difference.

    – Regent
    Feb 28 '12 at 18:10











  • I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

    – Regent
    Feb 28 '12 at 18:12






  • 1





    @lockstep -- don't you mean to set @itempenalty=-51?

    – barbara beeton
    Feb 28 '12 at 18:13











  • @barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

    – lockstep
    Feb 28 '12 at 18:16













  • @lockstep, @itempenalty=-51 doesn't help too.

    – Regent
    Feb 28 '12 at 18:21



















  • Unfortunately manual setting of @lowpenalty made no difference.

    – Regent
    Feb 28 '12 at 18:10











  • I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

    – Regent
    Feb 28 '12 at 18:12






  • 1





    @lockstep -- don't you mean to set @itempenalty=-51?

    – barbara beeton
    Feb 28 '12 at 18:13











  • @barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

    – lockstep
    Feb 28 '12 at 18:16













  • @lockstep, @itempenalty=-51 doesn't help too.

    – Regent
    Feb 28 '12 at 18:21

















Unfortunately manual setting of @lowpenalty made no difference.

– Regent
Feb 28 '12 at 18:10





Unfortunately manual setting of @lowpenalty made no difference.

– Regent
Feb 28 '12 at 18:10













I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

– Regent
Feb 28 '12 at 18:12





I think it might be a problem with the way cventry is defined, because it brake the page well when it was used not within eventry...

– Regent
Feb 28 '12 at 18:12




1




1





@lockstep -- don't you mean to set @itempenalty=-51?

– barbara beeton
Feb 28 '12 at 18:13





@lockstep -- don't you mean to set @itempenalty=-51?

– barbara beeton
Feb 28 '12 at 18:13













@barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

– lockstep
Feb 28 '12 at 18:16







@barbarabeeton Thanks! I don't know what I was thinking. Answer edited.

– lockstep
Feb 28 '12 at 18:16















@lockstep, @itempenalty=-51 doesn't help too.

– Regent
Feb 28 '12 at 18:21





@lockstep, @itempenalty=-51 doesn't help too.

– Regent
Feb 28 '12 at 18:21


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f46123%2fpage-breaks-within-moderncv%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?