-
Notifications
You must be signed in to change notification settings - Fork 3
/
abntex-abrev.sty
49 lines (37 loc) · 1.73 KB
/
abntex-abrev.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
%% $Id: abntex-abrev.sty,v 1.4 2005/11/14 09:01:37 gweber Exp $
%% name of this file abntex-abrev.sty
%% Copyright 2003, 2005 by the abnTeX group at http://abntex.codigolivre.org.br
%%
%% 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.
%%
\NeedsTeXFormat{LaTeX2e}
\input{cvs-id.def}
\CVSExtract$Id: abntex-abrev.sty,v 1.4 2005/11/14 09:01:37 gweber Exp $
\CVSPackage{abntex-abrev}{\space Abreviacoes}
\RequirePackage{ifthen}
\newcommand{\NoAbrevending}{\let\Abrevending\@empty}
\input{nbr10522-1988.def}
\newcommand{\@NBR}{@NBR@A@}
\newcommand{\@PREF@}[1]{\csname \@NBR#1\endcsname}
\input{abntex-abrev-pt_BR.def}
\ProcessOptions
\newcommand{\@TR@}{@TR@}
\newcommand{\Capitalize}[1]{\uppercase{#1}}
%para testar, coloca os resultados em forma mais explicita
\newcommand{\TESTabrev}[1]{%
\@ifundefined{@TR@#1}{pt(#1):\csname \@NBR#1\endcsname}{en(#1):\csname \@TR@#1\endcsname}}
%controla como termina a abreviacao
\newcommand{\abrevending}{.}
\newcommand{\Abrevending}{}
%comando para usuarios, pode ser portugues�ou ingles�
\newcommand{\abrev}[1]{\let\Abrevending\abrevending%
\@ifundefined{@TR@#1}{\csname \@NBR#1\endcsname\Abrevending}{\csname \@TR@#1\endcsname\Abrevending}}
%comando para usuarios, pode ser portugues�ou ingles�
\newcommand{\Abrev}[1]{\expandafter\Capitalize\abrev{#1}}
%comando para desenvolvedores, so ingles�sem finalizacao, ou seja sem ponto
\newcommand{\ABNTEXabrev}[1]{\@ifundefined{@TR@#1}{#1}{\csname \@TR@#1\endcsname}}
%comando para desenvolvedores, so�ingles com finalizacao, ou seja com ponto
\newcommand{\ABNTEXabrevp}[1]{\let\Abrevending\abrevending
\ABNTEXabrev{#1}\Abrevending}