aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2024-12-05 14:28:59 +0800
committerAaron LI <aly@aaronly.me>2024-12-05 14:28:59 +0800
commit938bd91e0b085ed3ecd3c27b957f59f035ffd826 (patch)
treece99d1c59fc439bd53776f64d1ee2f171541b2f1
parent8a630d73034942c99ee057efb474baadcc7d6af1 (diff)
downloadresume-938bd91e0b085ed3ecd3c27b957f59f035ffd826.tar.bz2
class: Replace \profilewidth with \@photo@width for clarity
-rw-r--r--resume.cls13
1 files changed, 3 insertions, 10 deletions
diff --git a/resume.cls b/resume.cls
index 6151cdb..5970fc2 100644
--- a/resume.cls
+++ b/resume.cls
@@ -259,19 +259,12 @@
% File information
\newcommand*{\fileinfo}[1]{\def\@fileinfo{#1}}
-% Width of the profile
-\newlength{\profilewidth}
-% Delay the \setlength so the \linewidth becomes available.
-\AtBeginDocument{%
- \setlength{\profilewidth}{\linewidth}
-}
-
% Photo: \photo[<shape>]{<width>}{<filename>}
% Two shapes are supported: circular (default), square
\NewDocumentCommand{\photo}{O{circular}mm}{
- \setlength{\profilewidth}{\dimexpr \linewidth - #2 - 2em}
+ \def\@photo@width{#2}
\def\@photo{%
- \begin{minipage}{#2}
+ \begin{minipage}{\@photo@width}
\ifthenelse{\equal{#1}{square}}{%
\tikz\path[fill overzoom image={#3}]
rectangle (\linewidth, \linewidth);%
@@ -323,7 +316,7 @@
% Render resume header
\newcommand*{\makeheader}{
\ifdef{\@photo}{\@photo\hspace{1em}}{}%
- \begin{minipage}{\profilewidth}
+ \begin{minipage}{\dimexpr \linewidth - \@photo@width - 1em}
{\LARGE\bfseries\color{accentcolor} \@name}
\ifdef{\@tagline}{%
\medskip \\