diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-25 00:36:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-25 00:36:57 +0000 |
commit | ca39ed065f3a457ba5383ae7a3910ecca532ca15 (patch) | |
tree | 5f5e2d846753b5cba356fc0cd6b11f2e32d6b6c6 /Master/texmf-dist/tex | |
parent | d5d8be071d52baec91f2c830f11d1efd1f8f3b14 (diff) |
moderncv 0.8 (24may10)
git-svn-id: svn://tug.org/texlive/trunk@18460 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
5 files changed, 110 insertions, 64 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls index ff667f8beeb..f06b0e7d760 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls +++ b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls @@ -1,5 +1,5 @@ %% start of file `moderncv.cls'. -%% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com). +%% 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, @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{moderncv}[2008/06/17 v0.7 modern curriculum vitae document class] +\ProvidesClass{moderncv}[2010/05/24 v0.8 modern curriculum vitae document class] %------------------------------------------------------------------------------- @@ -68,6 +68,10 @@ \newif\if@color\@colortrue \DeclareOption{nocolor}{\@colorfalse} +% CJK option +%\newif\if@CJK\@CJKfalse +%\DeclareOption{CJK}{\@CJKtrue} + % execute default options \ExecuteOptions{a4paper,11pt,color,final} @@ -79,29 +83,36 @@ %------------------------------------------------------------------------------- % required packages %------------------------------------------------------------------------------- -% ifthen package +% \AtEndPreamble hook (could load package etoolbox instead of defining it) +%\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 +% pdf vs ps compilation \RequirePackage{ifpdf} -% color package +% color \ifpdf \RequirePackage[pdftex]{color} \else \RequirePackage[dvips]{color} \fi -% fontenc package +% font encoding \RequirePackage[T1]{fontenc} % scalable Computer Modern fonts %\usepackage{type1cm} % latin modern fonts -\AtEndOfClass{% +%\AtEndOfClass{% \if@lmodern - \RequirePackage{lmodern}\fi} + \RequirePackage{lmodern}\fi%} % symbols like \Telefon, \Mobilefone, \Letter and \Email \RequirePackage{marvosym} @@ -119,27 +130,33 @@ % hyperrefs \RequirePackage{url} -\ifpdf - \RequirePackage[pdftex,]{hyperref} -\else - \RequirePackage[dvips]{hyperref}\fi -\hypersetup{% - breaklinks, - baseurl = http://,% - pdfborder = 0 0 0,% - pdfpagemode = UseNone,% -% pdfstartview = XYZ,% - pdfstartpage = 1,% - pdfcreator = \LaTeX{} with `moderncv' package,% - pdfproducer = \LaTeX} -\AtEndOfClass{% - \AtBeginDocument{% - \hypersetup{% - pdfauthor = \@firstname~\@familyname,% - pdftitle = \@title,% - pdfsubject = \@firstname~\@familyname,% - pdfkeywords = \@firstname~\@familyname{} curriculum vit\ae{}}}} \urlstyle{tt} +% load hyperred at the end of the preamble to pass options required by loaded packages (like CJK) +\AtEndPreamble{ + \@ifpackageloaded{CJK} + { + \ifpdf\RequirePackage[pdftex,CJKbookmarks]{hyperref} + \else\RequirePackage[dvips,CJKbookmarks]{hyperref}\fi} + { + \ifpdf\RequirePackage[pdftex]{hyperref} + \else\RequirePackage[dvips]{hyperref}\fi} + \AtBeginDocument{ + \hypersetup{ + breaklinks, + baseurl = http://, + pdfborder = 0 0 0, + pdfpagemode = UseNone,% do not show thumbnails or bookmarks on opening +% pdfstartview = FitH, + pdfstartpage = 1, + 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 @@ -149,7 +166,7 @@ % headers and footers \usepackage{fancyhdr} -\fancypagestyle{plain}{% +\fancypagestyle{plain}{ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyhf{}} @@ -170,8 +187,17 @@ \setlength{\parskip}{0pt} \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 @@ -186,6 +212,7 @@ \providecommand*{\phonesymbol}{\Telefon} \providecommand*{\faxsymbol}{\FAX} \providecommand*{\emailsymbol}{\Letter} +\providecommand*{\homepagesymbol}{{\Large\ComputerMouse}} % colors \definecolor{firstnamecolor}{rgb}{0,0,0} @@ -222,8 +249,8 @@ \newcommand*{\moderncvtheme}[2][]{ \def\@moderncvtheme{#2} \def\@moderncvthemeoptions{#1}} -\moderncvtheme{casual} % default theme -\AtBeginDocument{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}} +\moderncvtheme{casual}% default theme +\AtEndPreamble{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}} %------------------------------------------------------------------------------- @@ -237,6 +264,7 @@ \newcommand*{\phone}[1]{\def\@phone{#1}} \renewcommand*{\fax}[1]{\def\@fax{#1}} \newcommand*{\email}[1]{\def\@email{#1}} +\newcommand*{\homepage}[1]{\def\@homepage{#1}} \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}} \def\@photowidth{0pt} \newcommand*{\photo}[2][64pt]{\def\@photowidth{#1}\def\@photo{#2}} @@ -285,8 +313,8 @@ \recomputelengths % makes the cv title +%\newcommand*{\maketitle}{}% \title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title -\renewcommand*{\maketitle}{}% % draws a colored rectangle % usage: \colorrule[optional height]{width} @@ -294,17 +322,21 @@ % usage: \section{<title>} \newcommand*{\section}[1]{% - \vspace*{2.5ex \@plus 1ex \@minus .2ex}% + \vspace*{2.5ex}% + \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}% \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{part}{#1}% - \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}% \hspace{\separatorcolumnwidth}% \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}\\[1ex]} % \cvline[1ex]{\color{sectionrectanglecolor}\rule[0]{\hintscolumnwidth}{1ex}}{\sectionstyle{#1}}}% gives bad alignment of rectangle; too bad m{width} columns seem not to work as a valid column definition for tabular environments % usage: \subsection{title} \newcommand*{\subsection}[1]{% - \cvline[0.45em]{}{\subsectionstyle{#1}}} + \cvline[0.5ex]{}{% + \subsectionstyle{#1}% +% \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]{% @@ -334,12 +366,13 @@ \newcommand*{\cventry}[6]{% \cvline{#1}{% {\bfseries#2}% - \ifx#3\else{, {\slshape#3}}\fi% - \ifx#4\else{, #4}\fi% - \ifx#5\else{, #5}\fi% + \ifthenelse{\equal{#3}{}}{}{, {\slshape#3}}% + \ifthenelse{\equal{#4}{}}{}{, #4}% + \ifthenelse{\equal{#5}{}}{}{, #5}% .% - \ifx#6\else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi - }}% + \ifx&% + \else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi% + }}% % usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment} \newcommand*{\cvlanguage}[3]{% @@ -370,26 +403,30 @@ % 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} + \fancypagestyle{plain}{% + \fancyfoot[r]{\addressfont\color{quotecolor}\footnotesize\thepage/\pageref{lastpage}}}% + \pagestyle{plain}}{}}% + \AtEndDocument{\label{lastpage}}\else\fi}} -% thebibliography environment, for use with BibTeX +% thebibliography environment, for use with BibTeX and possibly multibib \newcommand{\refname}{Publications} \newlength{\bibindent} \setlength{\bibindent}{1.5em} % 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}% -% \vspace*{-0.65em}% + \bibliographyhead{\refname}% \small% \begin{list}{\bibliographyitemlabel}% {% @@ -413,7 +450,7 @@ \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty -% the classical \today definition +% classical \today definition \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvcompatibility.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvcompatibility.sty index 19b62d88345..88adfb79819 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncvcompatibility.sty +++ b/Master/texmf-dist/tex/latex/moderncv/moderncvcompatibility.sty @@ -1,5 +1,5 @@ %% start of file `moderncvcompatibility.sty'. -%% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com). +%% 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, @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvcompatibility}[2008/06/17 v0.7 modern curriculum vitae compatibility patches] +\ProvidesPackage{moderncvcompatibility}[2010/05/24 v0.8 modern curriculum vitae compatibility patches] %------------------------------------------------------------------------------- diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvthemecasual.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvthemecasual.sty index ebb7dd2455c..e5b3ea42b7d 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncvthemecasual.sty +++ b/Master/texmf-dist/tex/latex/moderncv/moderncvthemecasual.sty @@ -1,5 +1,5 @@ %% 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 % conditions of the LaTeX Project Public License version 1.3c, @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemecasual}[2008/06/17 v0.7 modern curriculum vitae style: casual] +\ProvidesPackage{moderncvthemecasual}[2010/05/24 v0.8 modern curriculum vitae style: casual] %------------------------------------------------------------------------------- @@ -117,8 +117,8 @@ % 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 \newif\if@firstfooterelement\@firstfooterelementtrue @@ -142,6 +142,7 @@ \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}} diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty index 872d67d5796..2d2f191a4b1 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty +++ b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty @@ -1,5 +1,5 @@ %% start of file `moderncvthemeclassic.sty'. -%% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com). +%% 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, @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemeclassic}[2008/06/17 v0.7 modern curriculum vitae style: classic] +\ProvidesPackage{moderncvthemeclassic}[2010/05/24 v0.8 modern curriculum vitae style: classic] %------------------------------------------------------------------------------- @@ -121,8 +121,10 @@ \renewcommand*{\recomputethemelengths}{% \setlength{\maketitledetailswidth}{\textwidth}% \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}% - \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}% - \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}} + \ifthenelse{\lengthtest{\maketitlepicturewidth=0pt}}% + {}% + {\addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}% + \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}} \recomputethemelengths \newif\if@firstdetailselement\@firstdetailselementtrue \newcommand*{\maketitledetailsnewline}{ @@ -147,16 +149,22 @@ \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}\color{firstnamecolor}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]% + {% + \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]}% + {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% } diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeempty.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeempty.sty index de6c94a3a54..9c1aeab8c23 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeempty.sty +++ b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeempty.sty @@ -1,5 +1,5 @@ %% start of file `moderncvthemeempty.sty'. -%% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com). +%% 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, @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemeempty}[2008/06/17 v0.7 modern curriculum vitae style: empty] +\ProvidesPackage{moderncvthemeempty}[2010/05/24 v0.8 modern curriculum vitae style: empty] %------------------------------------------------------------------------------- |