diff --git a/moderncv/pedro-moderncv.cls b/moderncv/pedro-moderncv.cls index 205211e..d4fae48 100644 --- a/moderncv/pedro-moderncv.cls +++ b/moderncv/pedro-moderncv.cls @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{pedro-moderncv}[2026/02/23 Custom moderncv wrapper] +\ProvidesClass{pedro-moderncv}[2026/02/24 Custom moderncv wrapper] \LoadClassWithOptions{moderncv} @@ -8,13 +8,23 @@ \AtBeginDocument{% \makeatletter + + % Safe scaled length + \newlength{\@photowidthscaled} + \patchcmd{\makecvhead} {\includegraphics[width=\@photowidth]{\@photo}} {% + % Copy original width + \setlength{\@photowidthscaled}{\@photowidth} + % Scale safely (no calc/dimexpr/TikZ parser issues) + \setlength{\@photowidthscaled}{1.2\@photowidthscaled} + \begin{tikzpicture} - \clip (0,0) circle (\@photowidth/2); - \node at (0,0) - {\includegraphics[width=\@photowidth]{\@photo}}; + \clip (0, 0) circle (\@photowidth/2); + \node at (-0.2cm, -0.3cm) { + \includegraphics[width=\@photowidthscaled]{\@photo} + }; \end{tikzpicture} } {}{}