Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using classicthesis 3.1 in Lyx 2.0.6. When I include PDFs in the master document, I receive the following error:

! Package xcolor Error: Undefined color `Maroon'.

See the xcolor package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.13 \begingroup \color{Maroon}
                                \spacedallcaps{\myTitle} \endgroup\\
Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

This topic has previously been asked and closed, but provided solutions do not work:

When I include PDFs in the original classicthesis template, I can get the document to compile if I do not remove the original Chapter<1,2,3>.lyx files. Once changed, the original template does not always compile. classicthesis.sty has not been modified as shown below.

% Colors
% ********************************************************************
\PassOptionsToPackage{dvipsnames}{xcolor}
\RequirePackage{xcolor} % [dvipsnames] 
\definecolor{halfgray}{gray}{0.55} % chapter numbers will be semi transparent .5 .55 .6 .0
\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}
%\definecolor{Maroon}{cmyk}{0, 0.87, 0.68, 0.32}
%\definecolor{RoyalBlue}{cmyk}{1, 0.50, 0, 0}
%\definecolor{Black}{cmyk}{0, 0, 0, 0}

Uncommenting \definecolor for Maroon, RoyalBlue and Black does not resolve the issue.

I have modified classicthesis-config.tex to change the text area and added new commands under user ad-hoc commands, but otherwise it is set to default.

Is this a conflict between xcolor and pdfpages? Or a colorspace issue?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

I also encountered this problem and found the following solution.

This problem is caused by the pdfpages package that itself load the xcolor package with no option, while the problematic colors are defined in the dvipsnames option of the xcolor package. This 'bug' is described in 'Pitfalls' section of the pdfpages manual.

The solution to these, explained in the manual, is to load the xcolor package with the dvipsnames option before the pdfpages package. Which is actually done by classicthesis.sty.

The problem is that when you use the Lyx internal PDF include, it load the pdfpages package before any user supplied options. So the only workaround is not to use the Lyx PDF include.

Declare the \usepackage{pdfpages} in preamble and then include the pdf through the \includepdf[<key=val>]{<filename>} in an evil red text in latex.

share|improve this answer
1  
Welcome to TeX.SX! –  Jubobs Aug 17 '13 at 12:51
    
Thank you for resolving this issue, it will save a significant amount of time. The work-around appears to address the problem, and if there's any further difficulties I'll continue to post on this thread. I have now marked this answer as the solution. –  Andre Aug 20 '13 at 5:44
add comment

I also encountered this problem but for me just uncommenting \definecolor for Maroon, RoyalBlue and Black resolves the issue.

I'm using classicthesis from the italian package of Lorenzo Pantieri.

share|improve this answer
    
I encountered the same problem but using the original classicthesis v4.1. I could, however, solve it as @vale did: by uncommenting \definecolor for the three problematic colors in the classicthesis.sty file. –  xmoleslo Nov 23 '13 at 16:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.