Index: /cv/moderncv.cls
===================================================================
--- /cv/moderncv.cls	(revision 221)
+++ /cv/moderncv.cls	(revision 222)
@@ -1,4 +1,4 @@
 %% start of file `moderncv.cls'.
-%% Copyright 2007 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).
 %
 % This work may be distributed and/or modified under the
@@ -11,5 +11,5 @@
 %-------------------------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{moderncv}[2007/05/28 v0.6 modern curriculum vitae document class]
+\ProvidesClass{moderncv}[2010/08/03 v0.12 modern curriculum vitae document class]
 
 
@@ -69,4 +69,8 @@
 \DeclareOption{nocolor}{\@colorfalse}
 
+% CJK option
+%\newif\if@CJK\@CJKfalse
+%\DeclareOption{CJK}{\@CJKtrue}
+
 % execute default options
 \ExecuteOptions{a4paper,11pt,color,final}
@@ -80,18 +84,21 @@
 %                required packages
 %-------------------------------------------------------------------------------
-% ifthen package
+% \AtEndPreamble hook (loading tetoolbox instead of defining the macro, as to avoid incompatibilities with etoolbox (and packages relying on it) defining the macro too)
+\RequirePackage{etoolbox}
+%\let\@endpreamblehook\@empty
+%\def\AtEndPreamble{\g@addto@macro\@endpreamblehook}
+%\let\moderncv@document\document
+%\def\document{\endgroup\@endpreamblehook\begingroup\moderncv@document}
+
+% if... then... else... constructs
 \RequirePackage{ifthen}
 
-% ifpdf package
-\RequirePackage{ifpdf}
-
-% color package
-\ifpdf
-  \RequirePackage[pdftex]{color}
-\else
-  \RequirePackage[dvips]{color}
-\fi
-
-% fontenc package
+% latex vs pdflatex vs xelatex vs luatex compilation
+%\RequirePackage{ifpdf}
+
+% color
+\RequirePackage{color}
+
+% font encoding
 \RequirePackage[T1]{fontenc}
 
@@ -100,7 +107,6 @@
 
 % latin modern fonts
-\AtEndOfClass{%
-  \if@lmodern
-    \RequirePackage{lmodern}\fi}
+\if@lmodern
+  \RequirePackage{lmodern}\fi
 
 % symbols like \Telefon, \Mobilefone, \Letter and \Email
@@ -120,42 +126,34 @@
 % hyperrefs
 \RequirePackage{url}
-\ifpdf
-  \RequirePackage[pdftex]{hyperref}
-\else
-  \RequirePackage[dvips]{hyperref}\fi
-\AtEndOfClass{%
-  \AtBeginDocument{%
-    \hypersetup{%
+\urlstyle{tt}
+% load hyperred at the end of the preamble to pass options required by loaded packages (like CJK)
+\AtEndPreamble{
+  \@ifpackageloaded{CJK}
+    {\RequirePackage[CJKbookmarks]{hyperref}}
+    {\RequirePackage[pdftex]{hyperref}}
+  \AtBeginDocument{
+    \hypersetup{
       breaklinks,
       baseurl       = http://,
       pdfborder     = 0 0 0,
-      pdfpagemode   = None,
-      pdfstartview  = XYZ,
+      pdfpagemode   = UseNone,% do not show thumbnails or bookmarks on opening
+%      pdfstartview  = FitH,
       pdfstartpage  = 1,
-      pdfauthor     = \@firstname~\@familyname,%
-      pdftitle      = \@title,%
-      pdfsubject    = \@firstname~\@familyname,%
-      pdfkeywords   = \@firstname~\@familyname{} curriculum vit\ae{},%
-      pdfcreator    = \LaTeX{} with `moderncv' package,%
-      pdfproducer   = \LaTeX}}}
-\urlstyle{tt}
-
-% tables that split across multiple pages
-\RequirePackage[]{longtable}
-% spacing between sections
-\setlength{\LTpre}{\smallskipamount}
-\setlength{\LTpost}{\smallskipamount}
-\setlength{\LTleft}{0pt}
-\setlength{\LTright}{0pt}
+      pdfcreator    = \LaTeX{} with `moderncv' package,
+      pdfproducer   = \LaTeX{},
+      bookmarksopen = true,
+      pdfauthor     = \@firstname~\@familyname,
+      pdftitle      = \@title,
+      pdfsubject    = \@firstname~\@familyname,
+      pdfkeywords   = \@firstname~\@familyname{} curriculum vit\ae{}}}
+  \pagenumbering{arabic}% has to be issued after loading hyperref
+}
 
 % graphics
-\ifpdf
-  \RequirePackage[pdftex]{graphicx}
-\else
-  \RequirePackage[dvips]{graphicx}\fi
+\RequirePackage{graphicx}
 
 % headers and footers
-\usepackage{fancyhdr}
-\fancypagestyle{plain}{%
+\RequirePackage{fancyhdr}
+\fancypagestyle{plain}{
   \renewcommand{\headrulewidth}{0pt}
   \renewcommand{\footrulewidth}{0pt}
@@ -178,6 +176,15 @@
 \setlength\columnsep{10\p@}
 \setlength\columnseprule{0\p@}
+
+% TO BE TESTED
+%\setlength\arraycolsep{5\p@}
+%\setlength\tabcolsep{6\p@}
+%\setlength\arrayrulewidth{.4\p@}
+%\setlength\doublerulesep{2\p@}
+%\setlength\tabbingsep{\labelsep}
+%\setlength\fboxsep{3\p@}
+%\setlength\fboxrule{.4\p@}
+
 \pagestyle{empty}
-\pagenumbering{arabic}
 \raggedbottom
 \onecolumn
@@ -188,5 +195,5 @@
 %-------------------------------------------------------------------------------
 % symbols used 
-\providecommand*{\listitemsymbol}{\textbullet}
+\providecommand*{\listitemsymbol}{\Neutral}%{{\fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}}}
 \providecommand*{\addresssymbol}{}
 \providecommand*{\mobilesymbol}{\Mobilefone}
@@ -194,4 +201,5 @@
 \providecommand*{\faxsymbol}{\FAX}
 \providecommand*{\emailsymbol}{\Letter}
+\providecommand*{\homepagesymbol}{{\Large\ComputerMouse}}
 
 % colors
@@ -230,6 +238,6 @@
   \def\@moderncvtheme{#2}
   \def\@moderncvthemeoptions{#1}}
-\moderncvtheme{casual}   % default theme
-\AtBeginDocument{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}}
+\moderncvtheme{casual}% default theme
+\AtEndPreamble{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}}
 
 
@@ -245,6 +253,8 @@
 \renewcommand*{\fax}[1]{\def\@fax{#1}}
 \newcommand*{\email}[1]{\def\@email{#1}}
+\newcommand*{\homepage}[1]{\def\@homepage{#1}}
 \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}}
-\newcommand*{\photo}[2][64pt]{\def\@photoheight{#1}\def\@photo{#2}}
+\def\@photowidth{0pt}
+\newcommand*{\photo}[2][64pt]{\def\@photowidth{#1}\def\@photo{#2}}
 \newcommand*{\quote}[1]{\def\@quote{#1}}
 
@@ -257,14 +267,4 @@
 \setlength{\separatorcolumnwidth}{0.025\textwidth}
 \newlength{\maincolumnwidth}
-\newcommand*{\sethintscolumnlength}[1]{
-  \setlength{\hintscolumnwidth}{#1}%
-  \setlength{\maincolumnwidth}{\textwidth}%
-  \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}%
-  \addtolength{\maincolumnwidth}{-\hintscolumnwidth}}
-\newcommand*{\sethintscolumntowidth}[1]{
-  \settowidth{\hintscolumnwidth}{#1}%
-  \setlength{\maincolumnwidth}{\textwidth}%
-  \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}%
-  \addtolength{\maincolumnwidth}{-\hintscolumnwidth}}
 % doubleitem lengths
 \newlength{\doubleitemmaincolumnwidth}
@@ -272,10 +272,18 @@
 \newlength{\listitemsymbolwidth}
 \settowidth{\listitemsymbolwidth}{\listitemsymbol{}~}
+\newlength{\listitemmaincolumnwidth}
 % listdoubleitem lengths
 \newlength{\listdoubleitemmaincolumnwidth}
 % recompute all the lengths that depends on the text width
+\newcommand*{\recomputethemelengths}{}
 \newcommand*{\recomputelengths}{%
   \setlength{\quotewidth}{0.65\textwidth}%
-  \sethintscolumnlength{\hintscolumnwidth}%
+  % main lenghts
+  \setlength{\maincolumnwidth}{\textwidth}%
+  \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}%
+  \addtolength{\maincolumnwidth}{-\hintscolumnwidth}%
+  % listitem lengths
+  \setlength{\listitemmaincolumnwidth}{\maincolumnwidth}%
+  \addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}%
   % doubleitem lengths
   \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}%
@@ -288,10 +296,12 @@
   \setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}%
   % fancyhdr lengths
-  \renewcommand{\headwidth}{\textwidth}}
-\sethintscolumnlength{0.15\textwidth}
+  \renewcommand{\headwidth}{\textwidth}%
+  \recomputethemelengths}
+\setlength{\hintscolumnwidth}{0.15\textwidth}
 \recomputelengths
 
 % makes the cv title
-\renewcommand*{\maketitle}{}%
+%\newcommand*{\maketitle}{}%
+\title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title
 
 % draws a colored rectangle
@@ -299,44 +309,38 @@
 %\newcommand*{\colorrule}[2][1ex]{{\color{sectionrectanglecolor}{\rule{#2}{#1}}}}
 
-\newif\if@sectionopen\@sectionopenfalse
-\newif\if@firstcvlineofsection\@firstcvlineofsectionfalse % bug if initially set to true...
-% usage: \closesection{} to force a section to be closed (and the tabular layout it generates)
-\newcommand*{\closesection}{%
-  \if@sectionopen%
-    \end{longtable}%
-%    \phantomsection% reset the anchor for hyperrefs
-%    \par\null%
-    \@sectionopenfalse\fi}
-\AtEndDocument{\closesection{}}
-% usage: \section{<title>}, or \emptysection{}
+% usage: \section{<title>}
 \newcommand*{\section}[1]{%
-  \closesection{}%
-  \@sectionopentrue%
+  \vspace*{2.5ex}%
+  \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}%
   \phantomsection{}% reset the anchor for hyperrefs
   \addcontentsline{toc}{part}{#1}%
-  \begin{longtable}[l]{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
-  {\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}} &\sectionstyle{#1}\\[1ex]%
-  \@firstcvlineofsectiontrue%
-  }
-\newcommand*{\emptysection}{%
-  \closesection{}%
-  \@sectionopentrue%
-  \begin{longtable}[l]{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
-  \@firstcvlineofsectiontrue%
-  }
-
-% usage (inside section): \subsection{title}
+  \hspace{\separatorcolumnwidth}%
+  \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}%
+  \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading
+% starred variant, which is identical but defined to allow its use (e.g. for natbib compatibility, who uses \section*{} for the bibliography header)
+\AtEndPreamble{%
+  \@ifpackageloaded{natbib}
+    {
+      \RequirePackage{suffix}
+      \WithSuffix\newcommand\section*{\section}
+    }{}
+}
+
+% usage: \subsection{title}
 \newcommand*{\subsection}[1]{%
-  \cvline[0.65em]{}{\subsectionstyle{#1}}}
-
-% usage (inside section): \cvline{leftmark}{text}
+  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
+ 	  \raggedleft\hintfont{} &{\subsectionstyle{#1}}%
+  \end{tabular}%
+  \par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading
+%  \phantomsection{}% reset the anchor for hyperrefs
+%  \addcontentsline{toc}{chapter}{#1}% does not work, the bookmark is placed at the same level as sections (placed themselves at part level to be visible, as hyperref does not allow sections without parents...)
+
+% usage: \cvline{margintext}{linetext}
 \newcommand*{\cvline}[3][.25em]{%
-  \if@firstcvlineofsection%
-    \@firstcvlineofsectionfalse%
-  \else%
-    \\[#1]\fi%
-  \raggedleft\hintfont{#2} &#3}
-
-% usage (inside section}: \cvdoubleitem{subtitle}{text}{subtitle}{text}
+  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
+ 	  \raggedleft\hintfont{#2} &{#3}%
+  \end{tabular}\\[#1]}
+
+% usage: \cvdoubleitem{subtitle}{text}{subtitle}{text}
 \newcommand*{\cvdoubleitem}[4]{%
  \cvline{#1}{\begin{minipage}[t]{\doubleitemmaincolumnwidth}#2\end{minipage}%
@@ -344,9 +348,9 @@
  \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#3}\end{minipage}\hspace*{\separatorcolumnwidth}\begin{minipage}[t]{\doubleitemmaincolumnwidth}#4\end{minipage}}}
 
-% usage (inside section): \cvlistitem{point1}
+% usage: \cvlistitem[symbol]{point1}
 \newcommand*{\cvlistitem}[2][\listitemsymbol{}]{%
-  \cvline[0pt]{}{#1~#2}}
-
-% usage (inside section): \cvlistdoubleitem{point1}{point2}
+  \cvline[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
+
+% usage: \cvlistdoubleitem[symbol]{point1}{point2}
 \newcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{%
   \cvline[0pt]{}{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
@@ -356,5 +360,5 @@
     {#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
 
-% usage : \cventry{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
+% usage: \cventry{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
 \newcommand*{\cventry}[6]{%
   \cvline{#1}{%
@@ -364,7 +368,7 @@
     \ifthenelse{\equal{#5}{}}{}{, #5}%
     .%
-    \ifthenelse{\equal{#6}{}}{}{\newline{}\small#6}
-    }}%
-%  \ifthenelse{\equal{#6}{}}{}{\cvline[0pt]{}{\small#6}}}
+    \ifx&#6&%
+      \else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi%
+  }}%
 
 % usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment}
@@ -376,54 +380,49 @@
   \cvdoubleitem{#1}{\small#2}{#3}{\small#4}}
 
-% usage: \weblink[optional text]{link}
-\newcommand*{\weblink}[2][]{%
+% usage: \link[optional text]{link}
+\newcommand*{\link}[2][]{%
   \ifthenelse{\equal{#1}{}}%
-    {\def\@linktext{#2}}%
-    {\def\@linktext{#1}}%
-  \href{#2}{\@linktext{}}}
+    {\href{#2}{#2}}%
+    {\href{#2}{#1}}}
 
 % usage: \httplink[optional text]{link}
 \newcommand*{\httplink}[2][]{%
   \ifthenelse{\equal{#1}{}}%
-    {\def\@linktext{#2}}%
-    {\def\@linktext{#1}}%
-  \href{http://#2}{\@linktext{}}}
+    {\href{http://#2}{#2}}%
+    {\href{http://#2}{#1}}}
 
 % usage: \emaillink[optional text]{link}
 \newcommand*{\emaillink}[2][]{%
   \ifthenelse{\equal{#1}{}}%
-    {\def\@linktext{#2}}%
-    {\def\@linktext{#1}}%
-  \href{mailto:#2}{\@linktext{}}}
+    {\href{mailto:#2}{#2}}%
+    {\href{mailto:#2}{#1}}}
 
 % usage: \nopagenumbers{}
 \newif\if@displaypagenumbers\@displaypagenumberstrue
 \newcommand*{\nopagenumbers}{\@displaypagenumbersfalse}
+\AtEndPreamble{%
 \AtBeginDocument{%
   \if@displaypagenumbers%
     \@ifundefined{r@lastpage}{}{%
       \ifthenelse{\pageref{lastpage} > 1}{%
-      \fancypagestyle{plain}{%
-        \fancyfoot[r]{\addressfont\color{quotecolor}\footnotesize\thepage/\pageref{lastpage}}}%
-      \pagestyle{plain}}{}}%
-  \AtEndDocument{\label{lastpage}}%
-  \fi}
-
-% thebibliography environment, for use with BibTeX
+        \fancypagestyle{plain}{%
+          \fancyfoot[r]{\addressfont\color{quotecolor}\footnotesize\thepage/\pageref{lastpage}}}%
+        \pagestyle{plain}}{}}%
+    \AtEndDocument{\label{lastpage}}\else\fi}}
+
+% thebibliography environment, for use with BibTeX and possibly multibib
 \newcommand{\refname}{Publications}
 \newlength{\bibindent}
 \setlength{\bibindent}{1.5em}
-% trick to force the previous section to close before the thebibliography environment
-\let\oldbibliography\bibliography
-\renewcommand*{\bibliography}[1]{%
-  \closesection{}%
-  \oldbibliography{#1}}
 % bibliography item label
 \newcommand*{\bibliographyitemlabel}{}% use \@biblabel{\arabic{enumiv}} for BibTeX labels
+%\newif\if@multibibfirstbib\@multibibfirstbibfalse
+% bibliography head (section, etc}, depending on whether multibib is used
+\newcommand*{\bibliographyhead}[1]{\section{#1}}
+\AtEndPreamble{\@ifpackageloaded{multibib}{\renewcommand*{\bibliographyhead}[1]{\subsection{#1}}}{}}
+% thebibliography environment definition
 \newenvironment{thebibliography}[1]%
   {%
-    \section{\refname}%
-    \closesection{}%
-    \vspace*{-1.65em}%
+    \bibliographyhead{\refname}%
     \small%
     \begin{list}{\bibliographyitemlabel}%
@@ -449,5 +448,46 @@
 \let\@openbib@code\@empty
 
-% the classical \today definition
+% itemize, enumerate and description environment
+\setlength{\leftmargini}   {1.2em}
+\leftmargin\leftmargini
+\setlength{\leftmarginii}  {1em}
+\setlength{\leftmarginiii} {1.87em}
+\setlength{\leftmarginiv}  {1.7em}
+\setlength{\leftmarginv}   {1em}
+\setlength{\leftmarginvi}  {1em}
+\setlength{\labelsep}      {.5em}
+\setlength{\labelwidth}    {\leftmargini}
+\addtolength{\labelwidth}  {-\labelsep}
+\@beginparpenalty -\@lowpenalty
+\@endparpenalty   -\@lowpenalty
+\@itempenalty     -\@lowpenalty
+% itemize labels
+\newcommand\labelitemi{\listitemsymbol{}}
+\newcommand\labelitemii{{\large\bfseries-}}
+\newcommand\labelitemiii{\textperiodcentered}%{\textasteriskcentered}
+\newcommand\labelitemiv{\textperiodcentered}
+% enumerate labels
+\renewcommand\theenumi{\@arabic\c@enumi}
+\renewcommand\theenumii{\@alph\c@enumii}
+\renewcommand\theenumiii{\@roman\c@enumiii}
+\renewcommand\theenumiv{\@Alph\c@enumiv}
+\newcommand\labelenumi{\theenumi.}
+\newcommand\labelenumii{(\theenumii)}
+\newcommand\labelenumiii{\theenumiii.}
+\newcommand\labelenumiv{\theenumiv.}
+\renewcommand\p@enumii{\theenumi}
+\renewcommand\p@enumiii{\p@enumii(\theenumii)}
+\renewcommand\p@enumiv{\p@enumiii\theenumiii}
+% description label
+\newcommand*\descriptionlabel[1]{\hspace\labelsep\normalfont\bfseries#1}
+% hooks to adjust spacing (idea by Jakob SchiÃžtz; see http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty)
+\RequirePackage{tweaklist}% distributed with moderncv, not found on ctan and slightly modified
+\renewcommand*{\itemhook}{
+  \setlength{\topsep}{0pt}%
+  \setlength{\itemsep}{0pt}}
+\renewcommand*{\enumhook}{\itemhook{}}
+\renewcommand*{\deschook}{\itemhook{}}
+
+% classical \today definition
 \def\today{\ifcase\month\or
   January\or February\or March\or April\or May\or June\or
Index: /cv/moderncvcompatibility.sty
===================================================================
--- /cv/moderncvcompatibility.sty	(revision 222)
+++ /cv/moderncvcompatibility.sty	(revision 222)
@@ -0,0 +1,72 @@
+%% start of file `moderncvcompatibility.sty'.
+%% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+%-------------------------------------------------------------------------------
+%                identification
+%-------------------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{moderncvcompatibility}[2010/08/03 v0.12 modern curriculum vitae compatibility patches]
+
+
+%-------------------------------------------------------------------------------
+%                required packages
+%-------------------------------------------------------------------------------
+
+
+%-------------------------------------------------------------------------------
+%                package options
+%-------------------------------------------------------------------------------
+% old casual option (version 0.1)
+%\DeclareOption{casual}{\input{moderncvstylecasual.sty}}
+
+% old classic option (version 0.1)
+%\DeclareOption{classic}{\input{moderncvstyleclassic.sty}}
+
+\DeclareOption*{}
+
+% process given options
+\ProcessOptions\relax
+
+%-------------------------------------------------------------------------------
+%                definitions
+%-------------------------------------------------------------------------------
+% compatibility with version 0.1
+\newcommand*{\cvresume}[2]{\cvlistdoubleitem{#1}{#2}}
+
+% compatibility with versions <= 0.2
+% section, cvline, ... with width argument...
+%\newcommand*{\section}[2][0.825]{%
+%  \closesection{}%
+%  \@sectionopentrue%
+%  \addcontentsline{toc}{part}{#2}
+%  \begin{longtable}[t]{@{}r@{\hspace{.025\textwidth}}@{}p{#1\textwidth}@{}}%
+%%  \colorrule{.15\textwidth}&\mbox{\color{sectiontitlecolor}\sectionfont#2}\\[1ex]}%
+%  {\color{sectionrectanglecolor}\rule{0.15\textwidth}{1ex}}&\mbox{\color{sectiontitlecolor}\sectionfont#2}\\[1ex]}%
+%\newcommand*{\cvline}[3][.825]{%
+%  \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\small\sffamily#2\end{minipage}&\begin{minipage}[t]{\maincolumnwidth}#3\end{minipage}\\}
+%\newcommand*{\cvitem}[3][.825]{%
+%  \cvline[#1]{#2}{#3\vspace*{.75em}}}   % the \vspace*{} inside the cvline environment is a hack... (should conceptually be outside the environment)
+
+% compatibility with versions <= 0.5
+\newcommand*{\cvitem}[2]{\cvline{#1}{#2}}
+\newcommand*{\moderncvstyle}[1]{\moderncvtheme{#1}}
+
+% compatibility with versions <=0.7
+\newcommand*{\closesection}{}
+\newcommand*{\emptysection}{}
+\newcommand*{\sethintscolumnlength}[1]{%
+  \setlength{\hintscolumnwidth}{#1}%
+  \recomputelengths}
+\newcommand*{\sethintscolumntowidth}[1]{%
+  \settowidth{\hintscolumnwidth}{#1}%
+  \recomputelengths}
+
+\endinput
+
+
+%% end of file `moderncvcompatibility.sty'.
Index: /cv/moderncvthemecasual.sty
===================================================================
--- /cv/moderncvthemecasual.sty	(revision 221)
+++ /cv/moderncvthemecasual.sty	(revision 222)
@@ -1,4 +1,4 @@
 %% start of file `moderncvthemecasual.sty'.
-%% Copyright 2007 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).
 %
 % This work may be distributed and/or modified under the
@@ -11,5 +11,5 @@
 %-------------------------------------------------------------------------------
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvthemecasual}[2007/05/28 v0.6 modern curriculum vitae style: casual]
+\ProvidesPackage{moderncvthemecasual}[2010/08/03 v0.12 modern curriculum vitae style: casual]
 
 
@@ -57,5 +57,4 @@
 %-------------------------------------------------------------------------------
 % symbols used
-\renewcommand*{\listitemsymbol}{\textbullet}
 
 % colors
@@ -110,13 +109,14 @@
     \ifthenelse{\isundefined{\@photo}}%
       {}%
-      {{\color{firstnamecolor}\framebox{\includegraphics[height=\@photoheight]{\@photo}}}}%
+      {{\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
     \hfill%
-    \raggedleft{\firstnamestyle{\MakeLowercase{\@firstname}}\familynamestyle{\MakeLowercase{\@familyname}}}\\[-.35em]}%
+%    \raggedleft{\firstnamestyle{\MakeLowercase{\@firstname}}\familynamestyle{\MakeLowercase{\@familyname}}}\\[-.35em]}%
+    \raggedleft{\firstnamestyle{\@firstname}~\familynamestyle{\@familyname}}\\[-.35em]}%
   {\color{firstnamecolor}\rule{\textwidth}{.25ex}\\[2.5em]}%
 % optional quote
   \ifthenelse{\isundefined{\@quote}}%
     {}%
-    {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
-  }%
+    {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
+  \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle
 
 % cv footer
@@ -137,9 +137,10 @@
         \addresssymbol~\@addressstreet%
         \@firstfooterelementfalse%
-        \ifthenelse{\isundefined{\@addresscity}}{}{\footersymbol\@addresscity}\\\@firstfooterelementtrue}%
+        \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
       \ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol~\@mobile\@firstfooterelementfalse}%
       \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol~\@phone\@firstfooterelementfalse}%
       \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol~\@fax\@firstfooterelementfalse}%
       \ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol~\emaillink{\@email}\@firstfooterelementfalse}%
+      \ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol~\httplink{\@homepage}\@firstfooterelementfalse}%
       \ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
   }%
Index: /cv/moderncvthemeclassic.sty
===================================================================
--- /cv/moderncvthemeclassic.sty	(revision 222)
+++ /cv/moderncvthemeclassic.sty	(revision 222)
@@ -0,0 +1,173 @@
+%% start of file `moderncvthemeclassic.sty'.
+%% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+%-------------------------------------------------------------------------------
+%                identification
+%-------------------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{moderncvthemeclassic}[2010/08/03 v0.12 modern curriculum vitae style: classic]
+
+
+%-------------------------------------------------------------------------------
+%                required packages
+%-------------------------------------------------------------------------------
+
+
+%-------------------------------------------------------------------------------
+%                package options
+%-------------------------------------------------------------------------------
+% color options
+% blue (default option)
+\DeclareOption{blue}{}
+% orange
+\newif\if@colororange\@colororangefalse
+\DeclareOption{orange}{\@colororangetrue}
+% green
+\newif\if@colorgreen\@colorgreenfalse
+\DeclareOption{green}{\@colorgreentrue}
+% red
+\newif\if@colorred\@colorredfalse
+\DeclareOption{red}{\@colorredtrue}
+% grey
+\newif\if@colorgrey\@colorgreyfalse
+\DeclareOption{grey}{\@colorgreytrue}
+
+% roman option
+\newif\if@roman\@romanfalse
+\DeclareOption{roman}{\@romantrue}
+
+% unused options
+\DeclareOption*{
+  \PackageWarning{moderncvthemeclassic}{Unknown option â\CurrentOptionâ}}
+
+% execute default options
+\ExecuteOptions{color}
+
+% process given options
+\ProcessOptions\relax
+
+
+%-------------------------------------------------------------------------------
+%                style definition
+%-------------------------------------------------------------------------------
+% symbols used
+
+% colors
+\definecolor{firstnamecolor}{rgb}{0,0,0}
+\definecolor{familynamecolor}{rgb}{0,0,0}
+\definecolor{titlecolor}{rgb}{0.35,0.35,0.35}
+\definecolor{quotecolor}{rgb}{0.35,0.35,0.35}
+% default blue color
+  \definecolor{addresscolor}{rgb}{0.25,0.5,0.75}
+  \definecolor{sectionrectanglecolor}{rgb}{0.25,0.5,0.75}
+  \definecolor{sectiontitlecolor}{rgb}{0.2,0.4,0.65}
+  \definecolor{subsectioncolor}{rgb}{0.2,0.4,0.65}
+\if@colororange
+  \definecolor{addresscolor}{rgb}{0.95,0.55,0.15}
+  \definecolor{sectionrectanglecolor}{rgb}{1,0.65,0.20}
+  \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
+  \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}\fi
+\if@colorgreen
+  \definecolor{addresscolor}{rgb}{0.30,0.65,0.15}
+  \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
+  \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
+  \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}\fi
+\if@colorred
+  \definecolor{addresscolor}{rgb}{0.95,0.20,0.20}
+  \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
+  \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
+  \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}\fi
+\if@colorgrey
+  \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
+  \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
+  \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
+  \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}\fi
+
+% fonts
+\if@roman
+  \AtBeginDocument{\rmfamily}
+\else
+  \AtBeginDocument{\sffamily}\fi
+\renewcommand*{\ttdefault}{pcr}
+\renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}
+\renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape}
+\renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape}
+\renewcommand*{\familynamefont}{\firstnamefont}
+\renewcommand*{\quotefont}{\large\slshape}
+\renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
+\renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}
+
+% styles
+
+% maketitle
+%   setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
+\newlength{\maketitlenamemaxwidth}
+\setlength{\maketitlenamemaxwidth}{.525\textwidth}
+\newlength{\maketitlenamefullwidth}
+\settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}
+\newlength{\maketitlenamewidth}
+\ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi
+%   other lengths
+\newlength{\maketitlepicturewidth}
+\setlength{\maketitlepicturewidth}{\@photowidth}
+\newlength{\maketitledetailswidth}
+%   recompute theme-specific lengths, called by class to recompute all lengths
+\renewcommand*{\recomputethemelengths}{%
+  \setlength{\maketitledetailswidth}{\textwidth}%
+  \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}%
+  \ifthenelse{\lengthtest{\maketitlepicturewidth=0pt}}%
+  	{}%
+  	{\addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
+  	\addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}}
+\recomputethemelengths
+\newif\if@firstdetailselement\@firstdetailselementtrue
+\newcommand*{\maketitledetailsnewline}{
+  \if@firstdetailselement%
+    \@firstdetailselementfalse%
+  \else%
+    \\[.2em]\fi}
+\renewcommand*{\maketitle}{%
+  % name and title
+  \begin{minipage}[b]{\maketitlenamewidth}%
+    \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
+    \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
+  \end{minipage}%
+  % optional data
+  \begin{minipage}[b]{\maketitledetailswidth}%
+    \raggedleft\addressfont\color{addresscolor}%
+    \ifthenelse{\isundefined{\@addressstreet}}{}{%
+      \maketitledetailsnewline%
+      \addresssymbol~\@addressstreet%
+      \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}}%
+    \ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}%
+    \ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}%
+    \ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}%
+    \ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}%
+    \ifthenelse{\isundefined{\@homepage}}{}{\maketitledetailsnewline\homepagesymbol~\httplink{\@homepage}}%
+    \ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
+  \end{minipage}%
+  % optional photo
+  \ifthenelse{\isundefined{\@photo}}%
+    {}%
+    {%
+      \hspace*{\separatorcolumnwidth}%
+      \begin{minipage}[b]{\maketitlepicturewidth}%
+        \raggedleft{}\addressfont\color{addresscolor}%  required to correctly align content
+        \framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}%
+      \end{minipage}}\\[3em]%
+  % optional quote
+  \ifthenelse{\isundefined{\@quote}}%
+    {}%
+    {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
+  }
+
+
+\endinput
+
+
+%% end of file `moderncvthemeclassic.sty'.
Index: /cv/moderncvthemeempty.sty
===================================================================
--- /cv/moderncvthemeempty.sty	(revision 222)
+++ /cv/moderncvthemeempty.sty	(revision 222)
@@ -0,0 +1,43 @@
+%% start of file `moderncvthemeempty.sty'.
+%% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com).
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+%-------------------------------------------------------------------------------
+%                identification
+%-------------------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{moderncvthemeempty}[2010/08/03 v0.12 modern curriculum vitae style: empty]
+
+
+%-------------------------------------------------------------------------------
+%                required packages
+%-------------------------------------------------------------------------------
+
+
+%-------------------------------------------------------------------------------
+%                package options
+%-------------------------------------------------------------------------------
+% unused options
+\DeclareOption*{
+  \PackageWarning{moderncvthemeempty}{Unknown option â\CurrentOptionâ}}
+
+% execute default options
+\ExecuteOptions{}
+
+% process given options
+\ProcessOptions\relax
+
+
+%-------------------------------------------------------------------------------
+%                style definition
+%-------------------------------------------------------------------------------
+
+
+\endinput
+
+
+%% end of file `moderncvthemeempty.sty'.
Index: /cv/tweaklist.sty
===================================================================
--- /cv/tweaklist.sty	(revision 222)
+++ /cv/tweaklist.sty	(revision 222)
@@ -0,0 +1,52 @@
+%% start of file `tweaklist.sty'.
+%% Original by Jakob SchiÃžtz, downloaded from http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty; not found on ctan.
+%% Modified by Xavier Danaux (xdanaux@gmail.com).
+%
+% The tweaklist.sty package redefines the itemize, enumerate and description packages, so that all parameters can be adjusted.
+% This was done by copying the original definitions, and adding "hook commands" that are executed when entering the environment.
+% The hook commands are initially empty, but can be redefined with \renewcommand.
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+% hooks for the itemize environment
+\def\itemhook{}
+\def\itemhooki{}
+\def\itemhookii{}
+\def\itemhookiii{}
+\def\itemhookiv{}
+% hooks for the enumerate environment
+\def\enumhook{}
+\def\enumhooki{}
+\def\enumhookii{}
+\def\enumhookiii{}
+\def\enumhookiv{}
+% hook for the description environment
+\def\deschook{}
+% original environment definitions, with hooks added
+\def\enumerate{%
+  \ifnum \@enumdepth >\thr@@\@toodeep\else
+    \advance\@enumdepth\@ne
+    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+      \expandafter
+      \list
+        \csname label\@enumctr\endcsname
+        {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
+          \enumhook \csname enumhook\romannumeral\the\@enumdepth\endcsname}%
+  \fi}
+\def\itemize{%
+  \ifnum \@itemdepth >\thr@@\@toodeep\else
+    \advance\@itemdepth\@ne
+    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+    \expandafter
+    \list
+      \csname\@itemitem\endcsname
+      {\def\makelabel##1{\hss\llap{##1}}%
+        \itemhook \csname itemhook\romannumeral\the\@itemdepth\endcsname}%
+  \fi}
+\newenvironment{description}
+  {\list{}{\labelwidth\z@ \itemindent-\leftmargin
+           \let\makelabel\descriptionlabel\deschook}}
+  {\endlist}
