0

I'm creating a CV with moderncv. I'm using Overleaf, with pdflatex and the 2014 version of TeX Live. Here is my code:

\documentclass[11pt,a4paper,roman]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{black}    
\renewcommand*{\namefont}{\fontsize{22}{1}\mdseries\upshape}
\renewcommand*{\titlefont}{\fontsize{22}{1}\mdseries\upshape}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.76]{geometry}
\firstname{Curriculum}
\familyname{Vitae}
\title{Curriculum Vitae}
\address{street and number}{postcode city}{country}
\begin{document}
\makecvtitle
\end{document}

I'm using the commands \renewcommand*{\namefont}{\fontsize{22}{1}\mdseries\upshape} and \renewcommand*{\titlefont}{\fontsize{22}{1}\mdseries\upshape} to alter the size of the font on the title line. But it seems that it is not being applied consistently to both the name and the "Curriculum Vitae" text. In the output, the name is every so slightly larger than the "Curriculum Vitae" text, and also appears slightly darker when I print it out. Is there an explanation for this? The same thing happens even with the 2019 version of TeX Live in Overleaf, so I'm wondering if the colour may have something to do with it.

enter image description here

  • I can't reproduce the problem (TeX Live 2017). I changed the title to John Fleetwood as well and then in a screenshot I can exactly overlay the two sides, they are on pixel accuracy the same size and thickness. – Marijn Jul 30 at 21:55
  • @Marijn I edited the code slightly to make it easier to see. Using pdflatex and TeX Live 2017, with the new code, the "Curriculum Vitae" on the left is slightly larger/bolder than the one on the right. I've attached a screenshot above, I think its fairly visible. – A.B. Jul 31 at 0:14
2

There is no font size or boldness difference between the name and the title part but a color difference.

The file moderncvcolorblack.sty that is used when adding \moderncvcolor{black} defines three colors: color0, color1, and color2. All of them are black (rgb=0,0,0).

The file moderncvheadiii.sty which is used when using the banking style, contains the following lines:

\renewcommand*{\namestyle}[1]{{\namefont\textcolor{color1}{#1}}}
\renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2!85}{#1}}} 

Resulting in \namestyle using black and \titlestyle using 85% black mixed with white resulting in a very dark almost black looking color. This fits well with the results of using a color packing tool on the name and title the pdf that results from your MWE.

name: RGB = 0,0,0

title: RGB = 38,38,38

Here are both colors side by side:

enter image description here

| improve this answer | |
  • Thanks for your answer. Is there a way then to change both to the same colour? Also, I am using Tex Live 2014, and I believe the corresponding version of moderncv does not include the file moderncvheadiii.sty, which was introduced in version 2.0.0 if I recall correctly. So I'm not sure if that changes your answer slightly. – A.B. Aug 2 at 20:47
  • In order to make both colors black, you could add \renewcommand*{\titlestyle}[1]{{\titlefont\textcolor{color2}{#1}}} to the preamble. This works with the laters version of moderncv. Probably it does work with an older version, too. – leandriis Aug 2 at 20:58
  • That works, thanks so much! – A.B. Aug 2 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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