~xdanaux/moderncv/trunk

38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
1
%% start of file `moderncvstyleclassic.sty'.
112 by Xavier Danaux
Release 1.3.0
2
%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
3
%
4
% This work may be distributed and/or modified under the
5
% conditions of the LaTeX Project Public License version 1.3c,
6
% available at http://www.latex-project.org/lppl/.
7
8
9
%-------------------------------------------------------------------------------
10
%                identification
11
%-------------------------------------------------------------------------------
12
\NeedsTeXFormat{LaTeX2e}
133 by Xavier Danaux
Release 1.5.1
13
\ProvidesPackage{moderncvstyleclassic}[2013/04/29 v1.5.1 modern curriculum vitae and letter style scheme: classic]
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
14
15
16
%-------------------------------------------------------------------------------
17
%                required packages
18
%-------------------------------------------------------------------------------
121 by Xavier Danaux
Implemented the icon set selection mechanism
19
% Latin Modern fonts
81 by Xavier Danaux
Added two options to change the "Enclosure" string used for the letter enclosure
20
%\ifxetexorluatex
21
%  \setmainfont{Latin Modern Roman}
22
%  \setsansfont{Latin Modern Sans}
23
%  \setmathfont{Latin Modern Math}
24
%\else
25
  \IfFileExists{lmodern.sty}%
26
    {\RequirePackage{lmodern}}%
27
    {}
75 by Xavier Danaux
Prepared font handling for fontspec (LuaLaTeX or XeLaTeX)
28
%\fi
81 by Xavier Danaux
Added two options to change the "Enclosure" string used for the letter enclosure
29
121 by Xavier Danaux
Implemented the icon set selection mechanism
30
31
%-------------------------------------------------------------------------------
32
%                overall style definition
33
%-------------------------------------------------------------------------------
81 by Xavier Danaux
Added two options to change the "Enclosure" string used for the letter enclosure
34
% symbols
121 by Xavier Danaux
Implemented the icon set selection mechanism
35
\moderncvicons{marvosym}
81 by Xavier Danaux
Added two options to change the "Enclosure" string used for the letter enclosure
36
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
37
38
%-------------------------------------------------------------------------------
39
%                resume style definition
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
40
%-------------------------------------------------------------------------------
41
% fonts
42
\renewcommand*{\namefont}{\fontsize{34}{36}\mdseries\upshape}
43
\renewcommand*{\titlefont}{\LARGE\mdseries\slshape}
72 by Xavier Danaux
Release 1.0
44
\renewcommand*{\addressfont}{\small\mdseries\slshape}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
45
\renewcommand*{\quotefont}{\large\slshape}
46
\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
47
\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
41 by Xavier Danaux
Style update regarding the use of colors (e.g., personal data is of secondary importance and should therefore not be highlighted by the primary color)
48
\renewcommand*{\hintfont}{}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
49
50
% styles
92 by Xavier Danaux
Moved the font style definitions to moderncv.cls
51
\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color0}{#1}}}
52
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}}
135 by Xavier Danaux
Corrected the color of \addressstyle to match the one effectively used
53
\renewcommand*{\addressstyle}[1]{{\addressfont\textcolor{color2}{#1}}}
92 by Xavier Danaux
Moved the font style definitions to moderncv.cls
54
\renewcommand*{\quotestyle}[1]{{\quotefont\textcolor{color1}{#1}}}
55
\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{#1}}}
56
\renewcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
57
\renewcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
58
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
59
% lengths
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
60
\newlength{\quotewidth}
61
\newlength{\hintscolumnwidth}
49 by Xavier Danaux
Release 0.16
62
\setlength{\hintscolumnwidth}{0.175\textwidth}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
63
\newlength{\separatorcolumnwidth}
64
\setlength{\separatorcolumnwidth}{0.025\textwidth}
65
\newlength{\maincolumnwidth}
66
\newlength{\doubleitemmaincolumnwidth}
67
\newlength{\listitemsymbolwidth}
42 by Xavier Danaux
New style: oldstyle
68
\settowidth{\listitemsymbolwidth}{\listitemsymbol}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
69
\newlength{\listitemmaincolumnwidth}
70
\newlength{\listdoubleitemmaincolumnwidth}
71
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
72
% commands
73
\renewcommand*{\recomputecvlengths}{%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
74
  \setlength{\quotewidth}{0.65\textwidth}%
75
  % main lenghts
40 by Xavier Danaux
Clean-up of length calculations thanks to xcalc
76
  \setlength{\maincolumnwidth}{\textwidth-\separatorcolumnwidth-\hintscolumnwidth}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
77
  % listitem lengths
40 by Xavier Danaux
Clean-up of length calculations thanks to xcalc
78
  \setlength{\listitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
79
  % doubleitem lengths
42 by Xavier Danaux
New style: oldstyle
80
  \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth-\separatorcolumnwidth}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
81
  \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
82
  % listdoubleitem lengths
42 by Xavier Danaux
New style: oldstyle
83
  \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
84
  \setlength{\listdoubleitemmaincolumnwidth}{0.5\listdoubleitemmaincolumnwidth}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
85
  % fancyhdr lengths
82 by Xavier Danaux
Fixed the switching from letter to resume, correcting spacing errors
86
  \renewcommand{\headwidth}{\textwidth}%
87
  % regular lengths
88
  \setlength{\parskip}{0\p@}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
89
65 by Xavier Danaux
Reintroduced the ability to force the width reserved to display the name in the resume header for the classic style (\maketitlenamewidth)
90
% optional maketitle width to force a certain width (if set to 0pt, the width is calculated automatically)
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
91
\newlength{\makecvtitlenamewidth}
92
\setlength{\makecvtitlenamewidth}{0pt}% dummy value
93
\renewcommand*{\makecvtitle}{%
72 by Xavier Danaux
Release 1.0
94
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
95
  \recomputecvlengths%
117 by Xavier Danaux
Enabled multiple phone numbers per type through the use of collections
96
  % optional detailed information (pre-rendering)
97
  \def\phonesdetails{}%
98
  \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
99
    \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
128 by Xavier Danaux
Added a command to showcase social accounts
100
  \def\socialsdetails{}%
101
  \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
102
    \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
103
  \newbox{\makecvtitledetailsbox}%
104
  \savebox{\makecvtitledetailsbox}{%
44 by Xavier Danaux
Bug correction in classic address font and color handling
105
    \addressfont\color{color2}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
106
    \begin{tabular}[b]{@{}r@{}}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
107
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
107 by Xavier Danaux
Added a 3rd argument to \address to specify a country
108
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
109
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
128 by Xavier Danaux
Added a command to showcase social accounts
110
      \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
111
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
112
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
128 by Xavier Danaux
Added a command to showcase social accounts
113
      \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
114
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
115
    \end{tabular}
116
  }%
87 by Xavier Danaux
Updated a comment
117
  % optional photo (pre-rendering)
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
118
  \newbox{\makecvtitlepicturebox}%
119
  \savebox{\makecvtitlepicturebox}{%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
120
    \ifthenelse{\isundefined{\@photo}}%
121
    {}%
122
    {%
123
      \hspace*{\separatorcolumnwidth}%
124
      \color{color1}%
65 by Xavier Danaux
Reintroduced the ability to force the width reserved to display the name in the resume header for the classic style (\maketitlenamewidth)
125
      \setlength{\fboxrule}{\@photoframewidth}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
126
      \ifdim\@photoframewidth=0pt%
127
        \setlength{\fboxsep}{0pt}\fi%
128
      \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
129
  % name and title
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
130
  \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%
131
  \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%
132
  \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)
133
    {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%
65 by Xavier Danaux
Reintroduced the ability to force the width reserved to display the name in the resume header for the classic style (\maketitlenamewidth)
134
    {}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
135
  \begin{minipage}[b]{\makecvtitlenamewidth}%
113 by Xavier Danaux
Deprecated \firstname and \familyname in favour of \name
136
    \namestyle{\@firstname\ \@lastname}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
137
    \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
138
  \end{minipage}%
65 by Xavier Danaux
Reintroduced the ability to force the width reserved to display the name in the resume header for the classic style (\maketitlenamewidth)
139
  \hfill%
117 by Xavier Danaux
Enabled multiple phone numbers per type through the use of collections
140
  % optional detailed information (rendering)
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
141
  \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced
87 by Xavier Danaux
Updated a comment
142
  % optional photo (rendering)
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
143
  \usebox{\makecvtitlepicturebox}\\[2.5em]%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
144
  % optional quote
145
  \ifthenelse{\isundefined{\@quote}}%
146
    {}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
147
    {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
148
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
149
49 by Xavier Danaux
Release 0.16
150
\newlength{\baseletterheight}
151
\settoheight{\baseletterheight}{\sectionstyle{o}}
152
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
114 by Xavier Danaux
Removed the use of the suffix package
153
\RenewDocumentCommand{\section}{sm}{%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
154
  \par\addvspace{2.5ex}%
59 by Xavier Danaux
Corrects the handling of pdf bookmarks, as suggested on stackexchange by
155
  \phantomsection{}% reset the anchor for hyperrefs
114 by Xavier Danaux
Removed the use of the suffix package
156
  \addcontentsline{toc}{section}{#2}%
49 by Xavier Danaux
Release 0.16
157
  \parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
158
  \hspace{\separatorcolumnwidth}%
114 by Xavier Danaux
Removed the use of the suffix package
159
  \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#2}}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
160
  \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
161
114 by Xavier Danaux
Removed the use of the suffix package
162
\RenewDocumentCommand{\subsection}{sm}{%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
163
  \par\addvspace{1ex}%
59 by Xavier Danaux
Corrects the handling of pdf bookmarks, as suggested on stackexchange by
164
  \phantomsection{}% reset the anchor for hyperrefs
114 by Xavier Danaux
Removed the use of the suffix package
165
  \addcontentsline{toc}{subsection}{#2}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
166
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
114 by Xavier Danaux
Removed the use of the suffix package
167
    \raggedleft\hintstyle{} &{\strut\subsectionstyle{#2}}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
168
  \end{tabular}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
169
  \par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
170
171
\renewcommand*{\cvitem}[3][.25em]{%
172
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
114 by Xavier Danaux
Removed the use of the suffix package
173
    \raggedleft\hintstyle{#2} &{#3}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
174
  \end{tabular}%
175
  \par\addvspace{#1}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
176
177
\renewcommand*{\cvdoubleitem}[5][.25em]{%
178
 \cvitem[#1]{#2}{%
179
   \begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}%
42 by Xavier Danaux
New style: oldstyle
180
   \hfill% fill of \separatorcolumnwidth
61 by Xavier Danaux
Added a check in the oldstyle style for an empty 4th argument in the
181
   \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
182
   \hspace*{\separatorcolumnwidth}%
183
   \begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}}
184
185
\renewcommand*{\cvlistitem}[2][.25em]{%
42 by Xavier Danaux
New style: oldstyle
186
  \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
187
42 by Xavier Danaux
New style: oldstyle
188
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
189
  \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
190
  \hfill% fill of \separatorcolumnwidth
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
191
  \ifthenelse{\equal{#3}{}}%
192
    {}%
42 by Xavier Danaux
New style: oldstyle
193
    {\listitemsymbol\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
194
42 by Xavier Danaux
New style: oldstyle
195
\renewcommand*{\cventry}[7][.25em]{%
196
  \cvitem[#1]{#2}{%
197
    {\bfseries#3}%
198
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
199
    \ifthenelse{\equal{#5}{}}{}{, #5}%
42 by Xavier Danaux
New style: oldstyle
200
    \ifthenelse{\equal{#6}{}}{}{, #6}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
201
    .\strut%
42 by Xavier Danaux
New style: oldstyle
202
    \ifx&#7&%
203
      \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
204
42 by Xavier Danaux
New style: oldstyle
205
\newbox{\cvitemwithcommentmainbox}
206
\newlength{\cvitemwithcommentmainlength}
207
\newlength{\cvitemwithcommentcommentlength}
208
\renewcommand*{\cvitemwithcomment}[4][.25em]{%
209
  \savebox{\cvitemwithcommentmainbox}{{\bfseries#3}}%
210
  \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
211
  \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
212
  \cvitem[#1]{#2}{%
61 by Xavier Danaux
Added a check in the oldstyle style for an empty 4th argument in the
213
    \begin{minipage}[t]{\cvitemwithcommentmainlength}\bfseries#3\end{minipage}%
42 by Xavier Danaux
New style: oldstyle
214
    \hfill% fill of \separatorcolumnwidth
215
    \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}}
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
216
217
\renewenvironment{thebibliography}[1]%
218
  {%
219
    \bibliographyhead{\refname}%
60 by Xavier Danaux
Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
220
%    \small%
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
221
    \begin{list}{\bibliographyitemlabel}%
222
      {%
223
        \setlength{\topsep}{0pt}%
224
        \setlength{\labelwidth}{\hintscolumnwidth}%
225
        \setlength{\labelsep}{\separatorcolumnwidth}%
226
        \leftmargin\labelwidth%
227
        \advance\leftmargin\labelsep%
228
        \@openbib@code%
229
        \usecounter{enumiv}%
230
        \let\p@enumiv\@empty%
231
        \renewcommand\theenumiv{\@arabic\c@enumiv}}%
232
        \sloppy\clubpenalty4000\widowpenalty4000%
233
%        \sfcode`\.\@m%
234
%        \sfcode `\=1000\relax%
235
  }%
236
  {%
237
    \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
238
    \end{list}%
239
  }
240
241
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
242
%-------------------------------------------------------------------------------
243
%                letter style definition
244
%-------------------------------------------------------------------------------
245
% commands
82 by Xavier Danaux
Fixed the switching from letter to resume, correcting spacing errors
246
\renewcommand*{\recomputeletterlengths}{%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
247
  \recomputecvlengths%
248
  \setlength{\parskip}{6\p@}}
249
250
\renewcommand*{\makelettertitle}{%
72 by Xavier Danaux
Release 1.0
251
  % recompute lengths (in case we are switching from letter to resume, or vice versa)
252
  \recomputeletterlengths%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
253
  % sender contact info
254
  \hfill%
255
  \begin{minipage}{.5\textwidth}%
256
    \raggedleft%
257
    \addressfont\textcolor{color2}{%
113 by Xavier Danaux
Deprecated \firstname and \familyname in favour of \name
258
      {\bfseries\upshape\@firstname~\@lastname}\@firstdetailselementfalse%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
259
      \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%
107 by Xavier Danaux
Added a 3rd argument to \address to specify a country
260
        \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty
261
        \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
117 by Xavier Danaux
Enabled multiple phone numbers per type through the use of collections
262
      \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
263
        \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
264
      \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
265
      \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
266
      \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
267
    \end{minipage}\\[1em]
268
  % recipient block
269
  \begin{minipage}[t]{.5\textwidth}
270
    \raggedright%
72 by Xavier Danaux
Release 1.0
271
    \addressfont%
272
    {\bfseries\upshape\@recipientname}\\%
273
    \@recipientaddress%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
274
  \end{minipage}
275
  % date
72 by Xavier Danaux
Release 1.0
276
  \hfill% US style
277
%  \\[1em]% UK style
99 by Xavier Danaux
Corrected a bug in \makelettertitle of most styles that displayed the current date (\today) instead of the date given through the \date command
278
  \@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
279
  % opening
280
  \raggedright%
281
  \@opening\\[1.5em]%
282
  % ensure no extra spacing after \makelettertitle due to a possible blank line
283
%  \ignorespacesafterend% not working
284
  \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}
285
286
\renewcommand*{\makeletterclosing}{
287
  \@closing\\[3em]%
113 by Xavier Danaux
Deprecated \firstname and \familyname in favour of \name
288
  {\bfseries \@firstname~\@lastname}%
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
289
  \ifthenelse{\isundefined{\@enclosure}}{}{%
290
    \\%
291
    \vfill%
81 by Xavier Danaux
Added two options to change the "Enclosure" string used for the letter enclosure
292
    {\color{color2}\itshape\enclname: \@enclosure}}}
71 by Xavier Danaux
Letter style and template for the "classic" and "casual" styles
293
294
38 by Xavier Danaux
Code refactoring separating style schemes from color schemes
295
\endinput
296
297
298
%% end of file `moderncvstyleclassic.sty'.