Deprecated \firstname and \familyname in favour of \name

This commit is contained in:
Xavier Danaux
2013-02-14 02:07:42 -05:00
parent c426e1c0f4
commit 5e01c8cec9
16 changed files with 28 additions and 23 deletions

View File

@ -1,3 +1,6 @@
version 1.4.0 (dd MMM 2013)
- deprecated \firstname and \familyname in favour of \name{<first>}{<last>}.
version 1.3.0 (09 Feb 2013) version 1.3.0 (09 Feb 2013)
- added a new environment to create multiple columns: cvcolumns. Each column - added a new environment to create multiple columns: cvcolumns. Each column
is then created by \cvcolumn[width]{header}{content}, where the optional width is then created by \cvcolumn[width]{header}{content}, where the optional width

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -24,8 +24,7 @@
%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... %\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
% personal data % personal data
\firstname{John} \name{John}{Doe}
\familyname{Doe}
\title{Resumé title} % optional, remove / comment the line if not wanted \title{Resumé title} % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty \address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\mobile{+1~(234)~567~890} % optional, remove / comment the line if not wanted \mobile{+1~(234)~567~890} % optional, remove / comment the line if not wanted

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -136,10 +136,10 @@
% pdfproducer = {\LaTeX{}},% will/should be set automatically to the correct TeX engine used % pdfproducer = {\LaTeX{}},% will/should be set automatically to the correct TeX engine used
bookmarksopen = true, bookmarksopen = true,
bookmarksdepth= 2,% to show sections and subsections bookmarksdepth= 2,% to show sections and subsections
pdfauthor = {\@firstname{}~\@familyname{}}, pdfauthor = {\@firstname{}~\@lastname{}},
pdftitle = {\@firstname{}~\@familyname{} -- \@title{}}, pdftitle = {\@firstname{}~\@lastname{} -- \@title{}},
pdfsubject = {Resum\'{e} of \@firstname{}~\@familyname{}}, pdfsubject = {Resum\'{e} of \@firstname{}~\@lastname{}},
pdfkeywords = {\@firstname{}~\@familyname{}, curriculum vit\ae{}, resum\'{e}}}} pdfkeywords = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, resum\'{e}}}}
% graphics % graphics
\RequirePackage{graphicx} \RequirePackage{graphicx}
@ -225,12 +225,9 @@
% overall design commands definitions % overall design commands definitions
%------------------------------------------------------------------------------- %-------------------------------------------------------------------------------
% elements % elements
% defines one's first name % defines one's name
% usage: \firstname{<firstname>} % usage: \name{<firstname>}{<lastname>}
\newcommand*{\firstname}[1]{\def\@firstname{#1}} \newcommand*{\name}[2]{\def\@firstname{#1}\def\@lastname{#2}}
% defines one's family name
% usage: \familyname{<familyname>}
\newcommand*{\familyname}[1]{\def\@familyname{#1}}
% defines one's title (optional) % defines one's title (optional)
% usage: \title{<title>} % usage: \title{<title>}
\renewcommand*{\title}[1]{\def\@title{#1}} \renewcommand*{\title}[1]{\def\@title{#1}}

View File

@ -79,6 +79,12 @@
\title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title \title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title
\newcommand*{\maketitlenamewidth}{\makecvtitlenamewidth} \newcommand*{\maketitlenamewidth}{\makecvtitlenamewidth}
% compatibility with versions <= 1.3.0
\newcommand*{\firstname}[1]{\def\@firstname{#1}}
\newcommand*{\lastname}[1]{\def\@lastname{#1}}
\newcommand*{\givenname}[1]{\def\@firstname{#1}}
\newcommand*{\familyname}[1]{\def\@lastname{#1}}
\def\@familyname{\@lastname}
\endinput \endinput

View File

@ -88,7 +88,7 @@
\parbox{\maketitlewidth}{% \parbox{\maketitlewidth}{%
\centering% \centering%
% name and title % name and title
\namestyle{\@firstname~\@familyname}% \namestyle{\@firstname~\@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title) \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
% detailed information % detailed information
\addressfont\color{color2}% \addressfont\color{color2}%
@ -284,7 +284,7 @@
\renewcommand*{\makeletterclosing}{ \renewcommand*{\makeletterclosing}{
\@closing\\[3em]% \@closing\\[3em]%
{\bfseries \@firstname~\@familyname}% {\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{% \ifthenelse{\isundefined{\@enclosure}}{}{%
\\% \\%
\vfill% \vfill%

View File

@ -91,7 +91,7 @@
\@initializelength{\makecvtitlepicturewidth}% \@initializelength{\makecvtitlepicturewidth}%
\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}% \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\parbox[b]{\textwidth-\makecvtitlepicturewidth}{% \parbox[b]{\textwidth-\makecvtitlepicturewidth}{%
\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}\\[-.35em]% alternate design: \MakeLowercase and no space
{\color{color2!50}\rule{\textwidth}{.25ex}}% {\color{color2!50}\rule{\textwidth}{.25ex}}%
% optional title % optional title
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\hfill\titlestyle{\@title}}\\[2.5em]% \null is required as there is no box on the line after \\, so glue (and leaders) disappears; this is in contrast to after \par, where the next line starts with an indent box (even after \noindent). \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\null\hfill\titlestyle{\@title}}\\[2.5em]% \null is required as there is no box on the line after \\, so glue (and leaders) disappears; this is in contrast to after \par, where the next line starts with an indent box (even after \noindent).
@ -157,7 +157,7 @@
\centering% \centering%
\addressfont\color{color2}% \addressfont\color{color2}%
\vspace{-\baselineskip}% to cancel out the extra vertical space taken by the name (below) and ensure perfect alignment of letter and cv footers \vspace{-\baselineskip}% to cancel out the extra vertical space taken by the name (below) and ensure perfect alignment of letter and cv footers
\strut{\bfseries\upshape\@firstname~\@familyname}\\% the \strut is required to ensure the line is exactly \baselineskip tall \strut{\bfseries\upshape\@firstname~\@lastname}\\% the \strut is required to ensure the line is exactly \baselineskip tall
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}% \ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty \ifthenelse{\equal{\@addresscity}{}}{}{\addtofooter[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}% \ifthenelse{\equal{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}%
@ -174,7 +174,7 @@
\renewcommand*{\makeletterclosing}{ \renewcommand*{\makeletterclosing}{
\@closing\\[3em]% \@closing\\[3em]%
{\bfseries\@firstname~\@familyname}% {\bfseries\@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{% \ifthenelse{\isundefined{\@enclosure}}{}{%
\\% \\%
\vfil% \vfil%

View File

@ -138,7 +138,7 @@
{\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}% {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
{}% {}%
\begin{minipage}[b]{\makecvtitlenamewidth}% \begin{minipage}[b]{\makecvtitlenamewidth}%
\namestyle{\@firstname\ \@familyname}% \namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}% \end{minipage}%
\hfill% \hfill%
@ -260,7 +260,7 @@
\begin{minipage}{.5\textwidth}% \begin{minipage}{.5\textwidth}%
\raggedleft% \raggedleft%
\addressfont\textcolor{color2}{% \addressfont\textcolor{color2}{%
{\bfseries\upshape\@firstname~\@familyname}\@firstdetailselementfalse% {\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet% \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}% \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
@ -291,7 +291,7 @@
\renewcommand*{\makeletterclosing}{ \renewcommand*{\makeletterclosing}{
\@closing\\[3em]% \@closing\\[3em]%
{\bfseries \@firstname~\@familyname}% {\bfseries \@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{% \ifthenelse{\isundefined{\@enclosure}}{}{%
\\% \\%
\vfill% \vfill%

View File

@ -138,7 +138,7 @@
\newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}% \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
\newlength{\makecvtitlenamewidth}\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth}% \newlength{\makecvtitlenamewidth}\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitlepicturewidth}%
\begin{minipage}[b]{\makecvtitlenamewidth}% \begin{minipage}[b]{\makecvtitlenamewidth}%
\namestyle{\@firstname\ \@familyname}% \namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}% \end{minipage}%
% optional photo % optional photo
@ -290,7 +290,7 @@
\hspace{0pt}% \hspace{0pt}%
\marginpar{% \marginpar{%
\addressfont\textcolor{color2}{% \addressfont\textcolor{color2}{%
{\bfseries\@firstname~\@familyname}\@firstdetailselementfalse% {\bfseries\@firstname~\@lastname}\@firstdetailselementfalse%
\ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet% \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
\ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}% \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
@ -306,7 +306,7 @@
\renewcommand*{\makeletterclosing}{ \renewcommand*{\makeletterclosing}{
\@closing\\[3em]% \@closing\\[3em]%
{\bfseries\@firstname~\@familyname}% {\bfseries\@firstname~\@lastname}%
\ifthenelse{\isundefined{\@enclosure}}{}{% \ifthenelse{\isundefined{\@enclosure}}{}{%
\\% \\%
\vfill% \vfill%