Hi, Sorry to reply to my own email, but I just found out about the existance of \g at addto@macro; using that instead of the patchcmd package solves the problem: \makeatletter \newcommand{\Buffer}{} \newcommand{\bref}[1]{% \g at addto@macro\Buffer{\pageref{#1}}% \ref{#1}} \makeatother Is the extraneous space a bug in patchcmd perhaps? Edsko