更改moderncv中部分內的fontweight

更改moderncv中部分內的fontweight

我想更改該部分內的字體粗細,但現在我需要添加\textbf{}所有字體。有沒有更簡單的方法來實現整個文件?

\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}

在此輸入影像描述

答案1

一種可能性是將命令添加\textbf到樣式定義中,例如:

\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{\textbf{#1}}}}
%                                                                ^^^^^^^^^^^

以下是完整的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]{{\sectionfont\textcolor{color1}{\textbf{#1}}}}


\begin{document}

\makecvtitle

\section{Education}

\section{Awards}

\end{document}

與期望的結果:

產生的pdf文件

相關內容