-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuaefata.cls
175 lines (152 loc) · 5.1 KB
/
uaefata.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
%
% brownletter.cls -- a document class for writing letters with Brown letterhead
%
% Copyright 2003, Nesime Tatbul ([email protected])
%
% Notes:
%
% 1. This class can be used for creating letters with Brown logo at the
% header and CS department address at the footer (as in standard Brown
% letterhead stationery).
% 2. It is based on the standard Latex document class, letter.cls.
% 3. Required packages are epsfig and ifthen.
% 4. If Brown logo is to be included in the head, then the file
% brownlogo.eps must be provided. Otherwise, the logo is omitted.
% 5. For example usage, please see brownletter_example.tex
%
% Please contact [email protected] to report any problems or bugs.
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{uaefata}
\RequirePackage{graphicx}
\RequirePackage{epstopdf}
\RequirePackage{epsfig}
\RequirePackage{ifthen}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\DeclareGraphicsExtensions{.eps}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
\ProcessOptions
\LoadClass[letterpaper]{letter} % we always use letter paper
\newcommand{\subjectname}{Assunto}
\newcommand{\@subject}{}
\newcommand{\subject}[1]{\renewcommand{\@subject}{\subjectname: #1}}
\newcommand{\section}{Section}
\newcommand{\thesection}{\@thesection}
\newboolean{logofound}
\IfFileExists{logos/UFCG-lateral-SemFundo.png}
{\setboolean{logofound}{true}}
{\setboolean{logofound}{false}}
\setlength{\textwidth}{6.875in}
\setlength{\textheight}{7.0in}
\setlength{\topskip}{0.0in}
\setlength{\footskip}{1.0in}
\setlength{\oddsidemargin}{-0.25in}
\setlength{\evensidemargin}{-0.25in}
\setlength{\topmargin}{-0.875in}
\DeclareFixedFont{\xcmrbn}{OT1}{cmr}{b}{n}{10}
\DeclareFixedFont{\xcmrmn}{OT1}{cmr}{m}{n}{10}
\DeclareFixedFont{\ixcmrmn}{OT1}{cmr}{m}{n}{9}
\newsavebox{\departmenthead}
\newsavebox{\departmentsmallhead}
\newsavebox{\departmentfoot}
\newsavebox{\emptyfoot}
\sbox{\departmenthead}{
\begin{tabular*}{\textwidth}
{@{}l@{\extracolsep{0.0in}}|@{\extracolsep{0.125in}}l@{}}
\parbox{3.625in}{\raggedright
\ifthenelse{\boolean{logofound}}
{\epsfig{file=/home/rivero/Dropbox/Workspace_Current/UFCG/logos/UFCG-lateral-SemFundo.png, height=1in}}
{\parbox[t][1.0in][t]{2.0in}{\hfill}}
} &
\parbox[t][1.0in]{4.125in}{{\xcmrbn Unidade Acadêmica de Economia e Finanças\\
Centro de Humanidades\\
}
{\ixcmrmn https://www.ch.ufcg.edu.br/}
}\\
\end{tabular*}
}
\sbox{\departmentsmallhead}{
\begin{tabular*}{\textwidth}
{@{}l@{\extracolsep{0.0in}}|@{\extracolsep{0.05in}}l@{}}
\parbox{.8in}{\raggedright
\ifthenelse{\boolean{logofound}}
{\epsfig{file=logos/brasaoufcg.png, height=.6in}}
{\parbox[t][.050in][t]{.150in}{\hfill}}
} &
\parbox[t][.050in]{4.25in}{{\xcmrbn Unidade Acadêmica de Economia e Finanças - Centro de Humanidades\\
}
{\ixcmrmn https://www.ch.ufcg.edu.br/}
}\\
\end{tabular*}
}
\savebox{\departmentfoot}[\textwidth][c]{\ixcmrmn
~Rua Aprígio Veloso, 882, Campina Grande - PB
~CEP: 58429-900 - Brasil
~fone: (83) 2101.1215.
}
\savebox{\emptyfoot}[\textwidth][c]{\ixcmrmn
\hspace*{\textwidth}
}
% header and footer should be placed only on the first page
\renewcommand{\ps@firstpage}{
\setlength{\headheight}{1.375in}
\setlength{\headsep}{1.0in}
\renewcommand{\@oddhead}{\usebox{\departmenthead}}
\renewcommand{\@oddfoot}{\usebox{\departmentfoot}}
\renewcommand{\@evenhead}{}
\renewcommand{\@evenfoot}{}
}
\renewcommand{\ps@empty}{
\setlength{\headheight}{1.375in}
\setlength{\headsep}{1in}
\renewcommand{\@oddhead}{\usebox{\departmentsmallhead}}
\renewcommand{\@oddfoot}{\usebox{\departmentfoot}}
\renewcommand{\@evenhead}{\usebox{\departmentsmallhead}}
\renewcommand{\@evenfoot}{\usebox{\departmentfoot}}
}
\providecommand{\@evenhead}{}
\providecommand{\@oddhead}{}
\providecommand{\@evenfoot}{}
\providecommand{\@oddfoot}{}
\pagestyle{empty}
% we add the subject command to the opening
\renewcommand{\opening}[1]{\thispagestyle{firstpage}%
\ifx\@empty\fromaddress
{\raggedleft\@date\par}%
\else % home address
{\raggedleft
\begin{tabular}{l@{}}\ignorespaces
\fromaddress \\ *[1\parskip]%
\@date
\end{tabular}\par
}%
\fi
\vspace{1\parskip}%
{\raggedright \toname \\ \toaddress \par}%
\vspace{1\parskip}%
\ifthenelse{\equal{\@subject}{}}{}{\@subject\par}
\vspace{1\parskip}%
#1\par\nobreak
}
% we push closing to the right
\renewcommand{\closing}[1]{\par\nobreak\vspace{\parskip}%
\stopbreaks
\noindent
\hspace*{0.4\textwidth}\parbox{0.6\textwidth}{\raggedright
\ignorespaces #1\\[4\medskipamount]%
\ifx\@empty\fromsig
\fromname
\else \fromsig
\fi\strut}%
\par
}
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\large\bfseries}}
\renewcommand \thesection{\@arabic\c@section}