For Programmers: Free Programming Magazines  


Home > Archive > Tex > December 2005 > Print year in fancyhdr package









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Print year in fancyhdr package
Joe Hesse

2005-12-17, 7:05 pm

Hi,

I am using the fancyhdr package to print by header and footer.
For my footer I have,

\fancyfoot[LO,RE]{\scriptsize Copyright \copyright 2005 by Joe Hesse}

and it works great. What I would like is to have the current year generated
automatically. I tried,

\fancyfoot[LO,RE]{\scriptsize Copyright \copyright \year by Joe Hesse}

and it didn't work. Please help.

Thank you,
Joe Hesse




Morten Høgholm

2005-12-17, 7:05 pm

On Sat, 17 Dec 2005 23:59:55 +0100, Joe Hesse <joe_hesse@actcx.com> wrote:

> Hi,
>
> I am using the fancyhdr package to print by header and footer.
> For my footer I have,
>
> \fancyfoot[LO,RE]{\scriptsize Copyright \copyright 2005 by Joe Hesse}
>
> and it works great. What I would like is to have the current year
> generated
> automatically. I tried,
>
> \fancyfoot[LO,RE]{\scriptsize Copyright \copyright \year by Joe Hesse}
>
> and it didn't work. Please help.


\year is a primitive TeX integer so when you want its value printed you
have use \the\year instead.
--
Morten
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com