mitchelloharawild / vitae

R Markdown Résumés and CVs
https://pkg.mitchelloharawild.com/vitae/
1.23k stars 239 forks source link

Change profilepic size #237

Open agdamsbo opened 1 year ago

agdamsbo commented 1 year ago

Hi! I am using the awesome theme for my cv.

I figured how to change the profilepic fro circle to rectangle. Is there a way to change the height/with of the profilepic?

zeigerpuppy commented 1 year ago

Have a look at your .cls file for you template, you'll find something like what is below for the "twenty seconds" theme

        \ifthenelse{\equal{\profilepic}{}}{\vspace*{0.5cm}}{
            \begin{center}
                \begin{tikzpicture}[x=\imagescale,y=-\imagescale]
                    \clip (600/2, 587/2) circle (587/2);
                    \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,0) {\includegraphics[width=\imagewidth]{\profilepic}};
                \end{tikzpicture}
            \end{center}
        }

A bit of playing with those values should get the desired effect. I don't understand the settings fully, but I think it's essentially creating a bounding box and then anchoring the image within that box. Scaling/shifting should be possible.

To be honest, it would be nice to pull out some of these as clearer variables, for instance to scale the zoom factor of the image more easily.