Open Nodraak opened 7 years ago
I believe here is the diff that introduced the bug (I grep
'ed for \cvitemwithcomment
in both version and diff
'ed the result):
2,4c2,4
< \savebox{\cvitemwithcommentmainbox}{{\bfseries#3}}%
< \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
< \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
---
> \savebox{\cvitemwithcommentbox}{{#3}}%
> \setlength{\cvitemwithcommentskilllength}{\widthof{\usebox{\cvitemwithcommentbox}}}%
> \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentskilllength}%
6c6
< \begin{minipage}[t]{\cvitemwithcommentmainlength}\bfseries#3\end{minipage}%
---
> \begin{minipage}[t]{\cvitemwithcommentskilllength}\usebox{\cvitemwithcommentbox}\end{minipage}%
I conclude that \usebox
prevent the use of line break. Here is a random stackoverflow link that seems to be relevant.
I think this is the commit that introduced the use of \usebox
: f50d1cff324df184eb069b9aa21ea72e6c281bc0
I can confirm I am having the same problem. It also applies to the cventry command.
Does anybody have a workaround?
Try loading the makecell package (\usepackage{makecell}
in the preamble), then inside the braces you want to have a newline, change {this is a very very very very long line}
to {\makecell[tl]{this is a very very very \\ very long line}}
. The [tl]
means justify to top and left, you can use t
op, c
entre, b
ottom, l
eft, or r
ight for these (vertical justification comes first).
Workaround works. Is there a way to have automatic linebreaks within the comment?
Hi!
I just reinstalled my whole system yesterday (Debian 9 Stretch) and found a regression when compiling my resume. The bug was introduced in moderncv between these two version:
\newline
not working (also, the text is not bold anymore)\newline
create a line break as expectedMinimal example:
Some more info (not sure if usefull ...)
tree
's output for moderncv v2.0.0 installed withtlmgr
:tree
's output for moderncv v1.5.1 installed manually:Fresh system install from yesterday: