Discussion:
Moderncv issues resolved - page on Wiki
David Hewitt
2008-01-07 16:32:39 UTC
Permalink
Thanks mostly to the expertise of others, I was able to create a Wiki page
that describes some simple fixes to the moderncv class for creating nifty
CVs in (and out of) LyX.

http://wiki.lyx.org/Examples/ModernCVClassIssues

Corrections, comments, etc. welcome.

-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
--
View this message in context: http://www.nabble.com/Moderncv-issues-resolved---page-on-Wiki-tp14670006p14670006.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Filippo Zangheri
2008-01-10 13:20:01 UTC
Permalink
Post by David Hewitt
Thanks mostly to the expertise of others, I was able to create a Wiki page
that describes some simple fixes to the moderncv class for creating nifty
CVs in (and out of) LyX.
http://wiki.lyx.org/Examples/ModernCVClassIssues
Corrections, comments, etc. welcome.
Hi David,

[1] I suggest correcting the alignment mismatch in a more drastic way:
in "moderncv.cls" around line 333 the \cvline command is defined like this:

\newcommand*{\cvline}[3][.25em]{%
\***@firstcvlineofsection%

after the second line you can add the following line:

\vspace*{-1.1em}

so that the entire command definition looks like this:

<LaTeX>

\newcommand*{\cvline}[3][.25em]{%
\***@firstcvlineofsection%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark and related text
\@firstcvlineofsectionfalse%
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}

</LaTeX>

Now you can avoid putting all those "Space: <something>" after each Section title.



[2] I've corrected a bug in the "moderncv.cls" class file, around line 367 there is:

\ifthenelse{\equal{#6}{}}{}{\newline{}\small#6}

and should be replaced with the following:

\ifthenelse{\equal{#6}{}}{}{\newline{}{\small#6}}

Without this modification, when you add some text after a \cventry with 6 non-empty parameters
(and only if the \cventry has all 6 parameters not being empty), the additional text inherits the
"\small" size, which is not desirable.


If you like these changes, I think you could add this to the wiki.
Thank you!
Greetings.
--
Filippo Zangheri

GPG key ID: 0xE1D879FA
Key fingerprint: 816B CE57 D43C 0A47 EF35 3378 EA5F A72A E1D8 79FA
Key server: pgp.mit.edu
David Hewitt
2008-01-11 19:45:23 UTC
Permalink
Post by Filippo Zangheri
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each Section title.
And, for the record, all those vspaces were just me being picky. There's no
particular need for them, just a personal modification. (I know, against the
LaTeX spirit and all...)
Post by Filippo Zangheri
\ifthenelse{\equal{#6}{}}{}{\newline{}\small#6}
\ifthenelse{\equal{#6}{}}{}{\newline{}{\small#6}}
Without this modification, when you add some text after a \cventry with 6
non-empty parameters
(and only if the \cventry has all 6 parameters not being empty), the
additional text inherits the
"\small" size, which is not desirable.
-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
--
View this message in context: http://www.nabble.com/Moderncv-issues-resolved---page-on-Wiki-tp14670006p14763712.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Filippo Zangheri
2008-01-10 20:32:42 UTC
Permalink
Post by Filippo Zangheri
Post by David Hewitt
Thanks mostly to the expertise of others, I was able to create a Wiki page
that describes some simple fixes to the moderncv class for creating nifty
CVs in (and out of) LyX.
http://wiki.lyx.org/Examples/ModernCVClassIssues
Corrections, comments, etc. welcome.
Hi David,
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each Section title.
There's the need for a precisation.

Actually, my "drastic" correction is useful only either if you will always use LyX to write moderncv
documents, or if you will always append 1 or 2 empty lines after every \section{} entry in your
plaintext moderncv documents, e.g.

something like this:

<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>

wouldn't work with my correction, but you would need to write this:

<LaTeX>
\section{Professional Experience}

\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>

or

<LaTeX>
\section{Professional Experience}\\
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>

Under these 2 circumstances one can safely add my correction.

Thank you for your kind attention ;-) !
--
Filippo Zangheri

GPG key ID: 0xE1D879FA
Key fingerprint: 816B CE57 D43C 0A47 EF35 3378 EA5F A72A E1D8 79FA
Key server: pgp.mit.edu
David Hewitt
2008-01-11 19:40:51 UTC
Permalink
Post by Filippo Zangheri
Post by Filippo Zangheri
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each Section title.
There's the need for a precisation.
Actually, my "drastic" correction is useful only either if you will always
use LyX to write moderncv
documents, or if you will always append 1 or 2 empty lines after every
\section{} entry in your
plaintext moderncv documents, e.g.
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
or
<LaTeX>
\section{Professional Experience}\\
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
Under these 2 circumstances one can safely add my correction.
Nice work.

Some of the problem(s) with the \cvline specification in this class file
have been noted in the Bug (at least in part):

http://bugzilla.lyx.org/show_bug.cgi?id=4415

Xavier, the maintainer of moderncv, is aware of some of these things. I'd
suggest that you flip him a condensed version of these two points and let
him incorporate them, particularly the error on line 367. I'd prefer not to
offer class file hacks on the wiki as a solution for formatting when there
are other options and Xavier is working on them. However, the fix on line
367 is a good spot, and it's documented here if people need it until Xavier
fixes it.

Xavier Danaux <xdanaux-***@public.gmane.org>



-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
--
View this message in context: http://www.nabble.com/Moderncv-issues-resolved---page-on-Wiki-tp14670006p14763709.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Filippo Zangheri
2008-01-12 12:14:50 UTC
Permalink
Post by David Hewitt
Post by Filippo Zangheri
Post by Filippo Zangheri
in "moderncv.cls" around line 333 the \cvline command is defined like
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark
and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each
Section title.
There's the need for a precisation.
Actually, my "drastic" correction is useful only either if you will always
use LyX to write moderncv
documents, or if you will always append 1 or 2 empty lines after every
\section{} entry in your
plaintext moderncv documents, e.g.
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
or>
-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
Post by Filippo Zangheri
<LaTeX>
\section{Professional Experience}\\
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
Under these 2 circumstances one can safely add my correction.
Nice work.
Some of the problem(s) with the \cvline specification in this class file
http://bugzilla.lyx.org/show_bug.cgi?id=4415
Xavier, the maintainer of moderncv, is aware of some of these things. I'd
suggest that you flip him a condensed version of these two points and let
him incorporate them, particularly the error on line 367. I'd prefer not to
offer class file hacks on the wiki as a solution for formatting when there
are other options and Xavier is working on them. However, the fix on line
367 is a good spot, and it's documented here if people need it until Xavier
fixes it.
Patch correcting "line 366 bug" was submitted to Xavier.

I agree with about everything you say, but the first issue (line 333) is not a
LaTeX-related issue, as it emerges only if you use LyX -- which adds blank
lines for readability. For this reason I'm not mentioning this to Xavier.

Am I wrong?
--
Filippo Zangheri

GPG key ID: 0xE1D879FA
Key fingerprint: 816B CE57 D43C 0A47 EF35 3378 EA5F A72A E1D8 79FA
Key server: pgp.mit.edu
David Hewitt
2008-01-13 20:40:59 UTC
Permalink
Post by Filippo Zangheri
Post by David Hewitt
Post by Filippo Zangheri
Post by Filippo Zangheri
in "moderncv.cls" around line 333 the \cvline command is defined like
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark
and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each
Section title.
There's the need for a precisation.
Actually, my "drastic" correction is useful only either if you will always
use LyX to write moderncv
documents, or if you will always append 1 or 2 empty lines after every
\section{} entry in your
plaintext moderncv documents, e.g.
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}\\
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
Under these 2 circumstances one can safely add my correction.
Nice work.
Some of the problem(s) with the \cvline specification in this class file
http://bugzilla.lyx.org/show_bug.cgi?id=4415
Xavier, the maintainer of moderncv, is aware of some of these things. I'd
suggest that you flip him a condensed version of these two points and let
him incorporate them, particularly the error on line 367. I'd prefer not to
offer class file hacks on the wiki as a solution for formatting when there
are other options and Xavier is working on them. However, the fix on line
367 is a good spot, and it's documented here if people need it until Xavier
fixes it.
Patch correcting "line 366 bug" was submitted to Xavier.
I agree with about everything you say, but the first issue (line 333) is not a
LaTeX-related issue, as it emerges only if you use LyX -- which adds blank
lines for readability. For this reason I'm not mentioning this to Xavier.
Am I wrong?
I had to go back and check. ;) Paul Rubin is the one that spotted the
hiccup related to the \cvline definition in moderncv. If you follow the
thread on the bug report at bugzilla, it appears that \cvline can be
redefined to avoid the problem (inside OR outside of LyX). Thus, the first
issue does appear to be a general LaTeX issue. And Xavier is already aware
of it, but I don't know if he's done anything with it yet.



-----
David Hewitt
Virginia Institute of Marine Science
http://www.vims.edu/fish/students/dhewitt/
--
View this message in context: http://www.nabble.com/Re%3A--Bulk--Re%3A--Bulk--Moderncv-issues-resolved---page-on-Wiki-tp14772720p14790805.html
Sent from the LyX - Users mailing list archive at Nabble.com.
Filippo Zangheri
2008-01-13 22:08:31 UTC
Permalink
Post by David Hewitt
Post by Filippo Zangheri
Post by David Hewitt
Post by Filippo Zangheri
Post by Filippo Zangheri
in "moderncv.cls" around line 333 the \cvline command is defined like
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}
<LaTeX>
\newcommand*{\cvline}[3][.25em]{%
\vspace*{-1.1em}% fixes an alignment mismatch between first leftmark
and related text
\else%
\\[#1]\fi%
\raggedleft\hintfont{#2} &#3}
</LaTeX>
Now you can avoid putting all those "Space: <something>" after each
Section title.
There's the need for a precisation.
Actually, my "drastic" correction is useful only either if you will always
use LyX to write moderncv
documents, or if you will always append 1 or 2 empty lines after every
\section{} entry in your
plaintext moderncv documents, e.g.
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
<LaTeX>
\section{Professional Experience}\\
\cventry{Jul--Aug 2007}{foo}{bar}{?}{?}{?}
</LaTeX>
Under these 2 circumstances one can safely add my correction.
Nice work.
Some of the problem(s) with the \cvline specification in this class file
http://bugzilla.lyx.org/show_bug.cgi?id=4415
Xavier, the maintainer of moderncv, is aware of some of these things. I'd
suggest that you flip him a condensed version of these two points and let
him incorporate them, particularly the error on line 367. I'd prefer not to
offer class file hacks on the wiki as a solution for formatting when there
are other options and Xavier is working on them. However, the fix on line
367 is a good spot, and it's documented here if people need it until Xavier
fixes it.
Patch correcting "line 366 bug" was submitted to Xavier.
I agree with about everything you say, but the first issue (line 333) is not a
LaTeX-related issue, as it emerges only if you use LyX -- which adds blank
lines for readability. For this reason I'm not mentioning this to Xavier.
Am I wrong?
I had to go back and check. ;) Paul Rubin is the one that spotted the
hiccup related to the \cvline definition in moderncv. If you follow the
thread on the bug report at bugzilla, it appears that \cvline can be
redefined to avoid the problem (inside OR outside of LyX). Thus, the first
issue does appear to be a general LaTeX issue. And Xavier is already aware
of it, but I don't know if he's done anything with it yet.
All right, what I read in the bug report is reasonable: if a couple of
empty lines make the class behave in an unwanted way, this means
that the class itself is broken!

I'm not very good in [La]TeX, but I'll try to experiment new solutions..

Greetings.
--
Filippo Zangheri

GPG key ID: 0xE1D879FA
Key fingerprint: 816B CE57 D43C 0A47 EF35 3378 EA5F A72A E1D8 79FA
Key server: pgp.mit.edu

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d- s+:- a-- C++ UL+++ P+ L+++ E-- W+ N* o-- K- w--- O-- M--
V- PS++ PE+ Y+ PGP++ t 5-- X++ R* tv b+ DI-- D---- G-- e++ h--
r++ z*
------END GEEK CODE BLOCK------
Loading...