I am using the suggestion from here to change the background color of a page using the MWE example from frabjous. This works in Texlive 2016, but it gives an error in Texlive 2017:

! Undefined control sequence.
\set@color ...e@color \current@color \ifundefined
                                              {GPT@outputbox}{\csname ne...
l.7 \pagecolor{yellow}

Does anyone else get this error and is there a fix?

Thank you.


This is a typo in an update: will be fixed probably by tomorrow. For the present, add


after loading xcolor.

| improve this answer | |
  • Many thanks for the quick reply and solution. – user41974 Jun 14 '17 at 9:44
  • 14
    Planting bugs for getting rep? ;-) – egreg Jun 14 '17 at 9:47

I have adjourned texlive, the file compiles but it doesn't work










| improve this answer | |
  • Curiously, adding \usepackage[]{crop} makes this work successfully. (MacTeX 2017, updated this morning with new graphics-def.) – sgmoye Jun 17 '17 at 12:10
  • This would make an entirely good new question: I'll fix it today but still will be useful. – Joseph Wright Jun 17 '17 at 13:53
  • Temporary fix: \makeatletter \edef\GPT@pagecolortrue{\global\unexpanded\expandafter{\GPT@pagecolortrue}} \edef\GPT@pagecolorfalse{\global\unexpanded\expandafter{\GPT@pagecolorfalse}} \makeatother – Joseph Wright Jun 17 '17 at 14:06
  • @JosephWright copying pasting from your comment there are invisible characters around the @ which will be problematic to innocents (by the way, it does work but you know that ;-) ) – user4686 Jun 17 '17 at 20:39
  • @jfbu The invisible char business is by-design, unfortunately (it's to do with rendering the site and non-breakable blocks ...). It's inserted by the site 'back end' when rendering the HTML and is not in my code as-posted (so not there if you edit the comment, for example). – Joseph Wright Jun 17 '17 at 20:45

Your Answer

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

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