我有一个关于 的问题moderncv
。我想使用moderncv
样式casual
,并想更改 中规则的颜色,cvtitle
该规则由
{\color{color2!50}\rule{\textwidth}{.25ex}}
我定义了一种颜色,\definecolor{dagr}{rgb}{0.35,0.35,0.35}
并想使用该颜色代替color2!50
。我该怎么做?
答案1
您可以修补\makecvtitle
并更改颜色:
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\usepackage{etoolbox}
\definecolor{dagr}{rgb}{0.35,0.35,0.35}
\patchcmd{\makecvtitle}
{\color{color2!50}\rule{\textwidth}{.25ex}}
{\color{dagr}\rule{\textwidth}{.25ex}}
{}
{}
\name{John}{Doe}
\title{Title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} %
\end{document}