blob: eeeda91fa8c287cbb196a7386f5906f3345805e8 (
plain)
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
%% This file is a part of the ArmTeX 2.0
%% [1999/06/01 v2.0 armtex.sty (LaTeX package for writing in Armenian)]
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Double input protection.
%%
\expandafter\ifx\csname ArmTeX@ArmTeXLoaded\endcsname\relax
\let\ArmTeX@ArmTeXLoaded\null\else\endinput\fi
%% Begining of the code.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{armtex}
[1999/06/01 v2.0 armtex.sty (LaTeX package for writing in Armenian)]
%% Options processing.
%%
\newif\ifArmTeX@Main
\global\ArmTeX@Maintrue
\DeclareOption{latin}{\global\ArmTeX@Mainfalse}
\DeclareOption{notstar}{\global\let\ArmTeX@Notstar\null}
\DeclareOption{notbar}{\global\let\ArmTeX@Notbar\null}
\DeclareOption{notexclam}{\global\let\ArmTeX@Notexclam\null}
\DeclareOption{notdots}{\global\let\ArmTeX@Notdots\null}
\DeclareOption{safe}{\global\let\ArmTeX@Notstar\null
\global\let\ArmTeX@Notbar\null
\global\let\ArmTeX@Notexclam\null
\global\let\ArmTeX@Notdots\null}
\ProcessOptions
%% Loading encoding definition file.
%%
\InputIfFileExists{ot6enc.def}{}
{\PackageError{ArmTeX}
{Encoding definition file `ot6enc.def' not found.\MessageBreak
Check your installation}
{It seems that there is a problem with your installation.\MessageBreak
Normally the file `ot6enc.def' should have been present on your system.\MessageBreak
But apparently it isn't !!!\MessageBreak
It is better to stop at this point and to check your installation.}}
%% Some auxilliary macros.
%%
\def\ArmTeX@Armencoding{OT6}
\def\ArmTeX@Armfamily{cmr}
\def\ArmTeX@Armseries{m}
\def\ArmTeX@Armshape{n}
\def\ArmTeX@Armnormalfont{\usefont\ArmTeX@Armencoding
\ArmTeX@Armfamily
\ArmTeX@Armseries
\ArmTeX@Armshape
\relax}
\def\ArmTeX@Savednormalfont{\usefont\ArmTeX@Savedencoding
\ArmTeX@Savedfamily
\ArmTeX@Savedseries
\ArmTeX@Savedshape
\relax}
\def\ArmTeX@Armtoday{\number\day~\ifcase\month\or
hunvari\or phetrvari\or marti\or aprili\or maisi\or hunisi\or
hulisi\or o'gostosi\or septemberi\or hoktemberi\or noyemberi\or
dektemberi\fi~\number\year th.}
\def\ArmTeX@Armdischyph{\discretionary{\char123}{}{}}
\def\ArmTeX@MathError#1{%
\PackageError{ArmTeX}
{The command `\string #1' is not available in math mode}
{You have used the command `\string #1' in math mode.\MessageBreak
But it can only be used in text mode.}}
%% User macros.
%%
\def\armdate{\let\today\ArmTeX@Armtoday}
\def\armdateoff{\let\today\ArmTeX@Savedtoday}
\def\armhyph{\let\-\ArmTeX@Armdischyph
\let\@dischyph\ArmTeX@Armdischyph}
\def\armhyphoff{\let\-\ArmTeX@Saveddischyph
\let\@dischyph\ArmTeX@Saveddischyph}
\def\armuh{--\break}
\def\armnames{%
\def\refname{Hghumneri cank}
\def\abstractname{Amphophum}
\def\bibname{Grakanuthyun}
\def\prefacename{Naxaban}
\def\chaptername{Glux}
\def\appendixname{Havelvac'}
\def\contentsname{Bovandakuthyun}
\def\listfigurename{Patkerneri cank}
\def\listtablename{Aghyusakneri cank}
\def\indexname{Ar'arkayakan cank}
\def\figurename{Patker}
\def\tablename{Aghyusak}
\def\partname{Mas}
\def\pagename{e'j}
\def\seename{{\aritshape te|s}}
\def\alsoname{{\aritshape te|s naev}}
\def\enclname{Kic e'jer}
\def\ccname{Krkno'rinak`}
\def\headtoname{Hasceater`}
\def\proofname{Apacuyc}% for AMS-\LaTeX
}
\def\armnamesoff{%
\let\refname\ArmTeX@Savedrefname
\let\abstractname\ArmTeX@Savedabstractname
\let\bibname\ArmTeX@Savedbibname
\let\prefacename\ArmTeX@Savedprefacename
\let\chaptername\ArmTeX@Savedchaptername
\let\appendixname\ArmTeX@Savedappendixname
\let\contentsname\ArmTeX@Savedcontentsname
\let\listfigurename\ArmTeX@Savedlistfigurename
\let\listtablename\ArmTeX@Savedlisttablename
\let\indexname\ArmTeX@Savedindexname
\let\figurename\ArmTeX@Savedfigurename
\let\tablename\ArmTeX@Savedtablename
\let\partname\ArmTeX@Savedpartname
\let\pagename\ArmTeX@Savedpagename
\let\seename\ArmTeX@Savedseename
\let\alsoname\ArmTeX@Savedalsoname
\let\enclname\ArmTeX@Savedenclname
\let\ccname\ArmTeX@Savedccname
\let\headtoname\ArmTeX@Savedheadtoname
\let\proofname\ArmTeX@Savedproofname
}
\DeclareRobustCommand{\?}{\ifmmode\ArmTeX@MathError{\?}\else
\textquestion\fi}
\DeclareRobustCommand{\ArmTeX}{{\artmfamily
\def\ArmTeX@testa{it}\ifx\f@shape\ArmTeX@testa\arslshape\fi
A\kern -0.08ex\raise 0.63ex\hbox{\smash{r}}\kern -0.22em%
\def\ArmTeX@testa{sl}\ifx\f@shape\ArmTeX@testa\kern -0.075em\fi
\def\ArmTeX@testa{m}\ifx\f@series\ArmTeX@testa\else\kern -0.015em\fi
\lower 0.43ex\hbox{m}\kern -0.16em\fontencoding\ArmTeX@Savedencoding
\fontfamily\ArmTeX@Savedfamily
\def\ArmTeX@testa{sl}\ifx\f@shape\ArmTeX@testa\slshape\else\upshape\fi
\def\ArmTeX@testa{m}\ifx\f@series\ArmTeX@testa\mdseries\else\bfseries\fi
\selectfont\TeX}}
\DeclareRobustCommand{\latArmTeX}{{\aroff
\edef\ArmTeX@testa{\itdefault}\ifx\f@shape\ArmTeX@testa\slshape\fi
Arm\kern -0.15em\edef\ArmTeX@testa{\mddefault}%
\ifx\f@series\ArmTeX@testa\else\kern 0.03em\fi\TeX}}
%% At begining of the document.
%%
\AtBeginDocument{
%
% Cheking if OT6 is not already loaded.
%
\ifx\encodingdefault\ArmTeX@Armencoding
\PackageError{armtex}
{Encoding definition file `ot6enc.def' already loaded.\MessageBreak
You should not load it with the help of\MessageBreak
`fontenc' package if you use `armtex' package}
{You must have put something like \protect\usepackage[T1,T3,OT6]{fontenc} in\MessageBreak
the preambule of your document.\MessageBreak
Removing `OT6' from the list of options (or removing the whole\MessageBreak
`fontenc' package, if you don't need it) will solve the problem.}
\fi
%
% Do some savings.
%
\let\ArmTeX@Savedexclam=\!%
\let\ArmTeX@Savedbar=\|%
\let\ArmTeX@Savedstar=\*%
\let\ArmTeX@Saveddischyph=\-%
\let\ArmTeX@Savedtoday=\today
\let\ArmTeX@Savedencoding=\encodingdefault
\let\ArmTeX@Savedfamily=\familydefault
\let\ArmTeX@Savedseries=\seriesdefault
\let\ArmTeX@Savedshape=\shapedefault
\let\ArmTeX@Savedrefname\refname
\let\ArmTeX@Savedabstractname\abstractname
\let\ArmTeX@Savedbibname\bibname
\let\ArmTeX@Savedprefacename\prefacename
\let\ArmTeX@Savedchaptername\chaptername
\let\ArmTeX@Savedappendixname\appendixname
\let\ArmTeX@Savedcontentsname\contentsname
\let\ArmTeX@Savedlistfigurename\listfigurename
\let\ArmTeX@Savedlisttablename\listtablename
\let\ArmTeX@Savedindexname\indexname
\let\ArmTeX@Savedfigurename\figurename
\let\ArmTeX@Savedtablename\tablename
\let\ArmTeX@Savedpartname\partname
\let\ArmTeX@Savedpagename\pagename
\let\ArmTeX@Savedseename\seename
\let\ArmTeX@Savedalsoname\alsoname
\let\ArmTeX@Savedenclname\enclname
\let\ArmTeX@Savedccname\ccname
\let\ArmTeX@Savedheadtoname\headtoname
\let\ArmTeX@Savedproofname\proofname
%
% Processing Options.
%
\ifArmTeX@Main
\let\encodingdefault=\ArmTeX@Armencoding
\let\familydefault=\ArmTeX@Armfamily
\let\seriesdefault=\ArmTeX@Armseries
\let\shapedefault=\ArmTeX@Armshape
\ArmTeX@Armnormalfont
\armdate
\armhyph
\armnames
\fi
%
\ifx\ArmTeX@Notstar\null\else
\DeclareRobustCommand{\*}{\ifmmode\ArmTeX@Savedstar\else
\textbreaklig\fi}%
\fi
%
\ifx\ArmTeX@Notexclam\null\else
\DeclareRobustCommand{\!}{\ifmmode\ArmTeX@Savedexclam\else
\textexclam\fi}%
\fi
%
\ifx\ArmTeX@Notbar\null\else
\DeclareRobustCommand{\|}{\ifmmode\ArmTeX@Savedbar\else
\textanjgic\fi}%
\fi
%
\ifx\ArmTeX@Notdots\null\else
\def\vdots{\vbox{\baselineskip4\p@ \lineskiplimit\z@
\kern6\p@\hbox{$\ldotp$}\hbox{$\ldotp$}\hbox{$\ldotp$}}}%
\def\ddots{\mathinner{\mkern1mu\raise7\p@
\vbox{\kern7\p@\hbox{$\ldotp$}}\mkern2mu
\raise4\p@\hbox{$\ldotp$}\mkern2mu\raise\p@\hbox{$\ldotp$}\mkern1mu}}%
\fi
}
%% Encoding/font MATH selection user macros.
%%
\DeclareMathAlphabet{\mathartm}{OT6}{cmr}{m}{n}
\SetMathAlphabet{\mathartm}{bold}{OT6}{cmr}{bx}{n}
\DeclareMathAlphabet{\mathartmbf}{OT6}{cmr}{bx}{n}
\DeclareMathAlphabet{\mathartmit}{OT6}{cmr}{m}{it}
\SetMathAlphabet{\mathartmit}{bold}{OT6}{cmr}{bx}{it}
\DeclareMathAlphabet{\mathartmbfit}{OT6}{cmr}{bx}{it}
%% Encoding/font TEXT selection orthogonal user macros.
%%
\DeclareRobustCommand{\aroff}{%
\ifx\f@encoding\ArmTeX@Armencoding\ArmTeX@Savednormalfont
\armdateoff
\armhyphoff\fi}%
%
\providecommand{\ArmTeX@OrthoFontDef}[3]{%
\DeclareRobustCommand{#1}{%
\ifmmode\ArmTeXMathError{#1}\else
\ifx\f@encoding\ArmTeX@Armencoding\else\ArmTeX@Armnormalfont\armdate\armhyph\fi
#3\selectfont\fi}%
\DeclareTextFontCommand{#2}{#1}}
%
\ArmTeX@OrthoFontDef{\artmfamily}{\armtm}{\fontfamily{cmr}}
\ArmTeX@OrthoFontDef{\arssfamily}{\armss}{\fontfamily{cmss}}
\ArmTeX@OrthoFontDef{\arbfseries}{\armbf}{\fontseries{bx}}
\ArmTeX@OrthoFontDef{\armdseries}{\armmd}{\fontseries{m}}
\ArmTeX@OrthoFontDef{\arupshape}{\armup}{\fontshape{n}}
\ArmTeX@OrthoFontDef{\aritshape}{\armit}{\fontshape{it}}
\ArmTeX@OrthoFontDef{\arslshape}{\armsl}{\fontshape{sl}}
%% Encoding/font TEXT selection NON-orthogonal commands
%%
% Old-style armenian commands used in plain version.
%
\providecommand{\ArmTeX@OldArmFontDef}[3]{%
\DeclareOldFontCommand{#1}{%
\ifx\f@encoding\ArmTeX@Armencoding\else\armdate\armhyph\fi
\ArmTeX@Armnormalfont #2\selectfont}{#3}}
%
\ArmTeX@OldArmFontDef{\artm}{\fontfamily{cmr}}
{\mathartm}
\ArmTeX@OldArmFontDef{\arss}{\fontfamily{cmss}}
{\ArmTeXMathError{\arss}}
\ArmTeX@OldArmFontDef{\artmbf}{\fontfamily{cmr}\fontseries{bx}}
{\mathartmbf}
\ArmTeX@OldArmFontDef{\arssbf}{\fontfamily{cmss}\fontseries{bx}}
{\ArmTeXMathError{\arssbf}}
\ArmTeX@OldArmFontDef{\artmit}{\fontfamily{cmr}\fontshape{it}}
{\mathartmit}
\ArmTeX@OldArmFontDef{\artmsl}{\fontfamily{cmr}\fontshape{sl}}
{\ArmTeXMathError{\artmsl}}
\ArmTeX@OldArmFontDef{\arsssl}{\fontfamily{cmss}\fontshape{sl}}
{\ArmTeXMathError{\arsssl}}
\ArmTeX@OldArmFontDef{\artmbfit}{\fontfamily{cmr}\fontshape{it}\fontseries{bx}}
{\mathartmbfit}
\ArmTeX@OldArmFontDef{\artmbfsl}{\fontfamily{cmr}\fontshape{sl}\fontseries{bx}}
{\ArmTeXMathError{\artmbfsl}}
\ArmTeX@OldArmFontDef{\arssbfsl}{\fontfamily{cmss}\fontshape{sl}\fontseries{bx}}
{\ArmTeXMathError{\arssbfsl}}
% Old-style NON-armenian commands (possibly redefining, if
% already defined in class).
%
\providecommand{\ArmTeX@OldNonArmFontDef}[3]{%
\DeclareOldFontCommand{#1}{\ArmTeX@Savednormalfont\armdateoff\armhyphoff #2}{#3}}
%
\ArmTeX@OldNonArmFontDef{\rm}{\rmfamily}{\mathrm}
\ArmTeX@OldNonArmFontDef{\sf}{\sffamily}{\mathsf}
\ArmTeX@OldNonArmFontDef{\tt}{\ttfamily}{\mathtt}
\ArmTeX@OldNonArmFontDef{\bf}{\bfseries}{\mathbf}
\ArmTeX@OldNonArmFontDef{\it}{\itshape}{\mathit}
\ArmTeX@OldNonArmFontDef{\sl}{\slshape}{\ArmTeXMathError{\sl}}
\ArmTeX@OldNonArmFontDef{\sc}{\scshape}{\ArmTeXMathError{\sc}}
%% That's all, Folks!
%%
\endinput
|