I'm trying to create an additional color for moderncv
, but am seeing unexpected behaviour.
I've created a file called moderncvcolorburgundy.sty
, by copying the file for the purple
color. I've changed all references to the word purple and changed the color definitions.
The file contains the following code:
%% start of file `moderncvcolorburgundy.sty'.
%% Copyright 2006-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.
%-------------------------------------------------------------------------------
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvcolorburgundy}[2013/02/09 v1.3.0 modern curriculum vitae and letter color scheme: burgundy]
%-------------------------------------------------------------------------------
% color scheme definition
%-------------------------------------------------------------------------------
\definecolor{color0}{rgb}{0,0,0}% black
\definecolor{color1}{rgb}{0.545098,0,0}% burgundy
\definecolor{color2}{rgb}{0.45,0.45,0.45}% dark grey
\endinput
%% end of file `moderncvcolorburgundy.sty'.
However, when I choose burgundy
as a color, the end result is purple
!
Even though the correct file is loaded (i don't get an error, which i do get if i remove the burgundy file) and I've updated the file name database and file formats.
I have no idea why the color is wrong. In fact, I don't even understand where the purple color is coming from...even if I remove the purple color style to a thumb drive it still turns up purple, even though the color definition for purple is not defined anywhere anymore...
How can I create an additional color and why is this not working?
An example document can be generated with the code below. Note that the moderncvcolorburgundy.sty
file must exist in the same folder as the other style files.
\documentclass[11pt,a4paper,sans]{moderncv}
% moderncv themes
\moderncvstyle{classic} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{burgundy} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage[scale=0.75]{geometry}
\name{John}{Doe}
\title{title} % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and and "country" arguments can be omitted or provided empty
\phone[mobile]{+1~(234)~567~890} % optional, remove / comment the line if not wanted
\begin{document}
\makecvtitle
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
\end{document}
Note that education
and the box around it are purple and not burgundy/darkred.
The error in the log file:
("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\moderncv\moderncvcolorburgundy.st
y"
LaTeX Warning: You have requested package `moderncvcolorburgundy',
but the package provides `moderncvcolorpurple'.
\ProvidesPackage{moderncvcolorpurple}
but the one you posted does not you should check your files perhaos you hav emultiple copies. You should not really put locally modified files in the standard miktex moderncv tree it will get lost or mess up on update, just leave it in the same folder as your document.