New style: oldstyle

This commit is contained in:
Xavier Danaux
2011-12-19 00:50:29 +01:00
parent 11c8c6764d
commit 68b872fd3d
12 changed files with 330 additions and 78 deletions

View File

@ -1,9 +1,21 @@
version 0.15 (xx December 2011)
version 0.15 (19 December 2011)
- corrects list spacing.
- corrects inconsistent use of sans serif fonts in roman layout option.
- the lmodern fonts are now automatically loaded only if installed on the system.
The "nolmodern" option is now therefore obsolete.
- complete code refactoring separating themes in separate styles and colors.
- renamed \cvline to \cvitem, \cvlanguage to \cvitemwithcomment and \cvcomputer
to \cvdoubleitem (the old command name still work and redirect to the new ones,
but are deprecated).
- removed the arbitrary minipage widths of skill proficiency vs comment in
\cvitemwithcomments. The skill proficiency is now typeset exactly as given (i.e.
one one line if no linebreaks are implicitly given) and the comment uses the
remaining horizontal space.
- changed the optional argument of \cvlistitem and \cvlistdoubleitem to specify
the vertical skip after the item (as for \cvitem, cvitemwithcomments, etc).
The way to change the list symbol is to redefine \listitemsymbol.
- added a new style on top of classic and casual: oldstyle.
- loads the microtype package to improve typography.
version 0.14 (04 December 2011)
- adds support for CJK, thanks to the help of P. D'Apice.

Binary file not shown.

View File

@ -9,8 +9,9 @@
\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
% moderncv 主题
\moderncvstyle{casual} % 选项参数是 casual classic
\moderncvstyle{casual} % 选项参数是 casual, classicoldstyle
\moderncvcolor{blue} % 选项参数是 blue (默认)、orangegreenredpurplegrey
%\nopagenumbers{} % 消除注释以取消自动页码生成功能
% 字符编码
\usepackage[utf8]{inputenc} % 替换你正在使用的编码
@ -25,9 +26,9 @@
\familyname{}
\title{简历题目 (可选项)} % 可选项、如不需要可删除本行
\address{街道及门牌号}{邮编及城市} % 可选项、如不需要可删除本行
\mobile{手机 (可选项)} % 可选项、如不需要可删除本行
\phone{电话 (可选项)} % 可选项、如不需要可删除本行
\fax{传真 (可选项)} % 可选项、如不需要可删除本行
\mobile{+1~(234)~567~890} % 可选项、如不需要可删除本行
\phone{+2~(345)~678~901} % 可选项、如不需要可删除本行
\fax{+3~(456)~789~012} % 可选项、如不需要可删除本行
\email{xiaolong@li.com.cn} % 可选项、如不需要可删除本行
\homepage{www.xialongli.com} % 可选项、如不需要可删除本行
\extrainfo{附加信息 (可选项)} % 可选项、如不需要可删除本行
@ -42,8 +43,6 @@
% 分类索引
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%\nopagenumbers{} % 消除注释以取消自动页码生成功能
%----------------------------------------------------------------------------------
% 内容
%----------------------------------------------------------------------------------
@ -56,9 +55,9 @@
\cventry{年 -- 年}{学位}{院校}{城市}{\textit{成绩}}{说明}
\section{毕业论文}
\cvline{题目}{\emph{题目}}
\cvline{导师}{导师}
\cvline{说明}{\small 论文简介}
\cvitem{题目}{\emph{题目}}
\cvitem{导师}{导师}
\cvitem{说明}{\small 论文简介}
\section{工作背景}
\subsection{专业}
@ -84,19 +83,19 @@
\cventry{年 -- 年}{职位}{公司}{城市}{}{说明}
\section{语言技能}
\cvlanguage{语言 1}{水平}{评价}
\cvlanguage{语言 2}{水平}{评价}
\cvlanguage{语言 3}{水平}{评价}
\cvitemwithcomment{语言 1}{水平}{评价}
\cvitemwithcomment{语言 2}{水平}{评价}
\cvitemwithcomment{语言 3}{水平}{评价}
\section{计算机技能}
\cvcomputer{类别 1}{XXX, YYY, ZZZ}{类别 4}{XXX, YYY, ZZZ}
\cvcomputer{类别 2}{XXX, YYY, ZZZ}{类别 5}{XXX, YYY, ZZZ}
\cvcomputer{类别 3}{XXX, YYY, ZZZ}{类别 6}{XXX, YYY, ZZZ}
\cvdoubleitem{类别 1}{XXX, YYY, ZZZ}{类别 4}{XXX, YYY, ZZZ}
\cvdoubleitem{类别 2}{XXX, YYY, ZZZ}{类别 5}{XXX, YYY, ZZZ}
\cvdoubleitem{类别 3}{XXX, YYY, ZZZ}{类别 6}{XXX, YYY, ZZZ}
\section{个人兴趣}
\cvline{爱好 1}{\small 说明}
\cvline{爱好 2}{\small 说明}
\cvline{爱好 3}{\small 说明}
\cvitem{爱好 1}{\small 说明}
\cvitem{爱好 2}{\small 说明}
\cvitem{爱好 3}{\small 说明}
\section{其他 1}
\cvlistitem{项目 1}

