TransWikia.com

Size/boldness difference between name and resume title in moderncv

TeX - LaTeX Asked on October 5, 2021

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}mdseriesupshape}
renewcommand*{titlefont}{fontsize{22}{1}mdseriesupshape}
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}mdseriesupshape} and renewcommand*{titlefont}{fontsize{22}{1}mdseriesupshape} 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

One Answer

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]{{namefonttextcolor{color1}{#1}}}
renewcommand*{titlestyle}[1]{{titlefonttextcolor{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

Correct answer by leandriis on October 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP