[texhax] letterhead

Steve Schwartz s.schwartz at imperial.ac.uk
Wed Apr 20 16:48:51 CEST 2011


Renato,

I think (a) you've defined your pagestyles backward and (b) you need to
put the 2nd argument of \fancypagestyle in braces:


On Wed, 2011-04-20 at 09:21 +0100, Renato Pontefice wrote:
> \pagestyle{fancy}
> 
> \fancyhf{}
> \fancyhead[C]{\includegraphics[width=.2\columnwidth]{logo}\quad
> \hrulefill}
> \fancyfoot[C]{\tiny street 1, 0100 rome\\ 
> \\xyzxyzxyz \includegraphics[width=.1\columnwidth]{logo2}}

If I've understood what you want, the above is what you want to see on
your first page, so define a new pagestyle "firstpage":

\fancypagestyle{firstpage}{    % note opening bracket
  \fancyhead[C]{\includegraphics[width=.2\columnwidth]{logo}\quad
\hrulefill}
  \fancyfoot[C]{\tiny street 1, 0100 rome\\ 
  \\xyzxyzxyz \includegraphics[width=.1\columnwidth]{logo2}}
}   % closing bracket
> 
> \fancypagestyle{firstpage}
> \fancyhf{}
> \fancyhead[R]{\hrulefill  \includegraphics[width=.2
> \columnwidth]{logo}\quad }

and this is what you want on all subsequent pages, so remove the
\fancypagestyle.

\fancyhf{}
\fancyhead[R]{\hrulefill  \includegraphics[width=.2
\columnwidth]{logo}\quad }

> 
> \renewcommand{\headrulewidth}{0pt}
> \renewcommand{\footrulewidth}{0.4pt}
> \renewcommand{\familydefault}{\sfdefault}
> 
> \address{Sign. Topolino,\\
>    via Astuti, 34 \\
>    Topolinia}
> \signature{Topolino}
> 
> \begin{document}
> \begin{letter}{Sign. Pippo,\\
>    via Distratti, 77 \\
>    Topolinia}[oggetto (opzionale) della lettera]
> 
> \thispagestyle{fancy}

and you are on the first page, so this should be:

\thispagestyle{firstpage}

> \opening{Buongiorno,}
> 
> Testo della lettera. Bla bla bla bla bla bla bla
> 
> but, this doesn't work. I have both the header in the first and other
> pages :-(

HTH

Steve

-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz        Phone: +44-(0)20-7594-7660
Head, Space & Atmospheric Physics  Fax:   +44-(0)20-7594-7772
The Blackett Laboratory            E-mail: s.schwartz at imperial.ac.uk
Imperial College London            Office: Huxley 6M67A 
London SW7 2AZ, U.K.               Web: www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list