Binary file not shown.

View File

@ -10,8 +10,9 @@
% moderncv themes
\moderncvstyle{casual} % style options are 'casual' (default) and 'classic'
\moderncvcolor{blue} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
\moderncvcolor{blue} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
% character encoding
\usepackage[utf8]{inputenc} % replace by the encoding you are using
@ -26,12 +27,12 @@
\familyname{Doe}
\title{Resumé title (optional)} % optional, remove the line if not wanted
\address{street and number}{postcode city} % optional, remove the line if not wanted
\mobile{mobile (optional)} % optional, remove the line if not wanted
\phone{phone (optional)} % optional, remove the line if not wanted
\fax{fax (optional)} % optional, remove the line if not wanted
\email{email (optional)} % optional, remove the line if not wanted
\homepage{homepage (optional)} % optional, remove the line if not wanted
\extrainfo{additional information (optional)} % optional, remove the line if not wanted
\mobile{+1~(234)~567~890} % optional, remove the line if not wanted
\phone{+2~(345)~678~901} % optional, remove the line if not wanted
\fax{+3~(456)~789~012} % optional, remove the line if not wanted
\email{john@doe.org} % optional, remove the line if not wanted
\homepage{www.johndoe.com} % optional, remove the line if not wanted
\extrainfo{additional information} % optional, remove the line if not wanted
\photo[64pt][0.4pt]{picture} % '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file; optional, remove the line if not wanted
\quote{Some quote (optional)} % optional, remove the line if not wanted
@ -43,13 +44,11 @@
% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
%----------------------------------------------------------------------------------
% content
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK
%\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK
\maketitle
\section{Education}
@ -57,9 +56,9 @@
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
\section{Master thesis}
\cvline{title}{\emph{Title}}
\cvline{supervisors}{Supervisors}
\cvline{description}{\small Short thesis abstract}
\cvitem{title}{\emph{Title}}
\cvitem{supervisors}{Supervisors}
\cvitem{description}{Short thesis abstract}
\section{Experience}
\subsection{Vocational}
@ -85,26 +84,26 @@ Detailed achievements:%
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
\section{Languages}
\cvlanguage{Language 1}{Skill level}{Comment}
\cvlanguage{Language 2}{Skill level}{Comment}
\cvlanguage{Language 3}{Skill level}{Comment}
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{Language 2}{Skill level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}
\section{Computer skills}
\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvcomputer{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
\section{Interests}
\cvline{hobby 1}{\small Description}
\cvline{hobby 2}{\small Description}
\cvline{hobby 3}{\small Description}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
\cvitem{hobby 3}{Description}
\section{Extra 1}
\cvlistitem{Item 1}
\cvlistitem{Item 2}
\cvlistitem{Item 3}
\renewcommand{\listitemsymbol}{-} % change the symbol for lists
\renewcommand{\listitemsymbol}{-~} % change the symbol for lists
\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
@ -114,18 +113,18 @@ Detailed achievements:%
% Publications from a BibTeX file without multibib\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% for BibTeX numerical labels
\nocite{*}
\bibliographystyle{plain}
\bibliography{publications} % 'publications' is the name of a BibTeX file
\bibliography{publications} % 'publications' is the name of a BibTeX file
% Publications from a BibTeX file using the multibib package
%\section{Publications}
%\nocitebook{book1,book2}
%\bibliographystylebook{plain}
%\bibliographybook{publications} % 'publications' is the name of a BibTeX file
%\bibliographybook{publications} % 'publications' is the name of a BibTeX file
%\nocitemisc{misc1,misc2,misc3}
%\bibliographystylemisc{plain}
%\bibliographymisc{publications} % 'publications' is the name of a BibTeX file
%\bibliographymisc{publications} % 'publications' is the name of a BibTeX file
%\clearpage\end{CJK*} % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined
%\clearpage\end{CJK*} % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined
\end{document}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -138,6 +138,9 @@
% advanced command arguments
\RequirePackage{xargs}
% micro-typography (e.g., character protrusion, font expansion, hyphenatable letterspacing)
\RequirePackage{microtype}
% compatibility package with older versions of moderncv
\RequirePackageWithOptions{moderncvcompatibility}
@ -183,7 +186,7 @@
\renewcommand{\theenumiii}{\@roman\c@enumiii}
\renewcommand{\theenumiv}{\@Alph\c@enumiv}
% other symbols
\newcommand*{\listitemsymbol}{\labelitemi}
\newcommand*{\listitemsymbol}{\labelitemi~}
\newcommand*{\addresssymbol}{}
\newcommand*{\mobilesymbol}{\Mobilefone~}
\newcommand*{\phonesymbol}{\Telefon~}
@ -271,19 +274,19 @@
% makes a cv line with a list item
% usage: \cvlistitem[label]{item}
\newcommand*{\cvlistitem}[2][\listitemsymbol{}]{}
\newcommand*{\cvlistitem}[2][\listitemsymbol]{}
% makes a cv line with 2 list items
% usage: \cvlistdoubleitem[label]{item1}{item2}
\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{}
\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol]{}
% makes a typical cv job / education entry
% usage: \cventry{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
\newcommand*{\cventry}[6]{}
% makes a cv entry with a proficiency comment
% usage: \cvitemwithcomment{header}{text}{comment}
\newcommand*{\cvitemwithcomment}[3]{}
% usage: \cvitemwithcomment[spacing]{header}{text}{comment}
\newcommand*{\cvitemwithcomment}[4]{}
% makes a generic hyperlink
% usage: \link[optional text]{link}

View File

@ -29,14 +29,14 @@
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape}
\renewcommand*{\addressfont}{\normalsize\mdseries\slshape\small}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
% cv footer
\newif\if@firstfooterelement\@firstfooterelementtrue
\newcommand*{\footersymbol}{%
\if@firstfooterelement%
\else%
{~~~\color{color2}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when lmodern fonts are used :(
{ ~~\color{color2}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
\renewcommand*{\makefooter}{%
\fancypagestyle{plain}{%
\fancyfoot[c]{%

View File

@ -29,7 +29,7 @@
% fonts
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\normalsize\mdseries\slshape\small}
\renewcommand*{\addressfont}{\small\mdseries\slshape}
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
@ -53,7 +53,7 @@
\newlength{\maincolumnwidth}
\newlength{\doubleitemmaincolumnwidth}
\newlength{\listitemsymbolwidth}
\settowidth{\listitemsymbolwidth}{\listitemsymbol{}~}
\settowidth{\listitemsymbolwidth}{\listitemsymbol}
\newlength{\listitemmaincolumnwidth}
\newlength{\listdoubleitemmaincolumnwidth}
@ -65,11 +65,11 @@
% listitem lengths
\setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
% doubleitem lengths
\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth}%
\setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth-\separatorcolumnwidth}%
\setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
% listdoubleitem lengths
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
% fancyhdr lengths
\renewcommand{\headwidth}{\textwidth}}
@ -151,37 +151,42 @@
\renewcommand*{\cvdoubleitem}[5][.25em]{%
\cvitem[#1]{#2}{%
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}%
\hfill%
\hfill% fill of \separatorcolumnwidth
\begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#4}\end{minipage}%
\hspace*{\separatorcolumnwidth}%
\begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
\renewcommand*{\cvlistitem}[2][.25em]{%
\cvitem[#1]{}{\listitemsymbol~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{%
\cvitem[0pt]{}{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
\hfill%
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
\renewcommand*{\cventry}[6]{%
\cvitem{#1}{%
{\bfseries#2}%
\ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}%
\ifthenelse{\equal{#4}{}}{}{, #4}%
\renewcommand*{\cventry}[7][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.%
\ifx&#6&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi%
}}%
\ifx&#7&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
\renewcommand*{\cvitemwithcomment}[3]{%
\cvline{#1}{%
\begin{minipage}[t]{.225\maincolumnwidth}\textbf{#2}\end{minipage}%
\hfill%
\begin{minipage}[t]{0.725\maincolumnwidth}\raggedleft\footnotesize\itshape#3\end{minipage}}}
\newbox{\cvitemwithcommentmainbox}
\newlength{\cvitemwithcommentmainlength}
\newlength{\cvitemwithcommentcommentlength}
\renewcommand*{\cvitemwithcomment}[4][.25em]{%
\savebox{\cvitemwithcommentmainbox}{{\bfseries#3}}%
\setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
\setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
\cvitem[#1]{#2}{%
\begin{minipage}[t]{\cvitemwithcommentmainlength}\textbf{#3}\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}}
\renewenvironment{thebibliography}[1]%
{%

234
moderncvstyleoldstyle.sty Normal file
View File

@ -0,0 +1,234 @@
%% start of file `moderncvstyleoldstyle.sty'.
%% Copyright 2006-2011 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{moderncvstyleoldstyle}[2011/12/04 v0.14 modern curriculum vitae style: oldstyle]
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% package options
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
% style definition
%-------------------------------------------------------------------------------
% fonts
\IfFileExists{kurier.sty}
{\RequirePackage[light,math]{kurier}}
{}
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
\renewcommand*{\addressfont}{\small\mdseries}
\renewcommand*{\quotefont}{\large\itshape}
\renewcommand*{\sectionfont}{\Large\bfseries\upshape}
\renewcommand*{\subsectionfont}{\large\bfseries\itshape}
\renewcommand*{\hintfont}{\bfseries}
% styles
\newcommand*{\namestyle}[1]{{\namefont\color{color0}#1}}
\newcommand*{\titlestyle}[1]{{\titlefont\color{color2}#1}}
\newcommand*{\addressstyle}[1]{{\addressfont\color{color2}#1}}
\newcommand*{\quotestyle}[1]{{\quotefont\color{color1}#1}}
\newcommand*{\sectionstyle}[1]{{\sectionfont\color{color1}#1}}
\newcommand*{\subsectionstyle}[1]{{\subsectionfont\color{color1}#1}}
\newcommand*{\hintstyle}[1]{{\hintfont\color{color0}#1}}
% symbols
\renewcommand*{\listitemsymbol}{\labelitemi~}
\renewcommand*{\addresssymbol}{}
\renewcommand*{\mobilesymbol}{\textbf{M}~}
\renewcommand*{\phonesymbol}{\textbf{T}~}
\renewcommand*{\faxsymbol}{\textbf{F}~}
\renewcommand*{\emailsymbol}{\textbf{E}~}
\renewcommand*{\homepagesymbol}{}
% length used
\newlength{\quotewidth}
\newlength{\hintscolumnwidth}
\setlength{\hintscolumnwidth}{0.3\textwidth}%
\newlength{\separatorcolumnwidth}
\setlength{\separatorcolumnwidth}{0.025\textwidth}%
\newlength{\maincolumnwidth}
\newlength{\doubleitemcolumnwidth}
\newlength{\listitemsymbolwidth}
\settowidth{\listitemsymbolwidth}{\listitemsymbol}
\newlength{\listitemmaincolumnwidth}
\newlength{\listdoubleitemmaincolumnwidth}
% recompute all the lengths that depends on the text width
\renewcommand*{\recomputelengths}{%
\setlength{\quotewidth}{0.65\textwidth}%
% main lenghts
\setlength{\maincolumnwidth}{\textwidth-\hintscolumnwidth-\separatorcolumnwidth}%
% listitem lengths
\setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
% doubleitem lengths
\setlength{\doubleitemcolumnwidth}{\maincolumnwidth-\separatorcolumnwidth}%
\setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
% listdoubleitem lengths
\setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
% fancyhdr lengths
\renewcommand{\headwidth}{\textwidth}}
\newcommand{\makeinfo}[1]{%
\newbox{\makeinfobox}%
\savebox{\makeinfobox}{\parbox[b]{\hintscolumnwidth}{\if@DEBUG\rule{20cm}{.1pt}\\\fi#1}}%
\newlength{\makeinfoheight}%
\setlength{\makeinfoheight}{\totalheightof{\usebox{\makeinfobox}}}% the total height of the parbox is the sum of its height (\the\ht\makeinfobox) and its depth (\the\dp\makeinfobox); the \totalheightof command is provided by the "calc" package
\usebox{\makeinfobox}\vspace*{-\makeinfoheight}%
\newlength{\leftcolumnwidth}%
\setlength{\leftcolumnwidth}{\hintscolumnwidth+\separatorcolumnwidth}
\par\nointerlineskip\vspace*{-\parskip}\vspace*{-2.5ex}\leftskip=\leftcolumnwidth\if@DEBUG\rule{20cm}{.1pt}\fi}% the -2.5ex vertical slip is to counter the 2.5ex skip of sections
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{
\if@firstdetailselement%
\else%
\\[.2em]\fi%
\@firstdetailselementfalse%
\addressfont\color{color2}}
\renewcommand*{\maketitle}{
% optional picture box
\newbox{\maketitlepicturebox}%
\savebox{\maketitlepicturebox}{%
\ifthenelse{\isundefined{\@photo}}%
{}%
{%
\color{color1}%
\setlength\fboxrule{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}%
\newlength{\maketitlenamewidth}\setlength{\maketitlenamewidth}{\textwidth-\maketitlepicturewidth}%
\begin{minipage}[b]{\maketitlenamewidth}%
\namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
% optional photo
\usebox{\maketitlepicturebox}\\[3em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
{{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
% optional details
\makeinfo{%
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}%
\ifthenelse{\isundefined{\@addresscity}}{}{\maketitledetailsnewline\@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}}}
\renewcommand*{\section}[1]{%
\vspace*{2.5ex}%
\phantomsection{}% reset the anchor for hyperrefs
\addcontentsline{toc}{part}{#1}%
\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)
\renewcommand*{\subsection}[1]{%
\subsectionstyle{#1}%
\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...)
\renewcommand*{\cvitem}[3][.25em]{%
\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}\\[#1]}
\renewcommand*{\cvdoubleitem}[5][.25em]{%
\begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#2}: #3\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#4}: #5\end{minipage}\\[#1]}
\renewcommand*{\cvlistitem}[2][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\ifthenelse{\equal{#3}{}}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
\newbox{\cventryyearbox}
\newlength{\cventrytitleboxwidth}
\renewcommand*{\cventry}[7][.25em]{%
\savebox{\cventryyearbox}{%
\hspace*{\separatorcolumnwidth}%
{\hintfont#2}}%
\setlength{\cventrytitleboxwidth}{\widthof{\usebox{\cventryyearbox}}}%
\setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}%
\begin{minipage}{\maincolumnwidth}%
\parbox[t]{\cventrytitleboxwidth}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6}%
.}%
\usebox{\cventryyearbox}%
\ifx&#7&%
\else{%
\newline{}\begin{minipage}[t]{\maincolumnwidth}\small#7\end{minipage}}\fi%
\end{minipage}\\[#1]}
\newbox{\cvitemwithcommentmainbox}
\newlength{\cvitemwithcommentmainlength}
\newlength{\cvitemwithcommentcommentlength}
\renewcommand*{\cvitemwithcomment}[4][.25em]{%
\savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }#3}%
\setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
\setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
\begin{minipage}[t]{\cvitemwithcommentmainlength}\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }#3\end{minipage}%
\hfill% fill of \separatorcolumnwidth
\begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}\\[#1]}
\renewenvironment{thebibliography}[1]%
{%
\bibliographyhead{\refname}%
\small%
\begin{list}{\bibliographyitemlabel}%
{%
\setlength{\topsep}{0pt}%
\setlength{\labelwidth}{\hintscolumnwidth}%
\setlength{\labelsep}{\separatorcolumnwidth}%
\leftmargin\labelwidth%
\advance\leftmargin\labelsep%
\@openbib@code%
\usecounter{enumiv}%
\let\p@enumiv\@empty%
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy\clubpenalty4000\widowpenalty4000%
% \sfcode`\.\@m%
% \sfcode `\=1000\relax%
}%
{%
\def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
\end{list}%
}
\endinput
%% end of file `moderncvstyleoldstyle.sty'.