]> git.donarmstrong.com Git - lib.git/blobdiff - texmf/metafont/kelly/greek.sty
added texmf
[lib.git] / texmf / metafont / kelly / greek.sty
diff --git a/texmf/metafont/kelly/greek.sty b/texmf/metafont/kelly/greek.sty
new file mode 100644 (file)
index 0000000..bdb1487
--- /dev/null
@@ -0,0 +1,217 @@
+%
+% GREEK.STY - 14-SEP-1988
+% ~~~~~~~~~
+%
+% Allow LaTeX to use BHK's Greek fonts
+%
+% \gr   -  greek
+% \grbf -  greek bold-face
+% \grit -  greek italic
+% \grtt -  greek typewriter
+% 
+%
+% AUTHORS:     Brian Hamilton Kelly & Niel Kempson,
+%              School of Electrical Engineering and Science,
+%              Royal Military College of Science,
+%              Shrivenham,
+%              SWINDON 
+%              SN6 8LA
+%              ENGLAND
+%
+% Telephone:   (+793) 785687 / 785252
+% JANET:       rm001a@uk.ac.cranfield.cdvc
+%
+
+%
+% The fonts are loaded on demand, but don't demand too many or LaTeX
+% will exhaust its font memory.
+%
+
+% Need special definition of \@getfont that includes call of \gracc
+% after invocation of the font
+%
+\def\gr@getfont#1#2#3#4{\@ifundefined{\string #1\string #3}{\global\expandafter
+    \font \csname \string #1\string #3\endcsname #4\relax 
+     \@addfontinfo#3{\textfont #2\csname \string #1\string #3\endcsname 
+     \scriptfont #2\csname \string #1\string #3\endcsname 
+     \scriptscriptfont #2\csname \string #1\string #3\endcsname 
+     \def#1{\fam #2\csname\string #1\string #3\endcsname\@prtct\gracc}}}{}#3#1}
+
+% Following section is beginnings of attempt to make this style option
+% work with SliTeX too.   Further work is awaiting the rewriting of SFONTS.TEX
+% to use similar naming scheme, load-on-demand, etc as LFONTS.TEX --- I expect
+% to get around to that someday!!
+%
+\@ifundefined{@xivpt}{% This must be running under SliTeX
+    \let\@prtct=\relax
+
+    \def\@addfontinfo#1#2{{\def\@prtct{\noexpand\@prtct\noexpand}\def\def{\noexpand
+       \def\noexpand}\xdef#1{#1#2}}}
+
+    \def\@nohyphens#1#2{\global\expandafter \hyphenchar\csname 
+       \string #1\string #2\endcsname \m@ne}
+
+    \def\@subfont#1#2{\@warning{No \string#1\space typeface in 
+           this size, using \string#2}#2}
+
+    \def\@vpt{}
+    \def\@vipt{}
+    \def\@viipt{}
+    \def\@viiipt{}
+    \def\@ixpt{}
+    \def\@xpt{}
+    \def\@xipt{}
+    \def\@xiipt{}
+    \let\@xivpt=\fourteenpt
+    \let\@xviipt=\seventeenpt
+    \let\@xxpt=\twentypt
+    \let\@xxvpt=\twentyfourpt
+    \let\@xxixpt=\twentyninept
+    \let\@xxxivpt=\thirtyfourpt
+    \let\@xlipt=\fourtyonept}{%
+    \relax
+}
+
+% These are the font changing commands used by the ``public''
+%
+\def\gr{\protect\pgr}
+\def\grbf{\protect\pgrbf}
+\def\grit{\protect\pgrit}
+\def\grtt{\protect\pgrtt}
+
+% These macros just save a little space for the repeated font names
+%
+\def\gr@@k{cmg10}
+\def\gr@@kb{cmgb10}
+\def\gr@@ki{cmgi10}
+\def\gr@@kt{cmgtt10}
+
+% This macro has to be invoked every time we switch to a Greek font; it
+% defines \s to be the variant of \sigma used at the ends of words
+%
+\def\gracc{\chardef\s="D }  % NB Space after <hexnumber> is essential
+
+% Define families of Greek fonts
+%
+\newfam\grfam
+\newfam\grbfam
+\newfam\grifam
+\newfam\grtfam
+
+% Now add commands to each LaTeX size changing command which defines
+% the Greek font selections to invoke macros which load the font ``on
+% demand''.
+%
+\@addfontinfo\@vpt{\def\pgr{\@prtct\gr@vpt}%
+                   \def\pgrbf{\@prtct\grb@vpt}%
+                  \def\pgrit{\@prtct\gri@vpt}%
+                  \def\pgrtt{\@prtct\grt@vpt}}
+\@addfontinfo\@vipt{\def\pgr{\@prtct\gr@vipt}%
+                    \def\pgrbf{\@prtct\grb@vipt}%
+                   \def\pgrit{\@prtct\gri@vipt}%
+                   \def\pgrtt{\@prtct\grt@vipt}}
+\@addfontinfo\@viipt{\def\pgr{\@prtct\gr@viipt}%
+                     \def\pgrbf{\@prtct\grb@viipt}%
+                    \def\pgrit{\@prtct\gri@viipt}%
+                    \def\pgrtt{\@prtct\grt@viipt}}
+\@addfontinfo\@viiipt{\def\pgr{\@prtct\gr@viiipt}%
+                      \def\pgrbf{\@prtct\grb@viiipt}%
+                     \def\pgrit{\@prtct\gri@viiipt}%
+                     \def\pgrtt{\@prtct\grt@viiipt}}
+\@addfontinfo\@ixpt{\def\pgr{\@prtct\gr@ixpt}%
+                    \def\pgrbf{\@prtct\grb@ixpt}%
+                   \def\pgrit{\@prtct\gri@ixpt}%
+                   \def\pgrtt{\@prtct\grt@ixpt}}
+\@addfontinfo\@xpt{\def\pgr{\@prtct\gr@xpt}%
+                  \def\pgrbf{\@prtct\grb@xpt}%
+                  \def\pgrit{\@prtct\gri@xpt}%
+                  \def\pgrtt{\@prtct\grt@xpt}}
+\@addfontinfo\@xipt{\def\pgr{\@prtct\gr@xipt}%
+                    \def\pgrbf{\@prtct\grb@xipt}%
+                   \def\pgrit{\@prtct\gri@xipt}%
+                   \def\pgrtt{\@prtct\grt@xipt}}
+\@addfontinfo\@xiipt{\def\pgr{\@prtct\gr@xiipt}%
+                     \def\pgrbf{\@prtct\grb@xiipt}%
+                    \def\pgrit{\@prtct\gri@xiipt}%
+                    \def\pgrtt{\@prtct\grt@xiipt}}
+\@addfontinfo\@xivpt{\def\pgr{\@prtct\gr@xivpt}%
+                     \def\pgrbf{\@prtct\grb@xivpt}%
+                    \def\pgrit{\@prtct\gri@xivpt}%
+                    \def\pgrtt{\@prtct\grt@xivpt}}
+\@addfontinfo\@xviipt{\def\pgr{\@prtct\gr@xviipt}%
+                      \def\pgrbf{\@prtct\grb@xviipt}%
+                     \def\pgrit{\@prtct\gri@xviipt}%
+                     \def\pgrtt{\@prtct\grt@xviipt}}
+\@addfontinfo\@xxpt{\def\pgr{\@prtct\gr@xxpt}%
+                    \def\pgrbf{\@prtct\grb@xxpt}%
+                   \def\pgrit{\@prtct\gri@xxpt}%
+                   \def\pgrtt{\@prtct\grt@xxpt}}
+\@addfontinfo\@xxvpt{\def\pgr{\@prtct\gr@xxvpt}%
+                     \def\pgrbf{\@prtct\grb@xxvpt}%
+                    \def\pgrit{\@prtct\gri@xxvpt}%
+                    \def\pgrtt{\@prtct\grt@xxvpt}}
+
+% Finally, we can define WHICH fonts are to be loaded on demand.
+%
+\def\gr@vpt{\@subfont\gr\rm}
+\def\gr@vipt{\gr@getfont\pgr\grfam\@vipt{\gr@@k\@ptscale6}}
+\def\gr@viipt{\gr@getfont\pgr\grfam\@viipt{\gr@@k\@ptscale7}}
+\def\gr@viiipt{\gr@getfont\pgr\grfam\@viiipt{\gr@@k\@ptscale8}}
+\def\gr@ixpt{\gr@getfont\pgr\grfam\@ixpt{\gr@@k\@ptscale9}}
+\def\gr@xpt{\gr@getfont\pgr\grfam\@xpt{\gr@@k}}
+\def\gr@xipt{\gr@getfont\pgr\grfam\@xipt{\gr@@k\@halfmag}}
+\def\gr@xiipt{\gr@getfont\pgr\grfam\@xiipt{\gr@@k\@magscale1}}
+\def\gr@xivpt{\gr@getfont\pgr\grfam\@xivpt{\gr@@k\@magscale2}}
+\def\gr@xviipt{\gr@getfont\pgr\grfam\@xviipt{\gr@@k\@magscale3}}
+\def\gr@xxpt{\gr@getfont\pgr\grfam\@xxpt{\gr@@k\@magscale4}}
+\def\gr@xxvpt{\gr@getfont\pgr\grfam\@xxvpt{\gr@@k\@magscale5}}
+
+\def\grb@vpt{\@subfont\grbf\bf}
+\def\grb@vipt{\gr@getfont\pgrbf\grbfam\@vipt{\@gr@@kb\@ptscale6}}
+\def\grb@viipt{\gr@getfont\pgrbf\grbfam\@viipt{\gr@@kb\@ptscale7}}
+\def\grb@viiipt{\gr@getfont\pgrbf\grbfam\@viiipt{\gr@@kb\@ptscale8}}
+\def\grb@ixpt{\gr@getfont\pgrbf\grbfam\@ixpt{\gr@@kb\@ptscale9}}
+\def\grb@xpt{\gr@getfont\pgrbf\grbfam\@xpt{\gr@@kb}}
+\def\grb@xipt{\gr@getfont\pgrbf\grbfam\@xipt{\gr@@kb\@halfmag}}
+\def\grb@xiipt{\gr@getfont\pgrbf\grbfam\@xiipt{\gr@@kb\@magscale1}}
+\def\grb@xivpt{\gr@getfont\pgrbf\grbfam\@xivpt{\gr@@kb\@magscale2}}
+\def\grb@xviipt{\gr@getfont\pgrbf\grbfam\@xviipt{\gr@@kb\@magscale3}}
+\def\grb@xxpt{\gr@getfont\pgrbf\grbfam\@xxpt{\gr@@kb\@magscale4}}
+\def\grb@xxvpt{\gr@getfont\pgrbf\grbfam\@xxvpt{\gr@@kb\@magscale5}}
+
+\def\gri@vpt{\@subfont\grit\it}
+\def\gri@vipt{\gr@getfont\pgrit\grifam\@vipt{\gr@@ki\@ptscale6}}
+\def\gri@viipt{\gr@getfont\pgrit\grifam\@viipt{\gr@@ki\@ptscale7}}
+\def\gri@viiipt{\gr@getfont\pgrit\grifam\@viiipt{\gr@@ki\@ptscale8}}
+\def\gri@ixpt{\gr@getfont\pgrit\grifam\@ixpt{\gr@@ki\@ptscale9}}
+\def\gri@xpt{\gr@getfont\pgrit\grifam\@xpt{\gr@@ki}}
+\def\gri@xipt{\gr@getfont\pgrit\grifam\@xipt{\gr@@ki\@halfmag}}
+\def\gri@xiipt{\gr@getfont\pgrit\grifam\@xiipt{\gr@@ki\@magscale1}}
+\def\gri@xivpt{\gr@getfont\pgrit\grifam\@xivpt{\gr@@ki\@magscale2}}
+\def\gri@xviipt{\gr@getfont\pgrit\grifam\@xviipt{\gr@@ki\@magscale3}}
+\def\gri@xxpt{\gr@getfont\pgrit\grifam\@xxpt{\gr@@ki\@magscale4}}
+\def\gri@xxvpt{\gr@getfont\pgrit\grifam\@xxvpt{\gr@@ki\@magscale5}}
+
+\def\grt@vpt{\@subfont\grtt\tt}
+\def\grt@vipt{\gr@getfont\pgrtt\grtfam\@vipt{\gr@@kt\@ptscale6}%
+         \@nohyphens\pgrtt\@vipt}
+\def\grt@viipt{\gr@getfont\pgrtt\grtfam\@viipt{\gr@@kt\@ptscale7}%
+         \@nohyphens\pgrtt\@viipt}
+\def\grt@viiipt{\gr@getfont\pgrtt\grtfam\@viiipt{\gr@@kt\@ptscale8}%
+         \@nohyphens\pgrtt\@viiipt}
+\def\grt@ixpt{\gr@getfont\pgrtt\grtfam\@ixpt{\gr@@kt\@ptscale9}%
+         \@nohyphens\pgrtt\@ixpt}
+\def\grt@xpt{\gr@getfont\pgrtt\grtfam\@xpt{\gr@@kt}%
+         \@nohyphens\pgrtt\@xpt}
+\def\grt@xipt{\gr@getfont\pgrtt\grtfam\@xipt{\gr@@kt\@halfmag}%
+         \@nohyphens\pgrtt\@xipt}
+\def\grt@xiipt{\gr@getfont\pgrtt\grtfam\@xiipt{\gr@@kt\@magscale1}%
+         \@nohyphens\pgrtt\@xiipt}
+\def\grt@xivpt{\gr@getfont\pgrtt\grtfam\@xivpt{\gr@@kt\@magscale2}%
+         \@nohyphens\pgrtt\@xivpt}
+\def\grt@xviipt{\gr@getfont\pgrtt\grtfam\@xviipt{\gr@@kt\@magscale3}%
+         \@nohyphens\pgrtt\@xviipt}
+\def\grt@xxpt{\gr@getfont\pgrtt\grtfam\@xxpt{\gr@@kt\@magscale4}%
+         \@nohyphens\pgrtt\@xxpt}
+\def\grt@xxvpt{\gr@getfont\pgrtt\grtfam\@xxvpt{\gr@@kt\@magscale5}%
+         \@nohyphens\pgrtt\@xxvpt}