blob: 1a801c26926a5b3d697835c86119401108dbe05e (
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
318
319
320
321
322
323
324
325
326
327
328
329
|
%
% GREEKTEX.TEX
% ---------
%
% K J Dryllerakis
%
% Dec 7, 1992
%
% VERSION: 3.1
%
% This is the macro file for GreekTeX. If this file is used
% and not the greek.tex (FMT) no hyphenation patterns for greek
% are loaded. IT can be used for short greek text inside english text.
% Note that PLAIN must be preloaded and bare a fmtversion 3.0 or
% higher (to ensure existence of language definitions).
% Greek is defined to be language 1 or actually last_language+1.
%
% Pleaaaaaaaaase don't modify this file
%
% Note: Used in conjunction with KD Fonts
%
\catcode`\@=11 % We will access TeX private macros
\newwrite\@screen % Define a screen ouput
\def\showstring#1{\immediate\write\@screen{#1}}
\def\sp@{ }\def\sp@s{\sp@\sp@\sp@\sp@\sp@\sp@\sp@\sp@\sp@}
\def\c@p{\showstring{}\showstring{\sp@s\sp@s\sp@s GreekTeX -- Version 3.1}%
\showstring{\sp@s\sp@s\sp@s ---------------------------}
\showstring{\sp@s GreekTeX is a macro package for typesetting greek texts.}
\showstring{\sp@s It is maily compatible with the haralambous package,}
\showstring{\sp@s from which it inherits the top level macros.}
\showstring{\sp@s GreekTeX includes easy access to font families, a choise}
\showstring{\sp@s of delimiters, and makes typesetting scientific papers}
\showstring{\sp@s in greek as easy as in TeX itself.}
\showstring{\sp@s}
\showstring{\sp@s\sp@s\sp@s Copyright K J Dryllerakis 1991-1992}
\showstring{\sp@s\sp@s\sp@s ------------------------------}%
}
\c@p
%
% A List of Reserved Keywords that should not be redefined
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%
% a. accesible from the document
%
% \| The character |
% \begingreek Begin a group of greek text
% \endgreek End a group of greek text
% \greek A new language definition
% \gr switch to classical greek font
% \gbf switch to classical boldface font
% \git switch to classical italics font
% \gsl switch to classical slanted font
% \gtt switch to classical typewritter font
% \gt Greater than > symbol
% \lt Less than < symbol
% \math If we are using $ as del. it is equiv to $
% \setgreek Select greek mode to be the primary mode
% \setlatin Restore standard mode (at any stage)
% \showstring Log a string on the terminal
%
% b. Internal Control Sequences
%
% \gr@@kdelimsbar Use | as begin- and end-greek
% \gr@@kdelimsdol Use $ as begin- and end-greek
% \@ldend A copy of plain TeX's \end
% \@screen Screen Output for messages
% \t@f@nt Remembers greek font used last
% \t@f@m Remembers greek family used last
% \t@size Remembers greek point size used last
% \c@p Product Copyright Notice
% \grfam Greek classic font family register
% \grslfam Greek slanted font family register
% \grttfam Greek typewriter font family register
% \grbffam Greek boldface font family register
% \grifam Greek italics font family register
% \l@tinm@de Definition to restore plain TeX's mode
%
% Start Up Definitions
% --------------------
%
\ifx\gr@@kformatloaded\relax\catcode`\@=\active
\endinput\else\let\gr@@kformatloaded\relax\fi
\newif\ifdelimsbar\delimsbarfalse % Check for | as delimiter
\chardef\|=`\| % A way to access |
\gdef\t@f@nt{\tengr} % Remember font used last
\gdef\t@size{\grtenpoint} % Remember size used last
\gdef\t@f@m{\fam\grfam} % Remember family used last
% ^ THESE ARE INITIAL VALUES. DO NOT ALTER!
\newlanguage\greek % Define Greek as a new language
\def\lt{<} % Remember Less than
\def\gt{>} % and greater than signs
\language0 % Switch to default language
%
% Greek Font Bits
% _______________
%
% First we load the greek fonts and declare the families
% Then we define point sizes for typesetting greek texts
%
% Classic Greek Family
% ^^^^^^^^^^^^^^^^^^^^
\newfam\grfam
\font\tengr=kdgr10 % 10 point Classic Greek Font
\font\ninegr=kdgr9 % 9 point Classic Greek Font
\font\eightgr=kdgr8 % 8 point Classic Greek Font
\font\sixgr=kdgr8 at 6truept % 6 point simulated Classic Greek (x.75)
\def\gr{\tengr\fam\grfam}
%
% Slanted Greek Family
% ^^^^^^^^^^^^^^^^^^^^
\newfam\grslfam
\font\tengrsl=kdsl10 % 10 Point Slanted Greek Font
\font\ninegrsl=kdsl10 at 9truept% 9 point (sim.) Slanted Greek
\font\eightgrsl=kdsl10 at 8truept%8 point (sim.) Slanted Greek
\def\gsl{\tengrsl\fam\grslfam}
%
% Boldface Greek Family
% ^^^^^^^^^^^^^^^^^^^^^
\newfam\grbffam
\font\tengrbf=kdbf10 % 10 Point Boldface Greek Font
\font\ninegrbf=kdbf9 % 9 Point Boldface Greek
\font\eightgrbf=kdbf8 % 8 Point Boldface Greek
\def\gbf{\tengrbf\fam\grbffam}
%
% Italic Greek Family
% ^^^^^^^^^^^^^^^^^^^
\newfam\grifam
\font\tengri=kdti10 % 10 Point Italic Greek Font
\font\ninegri=kdti10 at 9truept % 9 Point (sim.) Italic Greek
\font\eightgri=kdti10 at 8truept% 8 Point (sim.) Italic Greek
\def\git{\tengri\fam\grifam}
%
% Typerwriter Greek Family
% ^^^^^^^^^^^^^^^^^^^^^^^^
\newfam\grttfam
\font\tengrtt=kdtt10 % 10 Point Typewritter Greek Font
\font\ninegrtt=kdtt10 at 9truept% 9 Point (sim.) Typewritter Greek
\font\eightgrtt=kdtt10 at 8truept% 8 Point (sim.) Typewritter Greek
\hyphenchar\eightgrtt=-1 \hyphenchar\tengrtt=-1
\hyphenchar\ninegrtt=-1 % Supress Hyphenation
\def\gtt{\tengrtt\fam\grttfam}
%
% Greek Point Size Conventions
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%
\def\grtenpoint{% GREEK TENPOINT
\gdef\t@size{\grtenpoint}% Make a note of the font size
\textfont\grfam=\tengr\scriptfont\grfam=\eightgr\scriptscriptfont\grfam=\sixgr%
\textfont\grbffam=\tengrbf\scriptfont\grbffam=\ninegrbf%
\textfont\grifam=\tengri\scriptfont\grbffam=\ninegri%
\textfont\grttfam=\tengrtt%
\textfont\grslfam=\tengrsl%
\def\gr{\fam\grfam\tengr}% Switch for classic greek
\let\rg\gr% Also rg for compatibility
\def\it{\fam\grifam\tengri}% Switch for Greek Italics
\def\sl{\fam\grslfam\tengrsl}% Switch for Greek Slanted
\def\tt{\fam\grttfam\tengrtt}% Switch for Greek Typerwriter
\def\bf{\fam\grbffam\tengrbf}% Switch for Greek Boldface
\let\git\it\let\gsl\sl%
\let\gbf\bf\let\gtt\tt% Retain LaTeX compatibility
\def\rm{\fam0\tenrm}% Switch For latin roman
\def\lit{\fam\itfam\tenit}% Switch for latin italics
\def\lsl{\fam\slfam\tensl}% Switch for latin slanted
\def\ltt{\fam\ttfam\tentt}% Switch for latin typewriter
\def\lbf{\fam\bffam\tenbf}% Switch for latin boldface
\normalbaselineskip=.6cm% Normal Base Line distance
\setbox\strutbox=\hbox{\vrule height8.5pt width0pt depth4.5pt}%
\normalbaselines\gr%
}
\def\grninepoint{% GREEK NINEPOINT
\gdef\t@size{\grninepoint}% Make a note of the font size
\textfont\grfam=\ninegr\scriptfont\grfam=\eightgr\scriptscriptfont\grfam=\sixgr%
\textfont\grbffam=\ninegrbf\scriptfont\grbffam=\eightgrbf%
\textfont\grifam=\ninegri\scriptfont\grbffam=\eightgri%
\textfont\grttfam=\ninegrtt%
\textfont\grslfam=\ninegrsl%
\def\gr{\fam\grfam\ninegr}% Switch for classic greek
\let\rg\gr% Also rg for compatibility
\def\it{\fam\grifam\ninegri}% Switch for Greek Italics
\def\sl{\fam\grslfam\ninegrsl}% Switch for Greek Slanted
\def\tt{\fam\grttfam\ninegrtt}% Switch for Greek Typerwriter
\def\bf{\fam\grbffam\ninegrbf}% Switch for Greek Boldface
\let\git\it\let\gsl\sl%
\let\gbf\bf\let\gtt\tt% Retain LaTeX compatibility
\def\rm{\fam0\tenrm}% Switch For latin roman
\def\lit{\fam\itfam\nineit}% Switch for latin italics
\def\lsl{\fam\slfam\ninesl}% Switch for latin slanted
\def\ltt{\fam\ttfam\ninett}% Switch for latin typewriter
\def\lbf{\fam\bffam\ninebf}% Switch for latin boldface
\normalbaselineskip=.52cm% Normal Base Line distance
\setbox\strutbox=\hbox{\vrule height8pt width0pt depth3pt}%
\normalbaselines\gr%
}
\def\greightpoint{% GREEK EIGHTPOINT
\gdef\t@size{\greightpoint}% Make a note of the font size
\textfont\grfam=\eightgr\scriptfont\grfam=\sixgr\scriptscriptfont\grfam=\sixgr%
\textfont\grbffam=\eightgrbf\scriptfont\grbffam=\eightgrbf%
\textfont\grifam=\eightgri\scriptfont\grbffam=\eightgri%
\textfont\grttfam=\eightgrtt%
\textfont\grslfam=\eightgrsl%
\def\gr{\fam\grfam\eightgr}% Switch for classic greek
\let\rg\gr% Also rg for compatibility
\def\it{\fam\grifam\eightgri}% Switch for Greek Italics
\def\sl{\fam\grslfam\eightgrsl}% Switch for Greek Slanted
\def\tt{\fam\grttfam\eightgrtt}% Switch for Greek Typerwriter
\def\bf{\fam\grbffam\eightgrbf}% Switch for Greek Boldface
\let\git\it\let\gsl\sl%
\let\gbf\bf\let\gtt\tt% Retain LaTeX compatibility
\def\rm{\fam0\eightrm}% Switch For latin roman
\def\lit{\fam\itfam\eightit}% Switch for latin italics
\def\lsl{\fam\slfam\eightsl}% Switch for latin slanted
\def\ltt{\fam\ttfam\eighttt}% Switch for latin typewriter
\def\lbf{\fam\bffam\eightbf}% Switch for latin boldface
\normalbaselineskip=.35cm% Normal Base Line distance
\setbox\strutbox=\hbox{\vrule height7pt width0pt depth2pt}%
\normalbaselines\gr%
}
%
% Macros For entering greek mode,
% and delimiter preferences.
% -------------------------------
%
% \begingreek : Begin a group of Greek Text.
% ^^^^^^^^^^^^ Everything is enclosed in a group to keep
% changes local. Then we switch to greek hyphenation
% and iniciate the greekmode. This assigns the correct
% \catcode values to punctuation and accentuation marks.
% We then reload the information of the point
% size used last and switch to the family needed.
% The \t@f@nt and \t@f@m macro is used to ensure that
% or fonts and families are remembered.
%
% \endgreek : Ends a group of Greek Text.
% ^^^^^^^^^^ Before ending the group we save information
% about the current font, to be used when we re-enter
% greek mode.
%
% \gr@@km@de : Switches to greek interpretation of ascii characters
% ^^^^^^^^^^^ Normally changes are kept local but can be used
% as a general macro to obtain a global greek mode.
% Note the different use of | if this is chosen
% to be a delimiter.
%
\def\begingreek{\bgroup\language\greek\gr@@km@de%
\t@size\t@f@m\t@f@nt\ignorespaces}
%
\def\endgreek{\xdef\t@f@nt{\the\font}\xdef\t@f@m{\noexpand\fam\the\fam}\egroup}
%
\def\gr@@km@de{%
\ifdelimsbar\else\catcode`\|=11\fi%
\catcode`\<=11% Turn Everything to letters!
\catcode`\>=11% All accents are done through ligatures
\catcode`\'=11%
\catcode`\`=11%
\catcode`\~=11%
\catcode`\"=11%
\lccode`\<=`\<%
\lccode`\>=`\>%
\lccode`\'=`\'%
\lccode`\~=`\~%
\lccode`\"=`\"%
}
%
\def\l@tinm@de{%
\catcode`\|=12%
\catcode`\<=12% Turn Everything to what plain tex has
\catcode`\>=12%
\catcode`\'=12%
\catcode`\`=12%
\catcode`\~=13%
\catcode`\"=12%
\catcode`\$=3% % Restore the math symbol!
}
%
% Switch Permenantly do greek mode
%
\def\setgreek{\delimsbarfalse\gr@@km@de\language\greek}
%
% and to latin as well
%
\def\setlatin{\l@tinm@de\language0}
%
% It is very frequent that the user will ask to \end the document
% before a greek group was closed. In order to prevent this we
% redefine the \end command after saving the old one in \@ldend.
% The new \end checks for un-ended greek groups and if it is found
% a warning message is issued and the group is automatically closed.
%
\let\@ldend=\end
\gdef\end{\ifnum\language=\greek\endgreek%
\showstring{GreekTeX Warning: A group of greek text was automatically closed}%
\fi\@ldend}
%
% Since it is possible that switching from one language to
% the other is very frequent, a special way to avoid \begingreek
% and \endgreek is defined. This is done through the definition of
% delimiters; available delims are | and $. If \greekdelims{bar}
% is chosen then a greek block is marked as | ..greek text.. |
% In order to access |, use \|.
% If $ is used, use \math for math mode and \math\math for
% display mode.
%
\gdef\greekdelims#1{\edef\c@mp@re{#1}\def\t@st@a{bar}\def\t@st@b{dollar}%
\ifx\c@mp@re\t@st@a\gr@@kdelimsbar\else%
\ifx\c@mp@re\t@st@b\gr@@kdelimsdol\fi\fi}
%
% Bar as delimeter
%
{\catcode`\|=13\gdef\gr@@kdelimsbar{\catcode`\|=13\delimsbartrue%
\def|{\ifnum\language=\greek\endgreek\else\begingreek\fi}}
}
%
% Dollar as delimiter
%
\let\m@thm@de=$
{\catcode`\$=13%
\gdef\gr@@kdelimsdol{\catcode`\$=13%
\def${\ifnum\language=\greek\endgreek\else\begingreek\fi}%
\global\let\math=\m@thm@de%
\gdef\display{\math\math}\gdef\enddisplay{\math\math}}%
}
%
\catcode`\@=12 % at signs are no longer letters
%
\def\fmtname{greek}\def\fmtversion{3.1} % identifies the current format
\endinput
|