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.

2 Answers 2


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


after loading xcolor.

  • Many thanks for the quick reply and solution.
    – user41974
    Commented Jun 14, 2017 at 9:44
  • 14
    Planting bugs for getting rep? ;-)
    – egreg
    Commented Jun 14, 2017 at 9:47

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










  • Curiously, adding \usepackage[]{crop} makes this work successfully. (MacTeX 2017, updated this morning with new graphics-def.)
    – sgmoye
    Commented Jun 17, 2017 at 12:10
  • This would make an entirely good new question: I'll fix it today but still will be useful.
    – Joseph Wright
    Commented Jun 17, 2017 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
    Commented Jun 17, 2017 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
    Commented Jun 17, 2017 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
    Commented Jun 17, 2017 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .