circular profile picture

This commit is contained in:
Pedro Cabral
2026-02-24 09:29:59 +01:00
parent 84cb871785
commit 4e97205c67
3 changed files with 25 additions and 2 deletions

1
moderncv/.gitignore vendored
View File

@@ -4,3 +4,4 @@
!.gitignore
!*.tex
!*.pdf
!*.cls

View File

@@ -1,5 +1,5 @@
\documentclass[11pt,a4paper,sans]{moderncv}
\documentclass[11pt,a4paper,sans]{pedro-moderncv}
\moderncvstyle{classic} % Style options: 'casual', 'classic', 'oldstyle', 'banking'
\moderncvcolor{blue} % Color options: 'blue', 'orange', 'green', 'red', 'purple', 'grey', 'black'

View File

@@ -0,0 +1,22 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{pedro-moderncv}[2026/02/23 Custom moderncv wrapper]
\LoadClassWithOptions{moderncv}
\RequirePackage{tikz}
\RequirePackage{etoolbox}
\AtBeginDocument{%
\makeatletter
\patchcmd{\makecvhead}
{\includegraphics[width=\@photowidth]{\@photo}}
{%
\begin{tikzpicture}
\clip (0,0) circle (\@photowidth/2);
\node at (0,0)
{\includegraphics[width=\@photowidth]{\@photo}};
\end{tikzpicture}
}
{}{}
\makeatother
}