diff --git a/CHANGELOG b/CHANGELOG index 7562bda..9b3228c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,9 @@ version 0.13 (xx August 2010) (e.g., dvips, xetex), leftover from the v 0.11 cleanup, as reported by K. Amaterasu and P. Mavrogiorgos. - added a "purple" color option, as proposed by B. Ravel. + - added a 3rd optional argument to the \photo command to control the thickness of + the framebox. Setting it to 0pt will disable the frame around the photo, as + requested by T. Krennwallner. version 0.12 (03 August 2010) - prevents pagebreaks after sections and subsections (launchpad bug #409902), diff --git a/examples/template.tex b/examples/template.tex index d426fe1..ce27f90 100644 --- a/examples/template.tex +++ b/examples/template.tex @@ -9,7 +9,7 @@ \documentclass[11pt,a4paper]{moderncv} % moderncv themes -\moderncvtheme[blue]{casual} % optional argument are 'blue' (default), 'orange', 'red', 'green', 'grey' and 'roman' (for roman fonts, instead of sans serif fonts) +\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 % character encoding @@ -32,7 +32,7 @@ \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 -\photo[64pt]{picture} % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; 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 % to show numerical labels in the bibliography; only useful if you make citations in your resume diff --git a/moderncv.cls b/moderncv.cls index 716361c..3ab9d7f 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -156,6 +156,9 @@ \fancyhf{}} \pagestyle{plain} +% advanced command arguments +\RequirePackage{xargs} + % compatibility package with older versions of moderncv \RequirePackageWithOptions{moderncvcompatibility} @@ -171,6 +174,8 @@ \setlength{\parskip}{0pt} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} +\setlength\fboxsep{3\p@} +\setlength\fboxrule{.4\p@} % TO BE TESTED %\setlength\arraycolsep{5\p@} @@ -178,8 +183,6 @@ %\setlength\arrayrulewidth{.4\p@} %\setlength\doublerulesep{2\p@} %\setlength\tabbingsep{\labelsep} -%\setlength\fboxsep{3\p@} -%\setlength\fboxrule{.4\p@} \pagestyle{empty} \raggedbottom @@ -250,8 +253,7 @@ \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}} +\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 diff --git a/moderncvthemecasual.sty b/moderncvthemecasual.sty index e65d86c..a3c1144 100644 --- a/moderncvthemecasual.sty +++ b/moderncvthemecasual.sty @@ -128,7 +128,11 @@ {% \ifthenelse{\isundefined{\@photo}}% {}% - {{\color{firstnamecolor}\framebox{\includegraphics[width=\@photowidth]{\@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]}% diff --git a/moderncvthemeclassic.sty b/moderncvthemeclassic.sty index 577d325..3e47a01 100644 --- a/moderncvthemeclassic.sty +++ b/moderncvthemeclassic.sty @@ -175,7 +175,10 @@ {% \hspace*{\separatorcolumnwidth}% \begin{minipage}[b]{\maketitlepicturewidth}% - \raggedleft{}\addressfont\color{addresscolor}% required to correctly align content + \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