# Texlive 2017 and xcolor package

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}
\afterpage{\nopagecolor}


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

\usepackage{etoolbox}
\makeatletter
\patchcmd\set@page@color{\ifundefined}{\@ifundefined}{}{}
\makeatother


after loading xcolor.

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

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

\documentclass[10pt,a4paper]{book}

\usepackage{graphicx}
\usepackage{xcolor}

\definecolor{light-blue}{rgb}{0.8,0.85,1}

\begin{document}

\pagecolor{light-blue}

ciao

\newpage

\pagecolor{white}

ciao

\end{document}

• 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