Merge pull request 'feature/round-profile-picture' (#2) from feature/round-profile-picture into feature/update-cv
Reviewed-on: #2
This commit is contained in:
1
moderncv/.gitignore
vendored
1
moderncv/.gitignore
vendored
@@ -4,3 +4,4 @@
|
|||||||
!.gitignore
|
!.gitignore
|
||||||
!*.tex
|
!*.tex
|
||||||
!*.pdf
|
!*.pdf
|
||||||
|
!*.cls
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
\documentclass[11pt,a4paper,sans]{moderncv}
|
\documentclass[11pt,a4paper,sans]{pedro-moderncv}
|
||||||
\moderncvstyle{classic} % Style options: 'casual', 'classic', 'oldstyle', 'banking'
|
\moderncvstyle{classic} % Style options: 'casual', 'classic', 'oldstyle', 'banking'
|
||||||
\moderncvcolor{blue} % Color options: 'blue', 'orange', 'green', 'red', 'purple', 'grey', 'black'
|
\moderncvcolor{blue} % Color options: 'blue', 'orange', 'green', 'red', 'purple', 'grey', 'black'
|
||||||
|
|
||||||
|
|||||||
32
moderncv/pedro-moderncv.cls
Normal file
32
moderncv/pedro-moderncv.cls
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesClass{pedro-moderncv}[2026/02/24 Custom moderncv wrapper]
|
||||||
|
|
||||||
|
\LoadClassWithOptions{moderncv}
|
||||||
|
|
||||||
|
\RequirePackage{tikz}
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
|
||||||
|
\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.2cm, -0.3cm) {
|
||||||
|
\includegraphics[width=\@photowidthscaled]{\@photo}
|
||||||
|
};
|
||||||
|
\end{tikzpicture}
|
||||||
|
}
|
||||||
|
{}{}
|
||||||
|
\makeatother
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user