TransWikia.com

change fontweight inside of section in moderncv

TeX - LaTeX Asked on February 5, 2021

I’d like to change the font weight inside of the section, but now I need to add textbf{} in all of them. Is there a easier way to achieve this for the whole document?

documentclass[11pt, letterpaper, sans]{moderncv}
moderncvstyle{classic}
moderncvcolor{blue}
usepackage{fontawesome}
usepackage[scale=0.85, top=2cm, bottom=2cm]{geometry}
setlength{hintscolumnwidth}{2.6cm}
usepackage{tikz}
usepackage{mathptmx}
usepackage[11pt]{moresize}

firstname{First}
familyname{Last}
email{[email protected]}

begin{document}

makecvtitle

section{Education}

section{textbf{Awards}}

end{document}

enter image description here

One Answer

One possibility is to add command textbf into the style definition like:

renewcommand*{sectionstyle}[1]{{sectionfonttextcolor{color1}{textbf{#1}}}}
%                                                                ^^^^^^^^^^^

The following complete MWE

documentclass[11pt, letterpaper, sans]{moderncv}
moderncvstyle{classic}
moderncvcolor{blue}
usepackage{fontawesome}
usepackage[scale=0.85, top=2cm, bottom=2cm]{geometry}
setlength{hintscolumnwidth}{2.6cm}
usepackage{tikz}
usepackage{mathptmx}
usepackage[11pt]{moresize}

firstname{First}
familyname{Last}
email{[email protected]}

renewcommand*{sectionstyle}[1]{{sectionfonttextcolor{color1}{textbf{#1}}}}


begin{document}

makecvtitle

section{Education}

section{Awards}

end{document}

with the wished result:

resulting pdf

Answered by Mensch on February 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