[texhax] Fancy headings for letters

Vittorio vdemart1 at tin.it
Fri Feb 24 13:55:05 CET 2006


I created a new cls letter class hacking the latex letter class to 
tailor the Italian way of writing letters.
Now I need to solve 
something of a Byzanthine problem.
In a nutshell the layout of the 
first page of my company's letter wants the logo of the company on the 
upper left corner at set distances fron the margins of the paper + some 
writings (Company name, Dept, Address, etc) immediatedly below the 
logo. The other pages must only have the same logo  centered on the top 
of the page.
With the following code extracted from my cls file I can 
comply with the first page requirements but in the following pages the 
logo is put on the left side too. 
I tried to move  \ifthenelse{\value
{page} = 1} immediatedly after \lhead{% but latex complains about the 
absence of \begin{document} and terminates abnormally.

Please help.

Vittorio

\RequirePackage{ifthen}
\RequirePackage[absolute]{textpos}
\RequirePackage{fancyhdr}
\RequirePackage{setspace}
\DeclareOption*
{\PassOptionsToClass{\CurrentOption}{letter}}
\ProcessOptions
\LoadClass
[a4paper]{letter}

\newcommand{\logo}[1]{%
\lhead{%
   \begin{textblock}
{60}(0,0)
    \parbox{60mm}{ \includegraphics[width=60mm]{#1}}
 \end
{textblock}

 \ifthenelse{\value{page} = 1}{
 % Prima riga
 \begin
{textblock}{60}(22,17)
     \parbox{100mm}{ 
     \setlength
{\baselineskip}{10pt}
     \textsf{%
    \scriptsize{%
    \textbf{%
    Direzione Magnificenza \\
    Pianificazione della vita} \\
    
10138 Mogadiscio, Via Palma, 101
    }}}
  \end{textblock}
 }{}
 }}




More information about the texhax mailing list