TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When \photo is used in moderncv, it includes a ~3px padding between the image and the border. How does one remove this? I have found the part of the moderncvstyleclassic.sty that deals with the photo (line 160), but don't know how to change it. I'd also like to know how to change the colour of the border, or even remove it entirely.

share|improve this question
Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Marco Daniel May 10 '13 at 9:09
It's also very important to add you version of moderncv. In the last weeks there are many updates. – Marco Daniel May 10 '13 at 9:10
The current macro \photo has two options, one for the photo size, one for the thickness of the border. To remove the border use 0pt. – Kurt May 10 '13 at 10:44
Guess I'm using an old version of moderncv then T_T – user973066 May 10 '13 at 11:51

To remove the border for the border just use a current version of moderncv and try the following MWE (just to show you how a MWE could be for your case). In line 21 you have the border activated, in the commented line 22 the border is deactivated. Just move the comment sign %.

The macro \photo[width photo][border thickness]{name of photo} does for you what you want.

Please note that I used a picture from package MWE, that should be installed on your computer but must not be loaded to use the included pictures.


%\setlength{\hintscolumnwidth}{3cm}  % change the width of the column with the dates
\setlength{\footskip}{37pt} % defines space for footer

% personal data
\title{Resumé title}         % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, ...
\mobile{+1~(234)~567~890}                          % optional, ...
\phone{+2~(345)~678~901}                           % optional, ...
\fax{+3~(456)~789~012}                             % optional, ...
\email{john@doe.org}                               % optional, ...
\homepage{www.johndoe.com}                         % optional, ...
\extrainfo{additional information}                 % optional, ...
 \photo[64pt][0.4pt]{example-image-a}              % Photo with border with 0.4pt thickness
%\photo[64pt][0pt]{example-image-a}                % Photo without border 
\quote{Some quote}                                 % optional, ...


% your datas ...

\end{document} %===== File mwe-mcv.tex =====
share|improve this answer

The previous answer covered how to remove the border altogether around the photo in moderncv, using the syntax provided by this package. Here I'm going to show you how to remove the padding, which was initially asked and is a little bit less immediate (using moderncv 1.5.1).

moderncv uses a \framebox{} to get a border around your photo. As shown in here, the only way to modify the padding is through the \fboxsep variable. Knowing that you can use the command \setlength{\fboxsep}{0pt} somewhere before the \photo command in order to remove the padding (be it preambule or near the photo declaration, or even in the package itself, depending on how it makes most sense to you)


\documentclass[10pt, a4paper]{moderncv}

%% ModernCV themes

%% Character encoding

%% Personal data
\address{Don Knuth Street, 42}{Tex City}



share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.