From 1b80c575ba0521a83d8af690fc11a84669bd34b4 Mon Sep 17 00:00:00 2001 From: Roberto Metere Date: Wed, 28 Sep 2016 10:33:20 +0100 Subject: [PATCH] Added option for no edge around the photoid (and examples) --- awesome-cv.cls | 51 +++++++---- examples/resume-photoid-circle-noedge.tex | 102 ++++++++++++++++++++++ examples/resume-photoid-rect-noedge.tex | 102 ++++++++++++++++++++++ 3 files changed, 239 insertions(+), 16 deletions(-) create mode 100644 examples/resume-photoid-circle-noedge.tex create mode 100644 examples/resume-photoid-rect-noedge.tex diff --git a/awesome-cv.cls b/awesome-cv.cls index b58cb8b..0f9967f 100644 --- a/awesome-cv.cls +++ b/awesome-cv.cls @@ -79,6 +79,8 @@ \RequirePackage[skins]{tcolorbox} % Needed to deal a paragraphs \RequirePackage{parskip} +% Deal with keyed arguments +\RequirePackage{pgfkeys} % Needed to deal hyperlink \RequirePackage[hidelinks]{hyperref} \hypersetup{% @@ -270,8 +272,20 @@ % Commands for personal information %------------------------------------------------------------------------------- % Define photo ID -% Usage: \photoid[circle|rectangle]{} -\newcommand{\photoid}[2][circle]{\def\@phidedge{#1}\def\@phid{#2}} +% Usage: \photoid[circle|rectangle,edge|noedge]{} +\newcommand{\photoid}[2][circle,edge]{% +\@for\tmp:=#1\do{% + \ifthenelse{ + \equal{\tmp}{circle} + \or \equal{\tmp}{rectangle} + }{\let\@phishape\tmp}{ + \ifthenelse{ + \equal{\tmp}{edge} + \or \equal{\tmp}{noedge} + }{\let\@phiedge\tmp}{} + } +}% +\def\@phid{#2}} % Define writer's name % Usage: \name{}{} @@ -425,7 +439,8 @@ \setlength{\headertextwidth}{0.8\textwidth} \setlength{\headerphotoidwidth}{0.2\textwidth} }% - \ifthenelse{\isundefined{\@phidedge}}{\def\@phidedge{circle}}{} + \ifthenelse{\isundefined{\@phishape}}{\def\@phishape{circle}}{} + \ifthenelse{\isundefined{\@phiedge}}{\def\@phiedge{edge}}{} \begin{minipage}[c]{\headertextwidth} \begin{center} \headerfirstnamestyle{\@firstname}\headerlastnamestyle{{}\acvHeaderNameDelim\@lastname}% @@ -509,20 +524,24 @@ \end{minipage}% \ifthenelse{\isundefined{\@phid}}{}{% \newlength{\phiddim}% - \ifthenelse{\equal{\@phidedge}{circle}}{\setlength{\phiddim}{1cm}}{\setlength{\phiddim}{1.3cm}} + \ifthenelse{\equal{\@phishape}{circle}}{\setlength{\phiddim}{1cm}}{\setlength{\phiddim}{1.3cm}} \begin{minipage}[c]{\headerphotoidwidth}% - \raggedleft\begin{tikzpicture}% - \foreach \r/\colora in {0.2/{black!10},0.08/{black!30}}{ - \ifthenelse{\equal{\@phidedge}{circle}}{% - \pgfmathsetlengthmacro{\x}{(\r)*1cm + 1.4142*\phiddim} - \fill[\colora] (0,0) circle (\x); - }{% - \pgfmathsetlengthmacro{\x}{(\r)*1cm + \phiddim} - \fill[\colora] (-\x,-\x) rectangle (\x,\x); - }% - } - \node[\@phidedge,draw=awesome,line width=0.5mm,inner sep=\phiddim,fill overzoom image=\@phid] () {}; - \end{tikzpicture}% + \raggedleft\begin{tikzpicture}% + \ifthenelse{\equal{\@phiedge}{edge}}{% + \foreach \r/\colora in {0.2/{black!10},0.08/{black!30}}{ + \ifthenelse{\equal{\@phishape}{circle}}{% + \pgfmathsetlengthmacro{\x}{(\r)*1cm + 1.4142*\phiddim} + \fill[\colora] (0,0) circle (\x); + }{% + \pgfmathsetlengthmacro{\x}{(\r)*1cm + \phiddim} + \fill[\colora] (-\x,-\x) rectangle (\x,\x); + }% + }% + \node[\@phishape,draw=awesome,line width=0.5mm,inner sep=\phiddim,fill overzoom image=\@phid] () {}; + }{% No edge + \node[\@phishape,draw=white,line width=0.0mm,inner sep=1.1*\phiddim,fill overzoom image=\@phid] () {}; + } + \end{tikzpicture}% \end{minipage} }% } diff --git a/examples/resume-photoid-circle-noedge.tex b/examples/resume-photoid-circle-noedge.tex new file mode 100644 index 0000000..728afe9 --- /dev/null +++ b/examples/resume-photoid-circle-noedge.tex @@ -0,0 +1,102 @@ +%!TEX TS-program = xelatex +%!TEX encoding = UTF-8 Unicode +% Awesome CV LaTeX Template for CV/Resume +% +% This template has been downloaded from: +% https://github.com/posquit0/Awesome-CV +% +% Author: +% Claud D. Park +% http://www.posquit0.com +% +% Template license: +% CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) +% + + +%------------------------------------------------------------------------------- +% CONFIGURATIONS +%------------------------------------------------------------------------------- +% A4 paper size by default, use 'letterpaper' for US letter +\documentclass[11pt, a4paper]{awesome-cv} + +% Configure page margins with geometry +\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm} + +% Specify the location of the included fonts +\fontdir[fonts/] + +% Color for highlights +% Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange +% awesome-nephritis, awesome-concrete, awesome-darknight +\colorlet{awesome}{awesome-red} +% Uncomment if you would like to specify your own color +% \definecolor{awesome}{HTML}{CA63A8} + +% Colors for text +% Uncomment if you would like to specify your own color +% \definecolor{darktext}{HTML}{414141} +% \definecolor{text}{HTML}{333333} +% \definecolor{graytext}{HTML}{5D5D5D} +% \definecolor{lighttext}{HTML}{999999} + +% Set false if you don't want to highlight section with awesome color +\setbool{acvSectionColorHighlight}{true} + +% If you would like to change the social information separator from a pipe (|) to something else +\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} + + +%------------------------------------------------------------------------------- +% PERSONAL INFORMATION +% Comment any of the lines below if they are not required +%------------------------------------------------------------------------------- +\photoid[noedge]{photoid.pdf} +\name{Claud D.}{Park} +\position{Software Engineer{\enskip\cdotp\enskip}Security Expert} +\address{246-1002, Gwangmyeongmayrouge Apt. 86, Cheongna lime-ro, Seo-gu, Incheon-si, 404-180, Rep. of KOREA} + +\mobile{(+82) 10-9030-1843} +\email{posquit0.bj@gmail.com} +\homepage{www.posquit0.com} +\github{posquit0} +\linkedin{posquit0} +% \stackoverflow{SO-id}{SO-name} +% \twitter{@twit} +% \skype{skype-id} +% \reddit{reddit-id} +% \extrainfo{extra informations} + +\quote{``Must be the change that you want to see in the world."} + + +%------------------------------------------------------------------------------- +\begin{document} + +% Print the header with above personal informations +\makecvheader + +% Print the footer with 3 arguments(,
, ) +% Leave any of these blank if they are not needed +\makecvfooter + {\today} + {Claud D. Park~~~·~~~Résumé} + {\thepage} + + +%------------------------------------------------------------------------------- +% CV/RESUME CONTENT +% Each section is imported separately, open each file in turn to modify content +%------------------------------------------------------------------------------- +% \input{resume/summary.tex} +\input{resume/education.tex} +\input{resume/experience.tex} +\input{resume/extracurricular.tex} +\input{resume/honors.tex} +\input{resume/presentation.tex} +\input{resume/writing.tex} +\input{resume/committees.tex} + + +%------------------------------------------------------------------------------- +\end{document} diff --git a/examples/resume-photoid-rect-noedge.tex b/examples/resume-photoid-rect-noedge.tex new file mode 100644 index 0000000..3d870ef --- /dev/null +++ b/examples/resume-photoid-rect-noedge.tex @@ -0,0 +1,102 @@ +%!TEX TS-program = xelatex +%!TEX encoding = UTF-8 Unicode +% Awesome CV LaTeX Template for CV/Resume +% +% This template has been downloaded from: +% https://github.com/posquit0/Awesome-CV +% +% Author: +% Claud D. Park +% http://www.posquit0.com +% +% Template license: +% CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) +% + + +%------------------------------------------------------------------------------- +% CONFIGURATIONS +%------------------------------------------------------------------------------- +% A4 paper size by default, use 'letterpaper' for US letter +\documentclass[11pt, a4paper]{awesome-cv} + +% Configure page margins with geometry +\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm} + +% Specify the location of the included fonts +\fontdir[fonts/] + +% Color for highlights +% Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange +% awesome-nephritis, awesome-concrete, awesome-darknight +\colorlet{awesome}{awesome-red} +% Uncomment if you would like to specify your own color +% \definecolor{awesome}{HTML}{CA63A8} + +% Colors for text +% Uncomment if you would like to specify your own color +% \definecolor{darktext}{HTML}{414141} +% \definecolor{text}{HTML}{333333} +% \definecolor{graytext}{HTML}{5D5D5D} +% \definecolor{lighttext}{HTML}{999999} + +% Set false if you don't want to highlight section with awesome color +\setbool{acvSectionColorHighlight}{true} + +% If you would like to change the social information separator from a pipe (|) to something else +\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} + + +%------------------------------------------------------------------------------- +% PERSONAL INFORMATION +% Comment any of the lines below if they are not required +%------------------------------------------------------------------------------- +\photoid[rectangle,noedge]{photoid.pdf} +\name{Claud D.}{Park} +\position{Software Engineer{\enskip\cdotp\enskip}Security Expert} +\address{246-1002, Gwangmyeongmayrouge Apt. 86, Cheongna lime-ro, Seo-gu, Incheon-si, 404-180, Rep. of KOREA} + +\mobile{(+82) 10-9030-1843} +\email{posquit0.bj@gmail.com} +\homepage{www.posquit0.com} +\github{posquit0} +\linkedin{posquit0} +% \stackoverflow{SO-id}{SO-name} +% \twitter{@twit} +% \skype{skype-id} +% \reddit{reddit-id} +% \extrainfo{extra informations} + +\quote{``Must be the change that you want to see in the world."} + + +%------------------------------------------------------------------------------- +\begin{document} + +% Print the header with above personal informations +\makecvheader + +% Print the footer with 3 arguments(,
, ) +% Leave any of these blank if they are not needed +\makecvfooter + {\today} + {Claud D. Park~~~·~~~Résumé} + {\thepage} + + +%------------------------------------------------------------------------------- +% CV/RESUME CONTENT +% Each section is imported separately, open each file in turn to modify content +%------------------------------------------------------------------------------- +% \input{resume/summary.tex} +\input{resume/education.tex} +\input{resume/experience.tex} +\input{resume/extracurricular.tex} +\input{resume/honors.tex} +\input{resume/presentation.tex} +\input{resume/writing.tex} +\input{resume/committees.tex} + + +%------------------------------------------------------------------------------- +\end{document}