-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabela-simbolos.sty
281 lines (228 loc) · 10.7 KB
/
tabela-simbolos.sty
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
%% $Id: tabela-simbolos.sty,v 1.9 2003/10/13 09:44:08 gweber Exp $
%% name of this file tabela-simbolos.sty
%% Copyright 2003 by the abnTeX group at http://abntex.codigolivre.org.br
%%
%% Mantainer: Gerald Weber <[email protected]>
%%
%% This file is distributed under the LaTeX-Project Public License (LPPL)
%% http://www.latex-project.org/lppl.html
%% You are free to modify this file under the LPPL.
%%
%% $Log: tabela-simbolos.sty,v $
%% Revision 1.9 2003/10/13 09:44:08 gweber
%% Passa a usar abntex-abrev para abreviaçőes. Acrescentado um aviso sobre o que fazer
%% para rodar makeindex.
%%
%% Revision 1.8 2003/10/10 10:03:21 gweber
%% Passa a usar cvs-id.def para gerar informaçőes sobre data e versăo.
%%
%% Revision 1.7 2003/10/07 16:16:03 gweber
%% Informaçăo sobre o pacote (comando \ProvidesPackage) automáticamente atualizado via
%% CVS Id tags.
%%
%% Revision 1.6 2003/10/03 08:50:58 gweber
%% Correçăo do bug 204 que mantinha a vírgula após o texto com paginas=nao.
%%
%% Revision 1.5 2003/03/19 21:04:44 gweber
%% Corrigida uma incompatibilidade com hyperref e consequentemente
%% com pdflatex. O estilo agora passa a opçăo hyperindex=false para
%% o hypereref.
%%
%%
\NeedsTeXFormat{LaTeX2e}
\input{cvs-id.def}
\CVSExtract$Id: tabela-simbolos.sty,v 1.9 2003/10/13 09:44:08 gweber Exp $
\CVSPackage{tabelasimbolos}{\space Tabela de simbolos e siglas}
%pacote misc/index.sty, bastante desatualizado, poderá
%năo funcionar com algumas instalaçőes latex
\RequirePackage{index}
%pacotes padrăo do latex
\RequirePackage{ifthen}
\RequirePackage{abntex-abrev}
\PassOptionsToPackage{hyperindex=false}{hyperref}
\newcommand{\TSStextpagesep}{,}
\newboolean{tsspages}
\DeclareOption{paginas=sim}{\setboolean{tsspages}{true}}
\DeclareOption{paginas=nao}
{
\setboolean{tsspages}{false}
\renewcommand{\TSStextpagesep}{}
}
\newboolean{AlphaSort}
\DeclareOption{ordem=alf}{\setboolean{AlphaSort}{true}}
\DeclareOption{ordem=oc}{\setboolean{AlphaSort}{false}}
\newboolean{SeparateSortScheme}
\DeclareOption{esquema=separado}{\setboolean{SeparateSortScheme}{true}}
\DeclareOption{esquema=misto}{\setboolean{SeparateSortScheme}{false}}
\newboolean{CaseSortScheme}
\newboolean{UpperCaseLast}
\DeclareOption{caixa=mM}{\setboolean{CaseSortScheme}{true}\setboolean{UpperCaseLast}{true}}
\DeclareOption{caixa=Mm}{\setboolean{CaseSortScheme}{true}\setboolean{UpperCaseLast}{false}}
\DeclareOption{caixa=mista}{\setboolean{CaseSortScheme}{false}\setboolean{UpperCaseLast}{false}}
\newboolean{SeparateListDisplay}
\DeclareOption{lista=separada}{\setboolean{SeparateListDisplay}{true}}
\DeclareOption{lista=unica}{\setboolean{SeparateListDisplay}{false}}
\DeclareOption{romanos=1}{\def\RomanOrder{1}}
\DeclareOption{romanos=2}{\def\RomanOrder{2}}
\DeclareOption{romanos=3}{\def\RomanOrder{3}}
\DeclareOption{gregos=1}{\def\GreekOrder{1}}
\DeclareOption{gregos=2}{\def\GreekOrder{2}}
\DeclareOption{gregos=3}{\def\GreekOrder{3}}
\DeclareOption{simbolos=1}{\def\SymbolOrder{1}}
\DeclareOption{simbolos=2}{\def\SymbolOrder{2}}
\DeclareOption{simbolos=3}{\def\SymbolOrder{3}}
\ExecuteOptions{romanos=1,gregos=2,simbolos=3}
\DeclareOption{estilo=UFPR}{%
\ExecuteOptions{paginas=nao,ordem=alf,esquema=separado,caixa=mM,lista=unica}%
\ExecuteOptions{romanos=1,gregos=2,simbolos=3}}
\DeclareOption{estilo=14724:2001}{%
\ExecuteOptions{paginas=sim,ordem=oc,esquema=misto,caixa=mista,lista=unica}}
\ExecuteOptions{estilo=14724:2001}
\ProcessOptions*
\ifthenelse{\boolean{SeparateSortScheme}}{%
\AtEndDocument{%
\typeout{####################################}
\typeout{tabela-simbolos: agora rode geratss ou manualmente,}
\typeout{makeindex -s tabela-siglas.ist -o \jobname.sigla \jobname.siglax}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.romanlow \jobname.romanlowx}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.romanupp \jobname.romanuppx}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.greeklow \jobname.greeklowx}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.greekupp \jobname.greekuppx}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.miscelan \jobname.miscelanx}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.symbols \jobname.symbolsx}%
\typeout{####################################}}
}{%
\AtEndDocument{%
\typeout{####################################}
\typeout{tabela-simbolos: agora rode geratss ou manualmente,}
\typeout{makeindex -s tabela-siglas.ist -o \jobname.sigla \jobname.siglax}%
\typeout{makeindex -s tabela-simbolos.ist -o \jobname.symbols \jobname.symbolsx}%
\typeout{####################################}}
}
\ifthenelse{\boolean{SeparateSortScheme}}{%
\ifnum\RomanOrder=\GreekOrder%
\typeout{ADVERTENCIA: simbolos gregos e romanos com a mesma ordem, voltando ao padrao}
\def\RomanOrder{1}\def\GreekOrder{2}\def\SymbolOrder{3}\fi
\ifnum\RomanOrder=\SymbolOrder%
\typeout{ADVERTENCIA: simbolos romanos e outros simbolos com a mesma ordem, voltando ao padrao}
\def\RomanOrder{1}\def\GreekOrder{2}\def\SymbolOrder{3}\fi
\ifnum\GreekOrder=\SymbolOrder%
\typeout{ADVERTENCIA: simbolos gregos e outros simbolos com a mesma ordem, voltando ao padrao}
\def\RomanOrder{1}\def\GreekOrder{2}\def\SymbolOrder{3}\fi}{}
%See p. 345 in The Thexbook, D. E. Knuth
%\newcommand{\testuppercase}[1]{%
%\expandafter\ifnum\the\sfcode`#1=999 true\else false\fi}
\newindex{sigla}{siglax}{sigla}{Lista de abreviaturas e siglas}
\ifthenelse{\boolean{SeparateSortScheme}}{%
\newindex{romanlow}{romanlowx}{romanlow}{Lista de símbolos romanos minúsculos}%
\newindex{romanupp}{romanuppx}{romanupp}{Lista de símbolos romanos maiúsculos}%
\newindex{greeklow}{greeklowx}{greeklow}{Lista de símbolos gregos minúsculos}%
\newindex{greekupp}{greekuppx}{greekupp}{Lista de símbolos gregos maiúsculos}%
\newindex{miscelan}{miscelanx}{miscelan}{Lista de outros símbolos}%
\def\RomanLow{romanlow}%
\def\GreekLow{greeklow}%
\ifthenelse{\boolean{CaseSortScheme}}{\def\RomanUpp{romanupp}\def\GreekUpp{greekupp}}
{\def\RomanUpp{romanlow}\def\GreekUpp{greeklow}}
\def\Miscelan{miscelan}}{%
\newindex{symbols}{symbolsx}{symbols}{Lista de símbolos}%
\def\RomanLow{symbols}%
\def\RomanUpp{symbols}%
\def\GreekLow{symbols}%
\def\GreekUpp{symbols}%
\def\Miscelan{symbols}}
\newcounter{Ocorrencia}
\setcounter{Ocorrencia}{0}
\ifthenelse{\boolean{AlphaSort}}{\def\TheOcor{}}{\def\TheOcor{\arabic{Ocorrencia}\space}}
%the following was extracted form texmf/tex/latex/misc/index.sty (v3.02)
\def\@wrindex#1#2{%
\begingroup
\let\thepage\relax
\def\@tempa{#2}%
\edef\@tempa{%
\write\@auxout{%
\string\@vwritefile{#1}{%
\string\indexentry{\TheOcor\@nearverbatim\@tempa}{\thepage}%
}%
}%
}%
\expandafter\endgroup\@tempa
\if@nobreak\ifvmode\nobreak\fi\fi
}
\newcommand{\IndexCommand}[3]{%
\ifthenelse{\boolean{AlphaSort}}{\index[#1]{#2@#3|TSSThePage}}%
{\addtocounter{Ocorrencia}{1}%
\index[#1]{@#3|TSSThePage}}}
\newcommand{\sigla}[2]{\IndexCommand{sigla}{#1 #2}{#1& #2}}
\newcommand{\rsimpsymbol}[2]{\IndexCommand{\RomanLow}{#1 #2}{$#1$& #2}}
\newcommand{\rcompsymbol}[3]{\IndexCommand{\RomanLow}{#2 #3}{#1& #3}}
\newcommand{\Rsimpsymbol}[2]{\IndexCommand{\RomanUpp}{#1 #2}{$#1$& #2}}
\newcommand{\Rcompsymbol}[3]{\IndexCommand{\RomanUpp}{#2 #3}{#1& #3}}
\newcommand{\gsimpsymbol}[2]{\IndexCommand{\GreekLow}{#1 #2}{$#1$& #2}}
\newcommand{\gcompsymbol}[3]{\IndexCommand{\GreekLow}{#2 #3}{#1& #3}}
\newcommand{\Gsimpsymbol}[2]{\IndexCommand{\GreekUpp}{#1 #2}{$#1$& #2}}
\newcommand{\Gcompsymbol}[3]{\IndexCommand{\GreekUpp}{#2 #3}{#1& #3}}
\newcommand{\msimpsymbol}[2]{\IndexCommand{\Miscelan}{#1 #2}{$#1$& #2}}
\newcommand{\mcompsymbol}[3]{\IndexCommand{\Miscelan}{#2 #3}{#1& #3}}
\newcommand{\simbolo}[3][0]{%
\ifthenelse{\equal{#1}{0}}{\rsimpsymbol{#2}{#3}}{\rcompsymbol{#1}{#2}{#3}}}
\newcommand{\Simbolo}[3][0]{%
\ifthenelse{\equal{#1}{0}}{\Rsimpsymbol{#2}{#3}}{\Rcompsymbol{#1}{#2}{#3}}}
\newcommand{\simbologrego}[3][0]{%
\ifthenelse{\equal{#1}{0}}{\gsimpsymbol{#2}{#3}}{\rgcompsymbol{#1}{#2}{#3}}}
\newcommand{\Simbologrego}[3][0]{%
\ifthenelse{\equal{#1}{0}}{\Gsimpsymbol{#2}{#3}}{\Gcompsymbol{#1}{#2}{#3}}}
\newcommand{\simbolomisc}[3][0]{%
\ifthenelse{\equal{#1}{0}}{\msimpsymbol{#2}{#3}}{\mcompsymbol{#1}{#2}{#3}}}
\ifthenelse{\boolean{tsspages}}%
{\newcommand{\TSSThePage}[1]{& \ABNTEXabrevp{page}~#1}}%
{\newcommand{\TSSThePage}[1]{&}}
\providecommand{\pretextualchapter}[1]{\chapter*{#1}}
\newcommand{\listofabreviationsname}{Lista de abreviaturas e siglas}
\newcommand{\listofsymbolsname}{Lista de símbolos}
\newcommand{\romansymbolsname}{Símbolos romanos}
\newcommand{\greeksymbolsname}{Símbolos gregos}
\newcommand{\othersymbolsname}{Outros símbolos}
\newcommand{\abrevtablewidth}{0.7\textwidth}
\newcommand{\abrevcolumns}{lp{\abrevtablewidth}l}
\newcommand{\Babrevtable}{\begin{center}\begin{tabular}{\abrevcolumns}}
\newcommand{\Eabrevtable}{\end{tabular}\end{center}}
\newenvironment{tabeladesiglas}{%
\pretextualchapter{\listofabreviationsname}\Babrevtable}{\Eabrevtable}
\newcommand{\symboltablewidth}{0.7\textwidth}
\newcommand{\symbolcolumns}{lp{\symboltablewidth}l}
\newcommand{\Bsymboltable}{\begin{center}\begin{tabular}{\symbolcolumns}}
\newcommand{\Esymboltable}{\end{tabular}\end{center}}
\newenvironment{tabeladesimbolos}{%
\pretextualchapter{\listofsymbolsname}\Bsymboltable}{\Esymboltable}
\ifcase\RomanOrder\or\def\FirstList{1}\or\def\SecondList{1}\or\def\ThirdList{1}\fi
\ifcase\GreekOrder\or\def\FirstList{2}\or\def\SecondList{2}\or\def\ThirdList{2}\fi
\ifcase\SymbolOrder\or\def\FirstList{3}\or\def\SecondList{3}\or\def\ThirdList{3}\fi
\newcommand{\ShowListOrder}[1]{%
\ifcase#1\or Romanos\or Gregos\or Simbolos\fi}
\typeout{Ordem: 1: \ShowListOrder{\FirstList} 2: \ShowListOrder{\SecondList} %
3: \ShowListOrder{\ThirdList}}
\newcommand{\PrintRomanList}{%
\ifthenelse{\boolean{SeparateListDisplay}}{\\ &\multicolumn{1}{c}{\emph{\romansymbolsname}}& }{}%
\ifthenelse{\boolean{UpperCaseLast}}{\printindex[romanlow]\printindex[romanupp]}%
{\printindex[romanupp]\printindex[romanlow]}}
\newcommand{\PrintGreekList}{%
\ifthenelse{\boolean{SeparateListDisplay}}{\\ &\multicolumn{1}{c}{\emph{\greeksymbolsname}}& }{}%
\ifthenelse{\boolean{UpperCaseLast}}{\printindex[greeklow]\printindex[greekupp]}%
{\printindex[greekupp]\printindex[greeklow]}}
\newcommand{\PrintSymbolList}{%
\ifthenelse{\boolean{SeparateListDisplay}}{\\ &\multicolumn{1}{c}{\emph{\othersymbolsname}}& }{}%
\printindex[miscelan]}
\newcommand{\PrintList}[1]{%
\ifcase#1\or\PrintRomanList\or\PrintGreekList\or\PrintSymbolList\fi}
\newcommand{\listadesiglas}{
\begin{tabeladesiglas}%
\printindex[sigla]
\end{tabeladesiglas}}
\newcommand{\listadesimbolos}{
\begin{tabeladesimbolos}%
\ifthenelse{\boolean{SeparateSortScheme}}{%
\PrintList{\FirstList}
\PrintList{\SecondList}
\PrintList{\ThirdList}}{%
\printindex[symbols]}
\end{tabeladesimbolos}}