On Saturday 02 October 2010 18:24:01 Julien Rioux wrote:
> On 02/10/2010 4:25 PM, Steve Litt wrote:

> > Ugh! Afterpage appears not to work for reasons unknown. I did this:
> >
> > \newcommand{\plotdatebodyL}[1]{%
> >    \renewcommand\plotdateondeck[0]{#1}%
> >    \afterpage{\renewcommand{\plotdatehdr}[0]{\plotdateondeck}{}
> > {zzzzzzzzzzzzzzzzzzzz}}
> >    {XXXXXXX XXXXX}
> > %  \renewcommand{\plotdatehdr}[0]{\plotdateondeck}
> > }%
> >
> > The \renewcommand inside the afterpage doesn't work. \afterpage is firing
> > because I get the row of z's on the next page. The \renewcommand within
> > the \afterpage either isn't working, or is somehow getting overwritten,
> > because I keep getting the same value in the header. Note however that
> > when I uncomment the \renewcommand outside of the \afterpage, the header
> > changes according to calls to \plotdatebodyL, in which case it's just
> > like the original -- e.g. the header lists the last value on the page,
> > not the first.
> >
> > So why isn't the \renewcommand inside the \afterpage working or why is it
> > getting overwritten? By the way, \let\plotdatehdr\plotdateondeck did
> > exactly the same thing.
> >
> > This thing is so close I can taste it, but there's something I'm not
> > seeing.
> >
> > Thanks
> >
> > SteveT
> >
> > Steve Litt
> > Recession Relief Package
> > http://www.recession-relief.US
> > Twitter: http://www.twitter.com/stevelitt
> 
> Does this work?
> 
> \def\currentdate{}
> \newcommand{\setdate}[1]{%
> The date is now: #1%
> \afterpage{\gdef\currentdate{#1}}
> }
> 
> \rhead{\currentdate}

Fascinating. Thanks for telling me about \gdef, which from what I read is a 
global definition. I'll try something like that tomorrow. I also read about 
\xdef, and will have to find out more about that.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

Reply via email to