summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/kdgreek/209/greek.sty
blob: eb7fd239dd6c6927d3d5c83732b212ac12e5e25b (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
%NAME: greek.sty
%
% GREEK.STY Greek Style For LaTeX Files and KD family of greek fonts
% ~~~~~~~~~
%
\typeout{Document Style Option `greek' <Dec 7,1992>}
\ifx\gr@@kformatloaded\relax\def\d@next{\endinput}
 \else
   \let\gr@@kformatloaded\relax
   \def\d@next{}
\fi
\d@next
%
\newif\ifdelimsbar\delimsbarfalse       % Check for | as delimiter
\chardef\|=`\|                          % A way to access |
\gdef\t@f@nt{\gr}                    	% Remember font used last
\gdef\t@f@m{\fam\grfam}			% Remember family used last
\newlanguage\greek                      % Define Greek as a new language
\def\lt{<}                              % Remember Less than
\def\gt{>}                              % and greater than signs

\def\gr@@km@de{%
\ifdelimsbar\else\catcode`\|=11\fi%	This is to allow the use of | as iota
\catcode`\<=11%
\catcode`\>=11%
\catcode`\'=11%
\catcode`\`=11%
\catcode`\~=11%
\catcode`\"=11%
\lccode`\<=`\<%
\lccode`\>=`\>%
\lccode`\'=`\'%
\lccode`\~=`\~%
\lccode`\"=`\"%
}

\def\l@tinm@de{
\catcode`\<=12%
\catcode`\>=12%
\catcode`\'=12%
\catcode`\`=12%
\catcode`\~=12%
\catcode`\"=12%
}
%
% Create a new LaTeX Environment
%
\newenvironment{greektext}{\language\greek\gr@@km@de%
\t@f@m\t@f@nt\ignorespaces}%
{\xdef\t@f@nt{\the\font}\xdef\t@f@m{\noexpand\fam\the\fam}}

\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\end{greektext}\else\begin{greektext}\fi}}
}
%
%       Dollar as delimiter
%
\let\m@thm@de=$
{\catcode`\$=13%
\gdef\gr@@kdelimsdol{\catcode`\$=13%
\def${\ifnum\language=\greek\end{greektext}\else\begin{greektext}\fi}%
\global\let\math=\m@thm@de%
\gdef\display{\math\math}\gdef\enddisplay{\math\math}}%
}

\input grfonts.tex
%% End of greek.sty