diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-04-11T21·53-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2021-04-12T14·45+0000 |
commit | 6266c5d32f9ff651fcfc3a4cc0c68e89da56ca65 (patch) | |
tree | 5be3967585787c4456e17cb29423770217fdcede /users/grfn/resume/moderncvstylecasual.sty | |
parent | 968effb5dc1a4617a0dceaffc70e986abe300c6e (diff) |
refactor(users/glittershark): Rename to grfn r/2485
Rename my //users directory and all places that refer to glittershark to grfn, including nix references and documentation. This may require some extra attention inside of gerrit's database after it lands to allow me to actually push things. Change-Id: I4728b7ec2c60024392c1c1fa6e0d4a59b3e266fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/2933 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/grfn/resume/moderncvstylecasual.sty')
-rw-r--r-- | users/grfn/resume/moderncvstylecasual.sty | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/users/grfn/resume/moderncvstylecasual.sty b/users/grfn/resume/moderncvstylecasual.sty new file mode 100644 index 000000000000..e375e7612a5a --- /dev/null +++ b/users/grfn/resume/moderncvstylecasual.sty @@ -0,0 +1,182 @@ +%% start of file `moderncvstylecasual.sty'. +%% Copyright 2006-2013 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}[2013/02/09 v1.3.0 modern curriculum vitae and letter style scheme: casual] + + +%------------------------------------------------------------------------------- +% required packages +%------------------------------------------------------------------------------- +\RequirePackage{moderncvstyleclassic} + + +%------------------------------------------------------------------------------- +% overall style definition +%------------------------------------------------------------------------------- +% commands +% footer symbol used to separate footer elements +\newcommand*{\footersymbol}{% + {~~~{\rmfamily\textbullet}~~~}}% the \rmfamily is required to force Latin Modern fonts when using sans serif, as OMS/lmss/m/n is not defined and gets substituted by OMS/cmsy/m/n +% internal command to add an element to the footer +% it collects the elements in a temporary box, and checks when to flush the box +\newsavebox{\footerbox}% +\newsavebox{\footertempbox}% +\newlength{\footerwidth}% +\newlength{\footerboxwidth}% +\newif\if@firstfooterelement\@firstfooterelementtrue% +% adds an element to the footer, separated by footersymbol +% usage: \addtofooter[footersymbol]{element} +\newcommand*{\addtofooter}[2][\footersymbol]{% + \if@firstfooterelement% + \savebox{\footertempbox}{\usebox{\footerbox}#2}% + \else% + \savebox{\footertempbox}{\usebox{\footerbox}#1#2}\fi% + \settowidth{\footerboxwidth}{\usebox{\footertempbox}}% + \ifnum\footerboxwidth<\footerwidth% + \savebox{\footerbox}{\usebox{\footertempbox}}% + \@firstfooterelementfalse% + \else% + \flushfooter\\% + \savebox{\footerbox}{#2}% + \savebox{\footertempbox}{#2}% + \settowidth{\footerboxwidth}{\usebox{\footerbox}}% + \@firstfooterelementfalse\fi} +% internal command to flush the footer +\newcommand*{\flushfooter}{% + \strut\usebox{\footerbox}% + \savebox{\footerbox}{}% + \savebox{\footertempbox}{}% + \setlength{\footerboxwidth}{0pt}} + + +%------------------------------------------------------------------------------- +% resume style definition +%------------------------------------------------------------------------------- +% fonts +\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape} +\renewcommand*{\addressfont}{\normalsize\mdseries\slshape} + +% commands +\renewcommand*{\makecvtitle}{% + % recompute lengths (in case we are switching from letter to resume, or vice versa) + \recomputecvlengths% + % ensure footer with personal information + \makecvfooter% + % optional picture + \newbox{\makecvtitlepicturebox}% + \savebox{\makecvtitlepicturebox}{% + \ifthenelse{\isundefined{\@photo}}% + {}% + {% + \setlength\fboxrule{\@photoframewidth}% + \ifdim\@photoframewidth=0pt% + \setlength{\fboxsep}{0pt}\fi% + {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}% + \usebox{\makecvtitlepicturebox}% + % name + \@initializelength{\makecvtitlepicturewidth}% + \settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}% + \parbox[b]{\textwidth-\makecvtitlepicturewidth}{% + \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@lastname}}\\[-.35em]% alternate design: \MakeLowercase and no space + {\color{color2!50}\rule{\textwidth}{.25ex}}% + % 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). + % optional quote + \ifthenelse{\isundefined{\@quote}}% + {}% + {{\null\hfill\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\hfill\null\\[2.5em]}}% + \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle + +\renewcommand*{\makecvfooter}{% + \setlength{\footerwidth}{0.8\textwidth}% + \fancypagestyle{plain}{% + \fancyfoot[c]{% + \parbox[b]{\footerwidth}{% + \centering% + \color{color2}\addressfont% + \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{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}% + \flushfooter\@firstfooterelementtrue\\}% + \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number + \addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% + \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@github}}{}{\addtofooter{\httplink{http://github.com/\@github}}}% + \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}% + \ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used + }}}% + \pagestyle{plain}} + + +%------------------------------------------------------------------------------- +% letter style definition +%------------------------------------------------------------------------------- +\renewcommand*{\makelettertitle}{% + % recompute lengths (in case we are switching from letter to resume, or vice versa) + \recomputeletterlengths% + % ensure footer with personal information + \makeletterfooter% + % recipient block + \begin{minipage}[t]{.5\textwidth} + \raggedright% + \addressfont% + {\bfseries\upshape\@recipientname}\\% + \@recipientaddress% + \end{minipage} + % date + \hfill% US style +% \\[1em]% UK style + \@date\\[2em]% US informal style: "April 6, 2006"; UK formal style: "05/04/2006" + % opening + \raggedright% + \@opening\\[1.5em]% + % ensure no extra spacing after \makelettertitle due to a possible blank line +% \ignorespacesafterend% not working + \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}} + +\renewcommand*{\makeletterfooter}{% + \setlength{\footerwidth}{0.8\textwidth}% + \fancypagestyle{plain}{% + \fancyfoot[c]{% + \parbox[b]{\footerwidth}{% + \centering% + \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 + \strut{\bfseries\upshape\@firstname~\@lastname}\\% the \strut is required to ensure the line is exactly \baselineskip tall + \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{\@addresscountry}{}}{}{\addtofooter[~--~]{\@addresscountry}}% + \flushfooter\@firstfooterelementtrue\\}% + \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number + \addtofooter{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}% + \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}% + \ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}% + \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}% + \ifthenelse{\lengthtest{\footerboxwidth=0pt}}{}{\flushfooter}% the lengthtest is required to avoid flushing an empty footer, which could cause a blank line due to the \\ after the address, if no other personal info is used + }}}% + \pagestyle{plain}} + +\renewcommand*{\makeletterclosing}{ + \@closing\\[3em]% + {\bfseries\@firstname~\@lastname}% + \ifthenelse{\isundefined{\@enclosure}}{}{% + \\% + \vfil% + {\color{color2}\itshape\enclname: \@enclosure}}% + \vfil} + + +\endinput + + +%% end of file `moderncvstylecasual.sty'. |