So I'm writing my CV using the friggery CV template. It looks like this:
and can be found here:
http://www.latextemplates.com/template/friggeri-resume-cv
As you can see the sections all start with the first three letters in a nice color. However, in the .cls
file there are only six defined colors. I would like to have seven sections and I would like the seventh section to also have a color. I've tried adding a darker blue using the following code:
\definecolor{darkblue}{HTML}{0000FF}
in the beginning, and adding darkblue here:
\ifdefined\@cv@print
\colorlet{green}{gray}
\colorlet{orange}{gray}
\colorlet{purple}{gray}
\colorlet{brown}{gray}
\colorlet{red}{gray}
\colorlet{blue}{gray}
\colorlet{darkblue}{gray}
\colorlet{fillheader}{white}
\colorlet{header}{gray}
and also adding darkblue here:
\newcounter{colorCounter}
\def\@sectioncolor#1#2#3{%
{%
\color{%
\ifcase\value{colorCounter}%
darkblue\or%
blue\or%
red\or%
orange\or%
green\or%
purple\or%
brown\else%
headercolor\fi%
} #1#2#3%
}%
\stepcounter{colorCounter}%
}
but when I try to add a section I get an error saying that the color darkblue is not defined. What am I doing wrong? None of the other colors are stated anywhere besides in that fashion.
Best Answer
The list of colors is controlled by
\@sectioncolor
and this just uses an\ifcase
; here's the original definition:You can simply define your colors and add them to the list. In the example below I defined two new colors teal and yellow using
The code:
The output:
If you want to do the modification in the
.cls file
, then make a copy offriggeri-cv.cls
, save it asmyfiggeri-cv.cls
, and in this new file change the linesto
next change
to
and finally, change
to
save the changes and place
myfriggeri-cv.cls
somewhere TeX can find it (the easiest is the current working directory); in your.tex
document now you say