diff --git a/CHANGELOG b/CHANGELOG index e4bd927..025782a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ version 0.15 (xx December 2011) - 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. version 0.14 (04 December 2011) - adds support for CJK, thanks to the help of P. D'Apice. diff --git a/examples/template-zh.pdf b/examples/template-zh.pdf index dffb9e4..bd23209 100644 Binary files a/examples/template-zh.pdf and b/examples/template-zh.pdf differ diff --git a/examples/template-zh.tex b/examples/template-zh.tex index bea9454..15c303c 100644 --- a/examples/template-zh.tex +++ b/examples/template-zh.tex @@ -1,4 +1,4 @@ -%% start of file `template.tex'. +%% start of file `template-zh.tex'. %% Copyright 2006-2011 Xavier Danaux (xdanaux@gmail.com). % % This work may be distributed and/or modified under the @@ -6,11 +6,11 @@ % available at http://www.latex-project.org/lppl/. -\documentclass[11pt,a4paper]{moderncv} +\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 主题 -\moderncvtheme[blue]{casual} % 选项参数是 ‘blue’ (默认)、‘orange’、‘green’、‘red’、‘purple’、‘grey’和‘roman’ (改变无衬线自体为衬线字体) -%\moderncvtheme[green]{classic} % 同上 +\moderncvstyle{casual} % 选项参数是 ‘casual’ 和 ‘classic’ +\moderncvcolor{blue} % 选项参数是 ‘blue’ (默认)、‘orange’、‘green’、‘red’、‘purple’ 和 ‘grey’ % 字符编码 \usepackage[utf8]{inputenc} % 替换你正在使用的编码 @@ -19,7 +19,6 @@ % 调整页面出血 \usepackage[scale=0.8]{geometry} %\setlength{\hintscolumnwidth}{3cm} % 如果你希望改变日期栏的宽度 -%\setlength{\maketitlenamewidth}{10cm} % 仅用于经典主题,如果你希望改变你的姓名框的宽度 (以便给地址留出更多的空间) % 个人信息 \firstname{小龙} @@ -36,9 +35,9 @@ \quote{引言(可选项)} % 可选项、如不需要可删除本行 % 显示索引号;仅用于在简历中使用了引言 -\makeatletter -\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}} -\makeatother +%\makeatletter +%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}} +%\makeatother % 分类索引 %\usepackage{multibib} @@ -102,13 +101,13 @@ \section{其他 1} \cvlistitem{项目 1} \cvlistitem{项目 2} -\cvlistitem[+]{项目 3} % 可选其他符号 +\cvlistitem{项目 3} \renewcommand{\listitemsymbol}{-} % 改变列表符号 \section{其他 2} \cvlistdoubleitem{项目 1}{项目 4} -\cvlistdoubleitem{项目 2}{项目 5 \cite{book1}} +\cvlistdoubleitem{项目 2}{项目 5\cite{book1}} \cvlistdoubleitem{项目 3}{} % 来自BibTeX文件但不使用multibib包的出版物 @@ -130,4 +129,4 @@ \end{document} -%% 文件结尾 `template_zh.tex'. +%% 文件结尾 `template-zh.tex'. \ No newline at end of file diff --git a/examples/template.pdf b/examples/template.pdf index 02d3323..258ce8b 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template.tex b/examples/template.tex index aca9242..b6a1a7f 100644 --- a/examples/template.tex +++ b/examples/template.tex @@ -6,11 +6,12 @@ % available at http://www.latex-project.org/lppl/. -\documentclass[11pt,a4paper]{moderncv} +\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 themes -\moderncvtheme[blue]{casual} % optional argument are 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts) -%\moderncvtheme[green]{classic} % idem +\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 % character encoding \usepackage[utf8]{inputenc} % replace by the encoding you are using @@ -19,7 +20,6 @@ % adjust the page margins \usepackage[scale=0.8]{geometry} %\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates -%\setlength{\maketitlenamewidth}{10cm}} % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details % personal data \firstname{John} @@ -35,10 +35,10 @@ \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 -% to show numerical labels in the bibliography; only useful if you make citations in your resume -\makeatletter -\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}} -\makeatother +% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume +%\makeatletter +%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}} +%\makeatother % bibliography with mutiple entries %\usepackage{multibib} @@ -102,13 +102,13 @@ Detailed achievements:% \section{Extra 1} \cvlistitem{Item 1} \cvlistitem{Item 2} -\cvlistitem[+]{Item 3} % optional other symbol +\cvlistitem{Item 3} \renewcommand{\listitemsymbol}{-} % change the symbol for lists \section{Extra 2} \cvlistdoubleitem{Item 1}{Item 4} -\cvlistdoubleitem{Item 2}{Item 5 \cite{book1}} +\cvlistdoubleitem{Item 2}{Item 5\cite{book1}} \cvlistdoubleitem{Item 3}{} % Publications from a BibTeX file without multibib\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% for BibTeX numerical labels @@ -129,4 +129,4 @@ Detailed achievements:% \end{document} -%% end of file `template_en.tex'. +%% end of file `template.tex'. diff --git a/examples/template_casual_orange.pdf b/examples/template_casual_orange.pdf index b0f8cef..5cf004f 100644 Binary files a/examples/template_casual_orange.pdf and b/examples/template_casual_orange.pdf differ diff --git a/examples/template_classic_green.pdf b/examples/template_classic_green.pdf index 347b0fd..b630f4a 100644 Binary files a/examples/template_classic_green.pdf and b/examples/template_classic_green.pdf differ diff --git a/examples/template_multibib.pdf b/examples/template_multibib.pdf index 1fb4365..98726a2 100644 Binary files a/examples/template_multibib.pdf and b/examples/template_multibib.pdf differ diff --git a/moderncv.cls b/moderncv.cls index a28486c..4abfff4 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -56,12 +56,16 @@ \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} +% font type options +\DeclareOption{sans}{\renewcommand{\familydefault}{\sfdefault}} +\DeclareOption{roman}{\renewcommand{\familydefault}{\rmdefault}} + % draft/final option \DeclareOption{draft}{\setlength\overfullrule{5pt}} \DeclareOption{final}{\setlength\overfullrule{0pt}} % execute default options -\ExecuteOptions{a4paper,11pt,final} +\ExecuteOptions{a4paper,11pt,sans,final} % process given options \ProcessOptions\relax @@ -82,7 +86,7 @@ \RequirePackage{ifthen} % color -\RequirePackage{color} +\RequirePackage{xcolor} % automatic loading of latin modern fonts if present on the system \IfFileExists{lmodern.sty} @@ -92,7 +96,7 @@ % symbols like \Telefon, \Mobilefone, \Letter and \Email \RequirePackage{marvosym} -% hyperrefs +% hyper links \RequirePackage{url} \urlstyle{tt} % load hyperred at the end of the preamble to pass options required by loaded packages (like CJK) @@ -128,6 +132,9 @@ \fancyhf{}} \pagestyle{plain} +% lengths calculations +\RequirePackage{calc} + % advanced command arguments \RequirePackage{xargs} @@ -162,63 +169,61 @@ %------------------------------------------------------------------------------- -% style commands definitions +% design commands definitions %------------------------------------------------------------------------------- -% symbols used -\providecommand*{\listitemsymbol}{\Neutral}%{{\fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}}} -\providecommand*{\addresssymbol}{} -\providecommand*{\mobilesymbol}{\Mobilefone} -\providecommand*{\phonesymbol}{\Telefon} -\providecommand*{\faxsymbol}{\FAX} -\providecommand*{\emailsymbol}{\Letter} -\providecommand*{\homepagesymbol}{{\Large\ComputerMouse}} +% symbols +% itemize labels +\newcommand*{\labelitemi}{\textcolor{color1}{\Neutral}}% alternative" \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102} +\newcommand*{\labelitemii}{\textcolor{color1}{\large\bfseries-}} +\newcommand*{\labelitemiii}{\textcolor{color1}{\textperiodcentered}}% alternative: \textasteriskcentered; both force the use of the CMSY font, even when lmodern fonts are used :( +\newcommand*{\labelitemiv}{\textcolor{color1}{\textperiodcentered}} +% enumerate labels +\renewcommand{\theenumi}{\@arabic\c@enumi} +\renewcommand{\theenumii}{\@alph\c@enumii} +\renewcommand{\theenumiii}{\@roman\c@enumiii} +\renewcommand{\theenumiv}{\@Alph\c@enumiv} +% other symbols +\newcommand*{\listitemsymbol}{\labelitemi} +\newcommand*{\addresssymbol}{} +\newcommand*{\mobilesymbol}{\Mobilefone} +\newcommand*{\phonesymbol}{\Telefon} +\newcommand*{\faxsymbol}{\FAX} +\newcommand*{\emailsymbol}{\Letter} +\newcommand*{\homepagesymbol}{{\Large\ComputerMouse}} % colors -\definecolor{firstnamecolor}{rgb}{0,0,0} -\definecolor{familynamecolor}{rgb}{0,0,0} -\definecolor{titlecolor}{rgb}{0,0,0} -\definecolor{addresscolor}{rgb}{0,0,0} -\definecolor{quotecolor}{rgb}{0,0,0} -\definecolor{sectionrectanglecolor}{rgb}{0,0,0} -\definecolor{sectiontitlecolor}{rgb}{0,0,0} -\definecolor{subsectioncolor}{rgb}{0,0,0} -\definecolor{hintcolor}{rgb}{0,0,0} +\definecolor{color0}{rgb}{0,0,0}% main default color, normally left to black +\definecolor{color1}{rgb}{0,0,0}% primary theme color +\definecolor{color2}{rgb}{0,0,0}% secondary theme color +\definecolor{color3}{rgb}{0,0,0}% tertiary theme color % fonts -\providecommand*{\firstnamefont}{} -\providecommand*{\familynamefont}{} -\providecommand*{\titlefont}{} -\providecommand*{\addressfont}{} -\providecommand*{\quotefont}{} -\providecommand*{\sectionfont}{} -\providecommand*{\subsectionfont}{} -\providecommand*{\hintfont}{\small} +\newcommand*{\namefont}{} +\newcommand*{\titlefont}{} +\newcommand*{\addressfont}{} +\newcommand*{\quotefont}{} +\newcommand*{\sectionfont}{} +\newcommand*{\subsectionfont}{} +\newcommand*{\hintfont}{} +\AtBeginDocument{\normalfont\color{color0}} -% styles -\providecommand*{\firstnamestyle}[1]{{\firstnamefont\color{firstnamecolor}#1}} -\providecommand*{\familynamestyle}[1]{{\familynamefont\color{familynamecolor}#1}} -\providecommand*{\titlestyle}[1]{{\titlefont\color{titlecolor}#1}} -\providecommand*{\addresstyle}[1]{{\addressfont\color{addresscolor}#1}} -\providecommand*{\quotestyle}[1]{{\quotefont\color{quotecolor}#1}} -\providecommand*{\sectionstyle}[1]{{\sectionfont\color{sectiontitlecolor}#1}} -\providecommand*{\subsectionstyle}[1]{{\subsectionfont\color{subsectioncolor}#1}} -\providecommand*{\hintstyle}[1]{{\hintfont\color{hintcolor}#1}} +% loads a style scheme +\newcommand*{\moderncvstyle}[1]{ + \RequirePackage{moderncvstyle#1}} + +% loads a color scheme +\newcommand*{\moderncvcolor}[1]{ + \RequirePackage{moderncvcolor#1}} -% makes the cv title -\newcommand*{\maketitle}{}% -\title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title - -% makes the cv footer -\newcommand*{\makefooter} - -% loads a style -\newcommand*{\moderncvtheme}[2][]{ - \RequirePackage[#1]{moderncvtheme#2}} +% recompute all automatic lengths +\newcommand*{\recomputelengths}{} +\AtBeginDocument{\recomputelengths{}} %------------------------------------------------------------------------------- % structure commands definitions %------------------------------------------------------------------------------- +% cv elements \newcommand*{\firstname}[1]{\def\@firstname{#1}} \newcommand*{\familyname}[1]{\def\@familyname{#1}} \renewcommand*{\title}[1]{\def\@title{#1}} @@ -232,62 +237,18 @@ \newcommandx*{\photo}[3][1=64pt,2=0.4pt,usedefault]{\def\@photowidth{#1}\def\@photoframewidth{#2}\def\@photo{#3}}% the 1st (optional) argument is the width of the photo, the 2nd (optional) argument is the thickness of the frame around it. \newcommand*{\quote}[1]{\def\@quote{#1}} -% length used by the moderncv layout -% quote length -\newlength{\quotewidth} -% section lengths -\newlength{\hintscolumnwidth} -\setlength{\hintscolumnwidth}{0.15\textwidth} -\newlength{\separatorcolumnwidth} -\setlength{\separatorcolumnwidth}{0.025\textwidth} -\newlength{\maincolumnwidth} -% doubleitem lengths -\newlength{\doubleitemmaincolumnwidth} -% listitem lengths -\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}% - % main lenghts - \setlength{\maincolumnwidth}{\textwidth}% - \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}% - \addtolength{\maincolumnwidth}{-\hintscolumnwidth}% - % listitem lengths - \setlength{\listitemmaincolumnwidth}{\maincolumnwidth}% - \addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}% - % doubleitem lengths - \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}% - \addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}% - \addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}% - \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}% - % listdoubleitem lengths - \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}% - \addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}% - \setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}% - % fancyhdr lengths - \renewcommand{\headwidth}{\textwidth}% - \recomputethemelengths{}} -\AtBeginDocument{\recomputelengths{}} +% makes the cv title +% usage: \maketitle +\newcommand*{\maketitle}{}% +\title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title -% draws a colored rectangle -% usage: \colorrule[optional height]{width} -%\newcommand*{\colorrule}[2][1ex]{{\color{sectionrectanglecolor}{\rule{#2}{#1}}}} +% makes the cv footer +% usage: \makefooter +\newcommand*{\makefooter} +% makes a cv section % usage: \section{} -\newcommand*{\section}[1]{% - \vspace*{2.5ex}% - \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}% - \phantomsection{}% reset the anchor for hyperrefs - \addcontentsline{toc}{part}{#1}% - \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) +\newcommand*{\section}[1]{} \AtEndPreamble{% \@ifpackageloaded{natbib} { @@ -296,89 +257,67 @@ }{} } +% makes a cv subsection % usage: \subsection{title} -\newcommand*{\subsection}[1]{% - \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...) +\newcommand*{\subsection}[1]{} -% usage: \cvline{margintext}{linetext} -\newcommand*{\cvline}[3][.25em]{% - \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% - \raggedleft\hintfont{#2} &{#3}% - \end{tabular}\\[#1]} +% makes a cv line with a header and a corresponding text +% usage: \cvitem[spacing]{header}{text} +\newcommand*{\cvitem}[3][.25em]{} -% usage: \cvdoubleitem{subtitle}{text}{subtitle}{text} -\newcommand*{\cvdoubleitem}[4]{% - \cvline{#1}{\begin{minipage}[t]{\doubleitemmaincolumnwidth}#2\end{minipage}% - \hfill% - \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#3}\end{minipage}\hspace*{\separatorcolumnwidth}\begin{minipage}[t]{\doubleitemmaincolumnwidth}#4\end{minipage}}} +% makes a cv line 2 headers and their corresponding text +% usage: \cvdoubleitem[spacing]{header1}{text1}{header2}{text2} +\newcommand*{\cvdoubleitem}[5][.25em]{} -% usage: \cvlistitem[symbol]{point1} -\newcommand*{\cvlistitem}[2][\listitemsymbol{}]{% - \cvline[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}} +% makes a cv line with a list item +% usage: \cvlistitem[label]{item} +\newcommand*{\cvlistitem}[2][\listitemsymbol{}]{} -% usage: \cvlistdoubleitem[symbol]{point1}{point2} -\newcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{% - \cvline[0pt]{}{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}% - \hfill% - \ifthenelse{\equal{#3}{}}% - {}% - {#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}} +% makes a cv line with 2 list items +% usage: \cvlistdoubleitem[label]{item1}{item2} +\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]{% - \cvline{#1}{% - {\bfseries#2}% - \ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}% - \ifthenelse{\equal{#4}{}}{}{, #4}% - \ifthenelse{\equal{#5}{}}{}{, #5}% - .% - \ifx&% - \else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi% - }}% +\newcommand*{\cventry}[6]{} -% usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment} -\newcommand*{\cvlanguage}[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}}} - -% usage (inside 'computer skills' cvsection environment): \cvcomputer{category}{programs}{category}{programs} -\newcommand*{\cvcomputer}[4]{% - \cvdoubleitem{#1}{\small#2}{#3}{\small#4}} +% makes a cv entry with a proficiency comment +% usage: \cvitemwithcomment{header}{text}{comment} +\newcommand*{\cvitemwithcomment}[3]{} +% makes a generic hyperlink % usage: \link[optional text]{link} \newcommand*{\link}[2][]{% \ifthenelse{\equal{#1}{}}% {\href{#2}{#2}}% {\href{#2}{#1}}} +% makes a http hyperlink % usage: \httplink[optional text]{link} \newcommand*{\httplink}[2][]{% \ifthenelse{\equal{#1}{}}% {\href{http://#2}{#2}}% {\href{http://#2}{#1}}} +% makes an email hyperlink % usage: \emaillink[optional text]{link} \newcommand*{\emaillink}[2][]{% \ifthenelse{\equal{#1}{}}% {\href{mailto:#2}{#2}}% {\href{mailto:#2}{#1}}} -% usage: \nopagenumbers{} +% page numbers in footer if more than 1 page \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}}\else\fi}} + \AtBeginDocument{% + \if@displaypagenumbers% + \@ifundefined{r@lastpage}{}{% + \ifthenelse{\pageref{lastpage} > 1}{% + \fancypagestyle{plain}{% + \fancyfoot[r]{\addressfont\color{color2}\footnotesize\thepage/\pageref{lastpage}}}% + \pagestyle{plain}}{}}% + \AtEndDocument{\label{lastpage}}\else\fi}} % thebibliography environment, for use with BibTeX and possibly multibib \newcommand{\refname}{Publications} @@ -391,56 +330,24 @@ \newcommand*{\bibliographyhead}[1]{\section{#1}} \AtEndPreamble{\@ifpackageloaded{multibib}{\renewcommand*{\bibliographyhead}[1]{\subsection{#1}}}{}} % thebibliography environment definition -\newenvironment{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}% - } +\newenvironment{thebibliography}[1]{}{} \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty % itemize, enumerate and description environment -\setlength{\leftmargini} {1.2em} +\setlength{\leftmargini} {1em} \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} +\setlength{\leftmarginii} {\leftmargini} +\setlength{\leftmarginiii} {\leftmargini} +\setlength{\leftmarginiv} {\leftmargini} +\setlength{\leftmarginv} {\leftmargini} +\setlength{\leftmarginvi} {\leftmargini} +\setlength{\labelsep} {.5em}% this is the distance between the label and the body, but it pushes the label to the left rather than pushing the body to the right (to do the latter, modify \leftmargin(i) +\setlength{\labelwidth} {\leftmargini}% unfortunately, \labelwidth is not defined by item level (i.e. no \labeliwidth, \labeliiwidth, etc) \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.} @@ -466,6 +373,12 @@ July\or August\or September\or October\or November\or December\fi \space\number\day, \number\year} +%\newcommand{\widthofautobox}[1]{% +% \widthof{\begin{tabular}{@{}l@{}}#1\end{tabular}}} + +%\newcommand{\autobox}[2][b]{% +% \parbox[#1]{\widthofautobox{#2}}{#2}} + \endinput diff --git a/moderncvcolorblack.sty b/moderncvcolorblack.sty new file mode 100644 index 0000000..b0260d6 --- /dev/null +++ b/moderncvcolorblack.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorblack.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{moderncvcolorblack}[2011/12/04 v0.14 modern curriculum vitae color scheme: black] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0,0,0}% black +\definecolor{color2}{rgb}{0,0,0}% black + + +\endinput + + +%% end of file `moderncvcolorblack.sty'. diff --git a/moderncvcolorblue.sty b/moderncvcolorblue.sty new file mode 100644 index 0000000..16252a9 --- /dev/null +++ b/moderncvcolorblue.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorblue.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{moderncvcolorblue}[2011/12/04 v0.14 modern curriculum vitae color scheme: blue] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.22,0.45,0.70}% light blue +\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey + + +\endinput + + +%% end of file `moderncvcolorblue.sty'. diff --git a/moderncvcolorgreen.sty b/moderncvcolorgreen.sty new file mode 100644 index 0000000..ab4bc7f --- /dev/null +++ b/moderncvcolorgreen.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorgreen.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{moderncvcolorgreen}[2011/12/04 v0.14 modern curriculum vitae color scheme: green] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.35,0.70,0.30}% green +\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey + + +\endinput + + +%% end of file `moderncvcolorgreen.sty'. diff --git a/moderncvcolorgrey.sty b/moderncvcolorgrey.sty new file mode 100644 index 0000000..464846a --- /dev/null +++ b/moderncvcolorgrey.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorgrey.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{moderncvcolorgrey}[2011/12/04 v0.14 modern curriculum vitae color scheme: grey] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.55,0.55,0.55}% dark grey +\definecolor{color2}{rgb}{0.55,0.55,0.55}% dark grey + + +\endinput + + +%% end of file `moderncvcolorgrey.sty'. diff --git a/moderncvcolororange.sty b/moderncvcolororange.sty new file mode 100644 index 0000000..796be8c --- /dev/null +++ b/moderncvcolororange.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolororange.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{moderncvcolororange}[2011/12/04 v0.14 modern curriculum vitae color scheme: orange] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.95,0.55,0.15}% orange +\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey + + +\endinput + + +%% end of file `moderncvcolororange.sty'. diff --git a/moderncvcolorpurple.sty b/moderncvcolorpurple.sty new file mode 100644 index 0000000..90ec898 --- /dev/null +++ b/moderncvcolorpurple.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorpurple.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{moderncvcolorpurple}[2011/12/04 v0.14 modern curriculum vitae color scheme: purple] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.50,0.33,0.80}% purple +\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey + + +\endinput + + +%% end of file `moderncvcolorpurple.sty'. diff --git a/moderncvcolorred.sty b/moderncvcolorred.sty new file mode 100644 index 0000000..b0119b3 --- /dev/null +++ b/moderncvcolorred.sty @@ -0,0 +1,27 @@ +%% start of file `moderncvcolorred.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{moderncvcolorred}[2011/12/04 v0.14 modern curriculum vitae color scheme: red] + + +%------------------------------------------------------------------------------- +% color scheme definition +%------------------------------------------------------------------------------- +\definecolor{color0}{rgb}{0,0,0}% black +\definecolor{color1}{rgb}{0.95,0.20,0.20}% red +\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey + + +\endinput + + +%% end of file `moderncvcolorred.sty'. diff --git a/moderncvcompatibility.sty b/moderncvcompatibility.sty index 9069a4d..585068e 100644 --- a/moderncvcompatibility.sty +++ b/moderncvcompatibility.sty @@ -53,10 +53,10 @@ % \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}} +%\newcommand*{\cvitem}[2]{\cvline{#1}{#2}} +%\newcommand*{\moderncvstyle}[1]{\moderncvtheme{#1}} -% compatibility with versions <=0.7 +% compatibility with versions <= 0.7 \newcommand*{\closesection}{} \newcommand*{\emptysection}{} \newcommand*{\sethintscolumnlength}[1]{% @@ -66,6 +66,14 @@ \settowidth{\hintscolumnwidth}{#1}% \recomputelengths} +% compatibility with versions <= 0.15 +\newcommand*{\cvline}[2]{\cvitem{#1}{#2}} +\newcommand*{\cvlanguage}[3]{\cvitemwithcomment{#1}{#2}{#3}} +\newcommand*{\cvcomputer}[4]{\cvdoubleitem{#1}{\small#2}{#3}{\small#4}} +\newcommand*{\moderncvtheme}[2][blue]{% + \moderncvcolor{#1}% + \moderncvstyle{#2}} + \endinput diff --git a/moderncvstylecasual.sty b/moderncvstylecasual.sty new file mode 100644 index 0000000..6a04454 --- /dev/null +++ b/moderncvstylecasual.sty @@ -0,0 +1,88 @@ +%% start of file `moderncvstylecasual.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{moderncvstylecasual}[2011/12/04 v0.14 modern curriculum vitae style scheme: casual] + + +%------------------------------------------------------------------------------- +% required packages +%------------------------------------------------------------------------------- + + +%------------------------------------------------------------------------------- +% package options +%------------------------------------------------------------------------------- +\RequirePackage{moderncvstyleclassic} + + +%------------------------------------------------------------------------------- +% style scheme definition +%------------------------------------------------------------------------------- +% fonts +\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape} +\renewcommand*{\addressfont}{\normalsize\mdseries\slshape\small} +\renewcommand*{\quotefont}{\large\slshape} +\renewcommand*{\sectionfont}{\Large\mdseries\upshape} +\renewcommand*{\subsectionfont}{\large\mdseries\upshape} + +% cv footer +\newif\if@firstfooterelement\@firstfooterelementtrue +\newcommand*{\footersymbol}{% + \if@firstfooterelement% + \else% + { ~~\color{color1}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when lmodern fonts are used :( +\renewcommand*{\makefooter}{% + \fancypagestyle{plain}{% + \fancyfoot[c]{% + \parbox{0.8\textwidth}{% + \centering% + \addressfont\color{color2}% + \ifthenelse{\isundefined{\@addressstreet}}{}{% + \addresssymbol~\@addressstreet% + \@firstfooterelementfalse% + \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}}}% + }% + \pagestyle{plain}} + +% maketitle +\renewcommand*{\maketitle}{% + \makefooter{}% + \newbox{\maketitlepicturebox}% + \savebox{\maketitlepicturebox}{% + \ifthenelse{\isundefined{\@photo}}% + {}% + {% + \setlength\fboxrule{\@photoframewidth}% + \ifdim\@photoframewidth=0pt% + \setlength{\fboxsep}{0pt}\fi% + {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}% + \usebox{\maketitlepicturebox}% + \newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}% + \parbox[b]{\textwidth-\maketitlepicturewidth}{\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space + {\color{color2!50}\rule{\textwidth}{.25ex}\\[2.5em]}% +% optional quote + \ifthenelse{\isundefined{\@quote}}% + {}% + {{\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 + + +\endinput + + +%% end of file `moderncvstylecasual.sty'. diff --git a/moderncvstyleclassic.sty b/moderncvstyleclassic.sty new file mode 100644 index 0000000..ae427c5 --- /dev/null +++ b/moderncvstyleclassic.sty @@ -0,0 +1,253 @@ +%% start of file `moderncvstyleclassic.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{moderncvstyleclassic}[2011/12/04 v0.14 modern curriculum vitae style scheme: 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} +% purple +\newif\if@colorpurple\@colorpurplefalse +%\DeclareOption{purple}{\@colorpurpletrue} +% grey +\newif\if@colorgrey\@colorgreyfalse +%\DeclareOption{grey}{\@colorgreytrue} +% black +\newif\if@colorblack\@colorblackfalse +%\DeclareOption{black}{\@colorblacktrue} + +% unused options +%\DeclareOption*{ +% \PackageWarning{moderncvstyleclassic}{Unknown option '\CurrentOption'}} + +% execute default options +%\ExecuteOptions{} + +% process given options +%\ProcessOptions\relax + + +%------------------------------------------------------------------------------- +% style scheme definition +%------------------------------------------------------------------------------- +% fonts +\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape} +\renewcommand*{\titlefont}{\LARGE\mdseries\slshape} +\renewcommand*{\addressfont}{\normalsize\mdseries\slshape} +\renewcommand*{\quotefont}{\large\slshape} +\renewcommand*{\sectionfont}{\Large\mdseries\upshape} +\renewcommand*{\subsectionfont}{\large\mdseries\upshape} +\renewcommand*{\hintfont}{\small} + +% styles +\newcommand*{\namestyle}[1]{{\namefont\color{color0}#1}} +\newcommand*{\titlestyle}[1]{{\titlefont\color{color2}#1}} +\newcommand*{\addresstyle}[1]{{\addressfont\color{color1}#1}} +\newcommand*{\quotestyle}[1]{{\quotefont\color{color2}#1}} +\newcommand*{\sectionstyle}[1]{{\sectionfont\color{color1}#1}} +\newcommand*{\subsectionstyle}[1]{{\subsectionfont\color{color1}#1}} +\newcommand*{\hintstyle}[1]{{\hintfont\color{color0}#1}} + +% length used +\newlength{\quotewidth} +\newlength{\hintscolumnwidth} +\setlength{\hintscolumnwidth}{0.15\textwidth} +\newlength{\separatorcolumnwidth} +\setlength{\separatorcolumnwidth}{0.025\textwidth} +\newlength{\maincolumnwidth} +\newlength{\doubleitemmaincolumnwidth} +\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}% + \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}% + \addtolength{\maincolumnwidth}{-\hintscolumnwidth}% + % listitem lengths + \setlength{\listitemmaincolumnwidth}{\maincolumnwidth}% + \addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}% + % doubleitem lengths + \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}% + \addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}% + \addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}% + \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}% + % listdoubleitem lengths + \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}% + \addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}% + \setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}% + % fancyhdr lengths + \renewcommand{\headwidth}{\textwidth}} + +\newif\if@firstdetailselement\@firstdetailselementtrue +\newcommand*{\maketitledetailsnewline}{ + \if@firstdetailselement% + \else% + \\[.2em]\fi% + \@firstdetailselementfalse% + \addressfont\color{color1}} +\renewcommand*{\maketitle}{% + % optional detailed information box + \newbox{\maketitledetailsbox}% + \savebox{\maketitledetailsbox}{% + \begin{tabular}[b]{@{}r@{}}% + \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}% + \end{tabular} + }% + % optional picture box + \newbox{\maketitlepicturebox}% + \savebox{\maketitlepicturebox}{% + \ifthenelse{\isundefined{\@photo}}% + {}% + {% + \hspace*{\separatorcolumnwidth}% + \color{color1}% + \setlength\fboxrule{\@photoframewidth}% + \ifdim\@photoframewidth=0pt% + \setlength{\fboxsep}{0pt}\fi% + \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% + % name and title + \newlength{\maketitledetailswidth}\settowidth{\maketitledetailswidth}{\usebox{\maketitledetailsbox}}% + \newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}% + \newlength{\maketitlenamewidth}\setlength{\maketitlenamewidth}{\textwidth-\maketitledetailswidth-\maketitlepicturewidth}% + \begin{minipage}[b]{\maketitlenamewidth}% + \namestyle{\@firstname\ \@familyname}% + \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% + \end{minipage}% + % detailed information + \usebox{\maketitledetailsbox}% + % optional photo + \usebox{\maketitlepicturebox}\\[3em]% + % optional quote + \ifthenelse{\isundefined{\@quote}}% + {}% + {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% + } + +\renewcommand*{\section}[1]{% + \vspace*{2.5ex}% + \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{color1}\rule{\hintscolumnwidth}{1ex}}}% + \phantomsection{}% reset the anchor for hyperrefs + \addcontentsline{toc}{part}{#1}% + \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) + +\renewcommand*{\subsection}[1]{% + \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...) + +\renewcommand*{\cvitem}[3][.25em]{% + \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% + \raggedleft\hintfont{#2} &{#3}% + \end{tabular}\\[#1]} + +\renewcommand*{\cvdoubleitem}[5][.25em]{% + \cvitem[#1]{#2}{% + \begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}% + \hfill% + \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#4}\end{minipage}% + \hspace*{\separatorcolumnwidth}% + \begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}} + +%\renewcommand*{\cvlistitem}[2][\listitemsymbol]{% +% \cvitem[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}} +\renewcommand*{\cvlistitem}[2][.25em]{% + \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% + \ifthenelse{\equal{#3}{}}% + {}% + {#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}} + +\renewcommand*{\cventry}[6]{% + \cvline{#1}{% + {\bfseries#2}% + \ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}% + \ifthenelse{\equal{#4}{}}{}{, #4}% + \ifthenelse{\equal{#5}{}}{}{, #5}% + .% + \ifx&% + \else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\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}}} + +\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 `moderncvstyleclassic.sty'. diff --git a/moderncvthemecasual.sty b/moderncvthemecasual.sty deleted file mode 100644 index 1149d77..0000000 --- a/moderncvthemecasual.sty +++ /dev/null @@ -1,177 +0,0 @@ -%% start of file `moderncvthemecasual.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{moderncvthemecasual}[2011/12/04 v0.14 modern curriculum vitae style: casual] - - -%------------------------------------------------------------------------------- -% 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} -% purple -\newif\if@colorpurple\@colorpurplefalse -\DeclareOption{purple}{\@colorpurpletrue} -% grey -\newif\if@colorgrey\@colorgreyfalse -\DeclareOption{grey}{\@colorgreytrue} -% black -\newif\if@colorblack\@colorblackfalse -\DeclareOption{black}{\@colorblacktrue} - -% roman option -\newif\if@roman\@romanfalse -\DeclareOption{roman}{\@romantrue} - -% unused options -\DeclareOption*{ - \PackageWarning{moderncvthemecasual}{Unknown option '\CurrentOption'}} - -% execute default options -\ExecuteOptions{} - -% process given options -\ProcessOptions\relax - - -%------------------------------------------------------------------------------- -% style definition -%------------------------------------------------------------------------------- -% symbols used - -% colors -\definecolor{firstnamecolor}{rgb}{0.65,0.65,0.65} -\definecolor{familynamecolor}{rgb}{0.45,0.45,0.45} -\definecolor{quotecolor}{rgb}{0.35,0.35,0.35} -\definecolor{addresscolor}{rgb}{0.35,0.35,0.35} -% default blue color - \definecolor{sectionrectanglecolor}{rgb}{0.25,0.50,0.75} - \definecolor{sectiontitlecolor}{rgb}{0.20,0.40,0.65} - \definecolor{subsectioncolor}{rgb}{0.20,0.40,0.65} - \definecolor{footersymbolcolor}{rgb}{0.25,0.50,0.75} -\if@colororange - \definecolor{sectionrectanglecolor}{rgb}{1.00,0.65,0.20} - \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15} - \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15} - \definecolor{footersymbolcolor}{rgb}{0.95,0.55,0.15}\fi -\if@colorgreen - \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} - \definecolor{footersymbolcolor}{rgb}{0.30,0.65,0.15}\fi -\if@colorred - \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} - \definecolor{footersymbolcolor}{rgb}{0.95,0.20,0.20}\fi -\if@colorpurple - \definecolor{sectionrectanglecolor}{rgb}{0.40,0.23,0.80} - \definecolor{sectiontitlecolor}{rgb}{0.50,0.33,0.80} - \definecolor{subsectioncolor}{rgb}{0.50,0.33,0.80} - \definecolor{addresscolor}{rgb}{0.40,0.23,0.70}\fi -\if@colorgrey - \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} - \definecolor{footersymbolcolor}{rgb}{0.35,0.35,0.35}\fi -\if@colorblack - \definecolor{firstnamecolor}{rgb}{0,0,0} - \definecolor{familynamecolor}{rgb}{0,0,0} - \definecolor{quotecolor}{rgb}{0,0,0} - \definecolor{addresscolor}{rgb}{0,0,0} - \definecolor{sectionrectanglecolor}{rgb}{0,0,0} - \definecolor{sectiontitlecolor}{rgb}{0,0,0} - \definecolor{subsectioncolor}{rgb}{0,0,0} - \definecolor{footersymbolcolor}{rgb}{0,0,0}\fi - -% fonts -\if@roman - \AtBeginDocument{\rmfamily} -\else - \AtBeginDocument{\sffamily}\fi -\renewcommand*{\ttdefault}{pcr} -\renewcommand*{\firstnamefont}{\fontsize{38}{40}\mdseries\upshape} -\renewcommand*{\familynamefont}{\firstnamefont} -\renewcommand*{\addressfont}{\normalsize\mdseries\slshape} -\renewcommand*{\quotefont}{\large\slshape} -\renewcommand*{\sectionfont}{\Large\mdseries\upshape} -\renewcommand*{\subsectionfont}{\large\mdseries\upshape} - -% styles - -% cv footer -\newif\if@firstfooterelement\@firstfooterelementtrue -\providecommand*{\footersymbol}{} -\renewcommand*{\footersymbol}{% - \if@firstfooterelement% - \else% - { ~~\color{footersymbolcolor}\textbullet~~~}\fi} -\renewcommand*{\makefooter}{% - \fancypagestyle{plain}{% - \fancyfoot[c]{% - \parbox{0.8\textwidth}{% - \centering% - \addressfont\color{addresscolor}% - \ifthenelse{\isundefined{\@addressstreet}}{}{% - \addresssymbol~\@addressstreet% - \@firstfooterelementfalse% - \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}}}% - }% - \pagestyle{plain}} - -% maketitle -\renewcommand*{\maketitle}{% - \makefooter{}% - {% - \ifthenelse{\isundefined{\@photo}}% - {}% - {% - \setlength\fboxrule{\@photoframewidth}% - \ifdim\@photoframewidth=0pt% - \setlength{\fboxsep}{0pt}\fi% - {\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% - \hfill% -% \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]}}% - \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle - - -\endinput - - -%% end of file `moderncvthemecasual.sty'. diff --git a/moderncvthemeclassic.sty b/moderncvthemeclassic.sty deleted file mode 100644 index 6150c3d..0000000 --- a/moderncvthemeclassic.sty +++ /dev/null @@ -1,199 +0,0 @@ -%% start of file `moderncvthemeclassic.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{moderncvthemeclassic}[2011/12/04 v0.14 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} -% purple -\newif\if@colorpurple\@colorpurplefalse -\DeclareOption{purple}{\@colorpurpletrue} -% grey -\newif\if@colorgrey\@colorgreyfalse -\DeclareOption{grey}{\@colorgreytrue} -% black -\newif\if@colorblack\@colorblackfalse -\DeclareOption{black}{\@colorblacktrue} - -% roman option -\newif\if@roman\@romanfalse -\DeclareOption{roman}{\@romantrue} - -% unused options -\DeclareOption*{ - \PackageWarning{moderncvthemeclassic}{Unknown option '\CurrentOption'}} - -% execute default options -\ExecuteOptions{} - -% 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@colorpurple - \definecolor{sectionrectanglecolor}{rgb}{0.40,0.23,0.80} - \definecolor{sectiontitlecolor}{rgb}{0.50,0.33,0.80} - \definecolor{subsectioncolor}{rgb}{0.50,0.33,0.80} - \definecolor{addresscolor}{rgb}{0.40,0.23,0.70}\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 -\if@colorblack - \definecolor{titlecolor}{rgb}{0,0,0} - \definecolor{quotecolor}{rgb}{0,0,0} - \definecolor{addresscolor}{rgb}{0,0,0} - \definecolor{sectionrectanglecolor}{rgb}{0,0,0} - \definecolor{sectiontitlecolor}{rgb}{0,0,0} - \definecolor{subsectioncolor}{rgb}{0,0,0}\fi - -% fonts -\if@roman - \AtBeginDocument{\rmfamily} -\else - \AtBeginDocument{\sffamily}\fi -\renewcommand*{\ttdefault}{pcr} -\renewcommand*{\firstnamefont}{\fontsize{34}{36}\mdseries\upshape} -\renewcommand*{\titlefont}{\LARGE\mdseries\slshape} -\renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape} -\renewcommand*{\familynamefont}{\firstnamefont} -\renewcommand*{\quotefont}{\large\slshape} -\renewcommand*{\sectionfont}{\Large\mdseries\upshape} -\renewcommand*{\subsectionfont}{\large\mdseries\upshape} - -% styles - -% maketitle -% set \maketitlenamewidth to the desired length, or leave it up to moderncv to try to optimize it -\newlength{\maketitlenamemaxwidth} -\setlength{\maketitlenamemaxwidth}{.525\textwidth} -\newlength{\maketitlenamewidth} -\setlength{\maketitlenamewidth}{0pt} -\newlength{\maketitlepicturewidth} -\newlength{\maketitledetailswidth} -% recompute theme-specific lengths, called by class to recompute all lengths -\renewcommand*{\recomputethemelengths}{% - \setlength{\maketitledetailswidth}{\textwidth}% - \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}% - \ifthenelse{\isundefined{\@photo}}% - {}% - {\setlength{\maketitlepicturewidth}{\@photowidth} - \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}% - \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}} -\newif\if@firstdetailselement\@firstdetailselementtrue -\newcommand*{\maketitledetailsnewline}{ - \if@firstdetailselement% - \@firstdetailselementfalse% - \else% - \\[.2em]\fi} -\renewcommand*{\maketitle}{% - % recompute lengths (necessary to delay the computation of \maketitlenamefullwidth until \maketitle because of potential CJK requirement in \@firstname and \@familyname) - \ifdim\maketitlenamewidth=0pt% - \newlength{\maketitlenamefullwidth}% - \settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}% - \ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth% - \setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}% - \else% - \setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi\fi - \recomputethemelengths{}% - % 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 - \setlength\fboxrule{\@photoframewidth}% - \ifdim\@photoframewidth=0pt% - \setlength{\fboxsep}{0pt}\fi% - \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'.