and why so many '%'?
prevent spurios spaces
after \relax? as mental habit
\newdimen checks for the existence of a control sequence
the point is that on minimals-beta there is an error, on minimals no , but xpdf says
Error: ExtGState 'Tr0' is unknown Error: ExtGState 'Tr0' is unknown Error: ExtGState 'Tr0' is unknown Error: ExtGState 'Tr0' is unknown Error: ExtGState 'Tr0' is unknown
The code is not wrong -- maybe a bit strange
works fine here with preview app or adobe reader
yes, and even gs but xpdf share the same xpdf code of luatex
beta: \newdimen\currentlayerheight -> check if \currentlayerheight is already defined, it true write a message to the terminal and do nothing else create a new dimen register what did not happen here because \currentlayerheight is defined in page-lyr.tex ah ok now I have seen the log. camelcase next time -- luigi