% Modelo de papel timbrado do IC
% Last edited on 2010-03-12 23:29:47 by stolfi

% Autor: Rodolfo Jardim de azevedo
% Baseado em modelos/ideias e versoes de
%  Flavio K. Miyazawa
%  Jorge Stolfi
%  Pedro J. de Rezende
%  Tomasz Kowaltowski
%
% Para usar:
% 
%   \usepackage{timbre-ic}
%   \input{timbre-dados-fulano}
%   
%   \begin{document}
%   ...
%   \vfill
%   \end{document}
%
% O arquivo "timbre-dados-fulano.tex" contém dados do remetente:
%
%   \usepackage{url}
%   \name{Fulano Genérico da Silva}
%   \affiliation{IC - UNICAMP}
%   \address{Av. Albert Einstein, 1251 - Cidade Universitária\\13083-852 - Campinas - SP - Brasil}
%   \web{\url{http://www.ic.unicamp.br/~rodolfo}}
%   \email{\url{fulano@ic.unicamp.br}}
%   \phone{Tel.: +55 (19) 3521-5899}
%   \fax{Fax: +55 (19) 3521-5847}
%
% Vide exemplo de uso "timbre-exemplo.tex"
%

\ProvidesPackage{timbre-ic}
\RequirePackage{fancyhdr}
\RequirePackage{graphics}
\RequirePackage{logo-ic-unicamp}
\RequirePackage{logo-unicamp}

\voffset -0.54cm
\hoffset -0.54cm
\oddsidemargin 0cm
\evensidemargin 0cm
\marginparwidth 0cm
 
\topmargin 0cm
\headheight 2.2cm
\headsep 0.5cm
\textheight 19cm
\footskip 2.2cm

\textwidth 17.5cm

\def\name#1{\gdef\@formname{#1}}
\def\affiliation#1{\gdef\@formaffiliation{#1}}
\def\address#1{\gdef\@formaddress{#1}}
\def\web#1{\gdef\@formweb{#1}}
\def\email#1{\gdef\@formemail{#1}}
\def\phone#1{\gdef\@formphone{#1}}
\def\fax#1{\gdef\@formfax{#1}}

\newcommand\timbreic{
  \pagestyle{fancy}
  \fancyhf{}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.4pt}
  \lhead{\resizebox{!}{2cm}{\LogoUnicamp}}
  \chead{\centerline{\large\sc Universidade Estadual de Campinas}
         \centerline{\Large\sc Instituto de Computação}}
  \rhead{\resizebox{!}{2cm}{\LogoIcUnicamp}}
  \lfoot{\small \@formname \\ \@formaffiliation \\ \@formaddress}
  \cfoot{}
  \rfoot{\small \@formweb \\ \@formemail \\ \@formphone \\ \@formfax}
}

\AtBeginDocument{\timbreic}
