-
Notifications
You must be signed in to change notification settings - Fork 1
/
iiletter.cls
103 lines (98 loc) · 2.76 KB
/
iiletter.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%
% iiletter.cls - modelo de carta com logotipo do II/UFRGS
% $Id: iiletter.cls,v 4.1 2002/12/07 17:20:09 utug Exp $
%
% UFRGS TeX Users Group
% Institute of Informatics --- UFRGS
% Porto Alegre, Brazil
% http://gppd.inf.ufrgs.br/~avila/utug
% Discussion list: [email protected]
%
% Copyright (C) 2001 UFRGS TeX Users Group
% This is free software, distributed under the GNU GPL; please take
% a look in `iiufrgs.cls' to see complete information on using, copying
% and redistributing these files
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{iiletter}
\DeclareOption{variilogo}{
\gdef\ii@variilogo{1}
}
\DeclareOption*{
\PassOptionsToClass{\CurrentOption}{letter}
}
\ProcessOptions\relax
\LoadClass[a4paper,12pt]{letter}
\RequirePackage[brazilian]{babel}
\RequirePackage{iidefs}
%
% definicoes padrao
%
\date{Porto~Alegre, \today}
\newcommand{\estilorodape}{\scriptsize\sffamily\bfseries}
\address{
{\ii} --- {\ufrgs}\\
Av.~Bento Gon{\c{c}}alves, 9500 Bloco~IV --- Cx.~Postal 15064 --- 91501-970 Porto~Alegre\\
Phone: +55 51 3316-6165\hspace{2em}Fax: +55 51 3316-7308\hspace{2em}http://www.inf.ufrgs.br
}
%
% definicoes internas
%
\def\linha{\rule[1ex]{\textwidth}{2pt}}
\def\cabecalho{
\parbox[b]{\textwidth}{\iilogo\\\linha}
}
\def\varcabecalho{
\makebox[\textwidth]{\variilogo[1.2]}
}
\def\rodape{\parbox[b]{\textwidth}{
\linha\\
\estilorodape\centering\fromaddress
}}
%
% definicao do estilo de pagina (cabecalho e rodape)
%
\def\ps@iiletter{
\let\@evenfoot\@empty
\let\@evenhead\@empty
\def\@oddhead{\@ifundefined{ii@variilogo}{\cabecalho}{\varcabecalho}}
\def\@oddfoot{\rodape}
}
\pagestyle{iiletter}
\let\ps@empty\ps@iiletter
\let\ps@firstpage\ps@iiletter
\let\ps@headings\ps@iiletter
%
% margens e etc
%
\setlength{\topmargin}{20mm} % margem superior
\settoheight{\headheight}{\cabecalho}
\setlength{\headsep}{10mm} % dist. cabecalho ao texto
\settoheight{\footskip}{\rodape}
\addtolength{\footskip}{10mm} % dist. texto ao rodape
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-8mm} % margem inferior
\addtolength{\textheight}{-\topmargin}
\addtolength{\textheight}{-\headheight}
\addtolength{\textheight}{-\headsep}
\addtolength{\textheight}{-\footskip}
\setlength{\oddsidemargin}{30mm} % margem esquerda
\setlength{\evensidemargin}{30mm} % margem direita
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-\oddsidemargin}
\addtolength{\textwidth}{-\evensidemargin}
\addtolength{\topmargin}{-1in}
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\setlength{\parindent}{4em}
%
% redefine o comando opening para nao colocar o endereco
% no canto superior direito
%
\renewcommand*{\opening}[1]{
{\raggedleft\@date\par}%
\vspace{2\parskip}%
{\raggedright\toname \\ \toaddress \par}%
\vspace{2\parskip}%
\noindent#1\par\nobreak
}