I think this is a bug I've stumbled upon and it's driving me up the wall. Referring to this question, I've got the same setup:

Package xcolor Error: Undefined colors “Maroon”/“Royal Blue” when master has PDF included classicthesis 3.1

I thought my prayers had been answered. However, my problem arises because I accidentally included a PDF into the master document. Was a slip of the finger, I was trying to copy and paste into a completely different document but evidently had the wrong window active. I didn't think anything of it and I simply pressed delete and went on my merry way.

Ever since, whenever I try to compile, I get the dreaded xcolor error message of Undefined color "Maroon". Even though the PDF isn't even in my document anymore and there is no (visible) PDF environment in the master document. I've tried everything suggested from other answers but to no avail. It seems that as soon as the PDF was pasted into the master document, some sort of persistent change has happened in LyX which is now causing the trouble. Question is, how the heck do I fix this? I've closed the program, reconfigured, shut down, deleted temporary files etc. etc. but no good.

In case you ask, I have PDFs in Figure environments in some of the child documents which comprise the master document, and had no problems before this copy and paste debacle.

| improve this question | | | | |
  • You might try deleting the aux file (Clean Project). Sometimes colors wind up there, and if it crashes, the aux file will not be replaced. – John Kormylo Sep 11 '18 at 3:40
  • 1
    Probably lyx now includes the pdfpages package. You could export the document to latex and try to find out what lyx inserted. – Ulrike Fischer Sep 11 '18 at 6:57
  • It does indeed include pdfpages. I've exported to LaTeX and compiled that way—it gets rid of the problem, but I don't have the time at the moment to trawl through what might be being inserted exactly. Will post if I find anything in the future. – Ilija Sep 11 '18 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.