summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/plain/pdcmac/magrmac.dtx
blob: 71f2dd83cfeb04e710f1a27bb43eeb18f26b01f8 (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
% magrmac.dtx -- documentation and source for magrmac.tex -*-tex-*-
        
%%%@TeX-document-file {
%%% title 	= "MAGRMAC.TEX -- Malvern Greek Macros",
%%% filename 	= "$texmf/doc/plain/pdcmac/magrmac.dtx",
%%% version 	= "$Revision: 1.3 $",
%%% package 	= "pdcmac 1.0",
%%% date 	= "$Date: 1995/03/29 16:32:24 $",
%%% author	= "P. Damian Cugley",
%%% email	= "damian.cugley@comlab.ox.ac.uk",
%%% address	= "Oxford University Computing Laboratory,"
%%%                Parks Road, Oxford  OX1 3QD, UK",
%%% abstract	= "This document describes and is the source code for 
%%%                the TeX definitions file magrmac.tex.
%%%                Running plain TeX on this file produces both the
%%%                definitions file and the printed documentation.",
%%% copyright	= "Copyright (c) 1991-1995 P. Damian Cugley",
%%% copying	= "This program is free software; you can redistribute
%%%		   it and/or modify it under the terms of the GNU
%%%		   General Public License as published by the Free
%%%		   Software Foundation; either version 2 of the License,
%%%		   or (at your option) any later version.",
%%% notice	= "This program is distributed in the hope that it will
%%%		   be useful, but WITHOUT ANY WARRANTY; without even the
%%%		   implied warranty of MERCHANTABILITY or FITNESS FOR A
%%%		   PARTICULAR PURPOSE.  See the GNU General Public
%%%		   License for more details.",
%%% notice	= "You should have received a copy of the GNU General
%%%		   Public License along with this program; if not, write
%%%		   to the Free Software Foundation, Inc., 675 Mass Ave,
%%%		   Cambridge, MA 02139, USA.",
%%% codetable	= "USASCII",
%%% dependencies = "pdccode.tex"
%%%}

%{{{ magrmac.dtx
%{{{  preamble

\relax
\input pdccode

\document
\rcs$Id: magrmac.dtx,v 1.3 1995/03/29 16:32:24 pdc Exp $\endrcs

\codefile{magrmac.tex}

%}}}  preamble
%{{{  introduction
\author{P. Dmaian Cugley}
\title{MAGRMAC---Malvern Greek Macros}

\section{Introduction}

	This document describes |magrmac.tex|, a small file of macros
	for setting Greek with Malvern~G fonts.  `Malvern~G' is the name
	of an encoding for typesetting Greek texts.  Malvern
	release~$1{\cdot}2$ has a collection of fonts ({\tt
	ma$XX$g$YY$}) which use this encoding.  The Levy and Dryllerakis
	fonts should work to an extent.

	The conventions for Malvern Greek text files are intended to be
	similar to those for K.~J.\ Dryllerakis's Greek\TeX\ (the
	`|kd|-' fonts), and will be most useful on computers where the
	operating system uses latin letters (as opposed to those which
	can display Greek letters on the screen).

	There is a brief guide for |magrmac.tex| called |magrman.tex|.
\notepar	
	These macros are not necessarily in final form and are not
	intended to be supported.  Use them at your own risk.  
\endnotepar

	The document you are reading is a plain \TeX\ file called
	|magrmac.dtx|.  This `documented \TeX\ macros'\footnote*{The
	suffix |dtx| is the same as files used to simlar effect in the
	\LaTeX~2e distribution.}  file produces the file `|magrmac.tex|'
	in the current directory, in addition to the usual |dvi| file.
	The code lines in the printed documentation are identical to
	those in the macros file.

%}}}  introduction
%{{{  file identification
\section{File identification}

	Nowadays, macro files start with some comments identifying the
	file, for the benefit of people wondering what the file is for.

\code
	\|\% magrmac.tex \fileversion~\filedate~-- Malvern Greek Macros
	|%%%@TeX-definition-file {
	|%%% filename       = "$texmf/tex/plain/pdcmac/magrmac.tex",
	\|\%\%\% version~~~~~~~~= "\fileversion",
	\|\%\%\% date~~~~~~~~~~~= "\filedate",
	|%%% package        = "pdcmac 1.0",
	|%%% author         = "P. Damian Cugley",
	|%%% email          = "damian.cugley@comlab.ox.ac.uk",
	|%%% address        = "Oxford University Computing Laboratory,
	|%%%                   Parks Road, Oxford  OX1 3QD, UK",
	|%%% codetable      = "USASCII",
	|%%% keywords       = "TeX, plain TeX, Malvern, Greek, macros",
	|%%% supported      = "Maybe",
	|%%% abstract       = "Macros for using Malvern Greek fonts.  
	|%%%                   This file was generated by running
	|%%%                   plain TeX on magrmac.dtx",
	|%%% copyright      = "Copyright (c) 1991-1995 P. Damian Cugley",
	|%%% copying        = "DO NOT DISTRIBUTE THIS FILE.
	|%%%                   Distribute magrmac.dtx only as part of the
	|%%%                   package it came in.",
	|%%% dependencies   = "",
	|%%%}
	|
	\|\\message\{\fileversion~\filedate\}
	|
\endcode
%}}}  file identification
%{{{  greek mode
\section{Greek Mode}

	The Greek Mode is started with |\begingreek| for compatibility
	with the precedent of Greek\TeX\ and Levy's original Greek
	macros.\footnote*{The conventions of PDCFMT2 would suggest
	|\greek|\dots|\endgreek| but (besides being incompatible with
	existing Greek macros) it is probable that the hyphenation table
	code (|\language| code) for Greek would be called |\greek|,
	based on the names I~have seen used.}

	The token register |\everygreek| is expanded each time we enter
	Greek mode.  At a minimum it should contain a command to select
	an appropriate Greek font.
\code
	|\newtoks\everygreek
	|\chardef\other=12
\smallbreak
	|\def\begingreek{%
	|    \begingroup
	|    \catcode`\~\other \catcode`\|\other \catcode`\"\other
	|    \the\everygreek
	|}
\smallbreak
	|\let\endgreek=\endgroup
\endcode
%}}}  greek mode
\section{Customization}
%{{{  lunate sigma, curly phi

\subsec{Lunate sigma}

	The macro |\grlunatesigma| belongs in |\everygreek|.  It makes
	|s| an active char expanding to |c|.  A certain amount of
	jiggery-pokery is required because making |s| active makes it
	impossible to use the name |\grlunatesigma|!

\code
	|\toksdef\toksa=0
\smallbreak
	|\begingroup \let\\=\toksa \catcode`\s=13 \catcode`\S=13 \\={\endgroup
	|    \def\tmp{%
	|        \catcode`\s\active \chardef s`c
	|        \catcode`\S\active \chardef S`C
	|    }
	|}\the\\
	|\let\grlunatesigma=\tmp
\endcode

\subsec{Variant phi}

	In the end I~make the two-stroke phi $\phi$ the default one,
	with $\varphi$ as the `variant', for compatibility with plain
	\TeX.  
\code
	|\chardef\ninetytwo=92
\smallbreak
	|\begingroup \uccode`\~=`f \uppercase{\toksa={\endgroup
	|    \def\grvarphi{%
	|        \catcode`\f\active \chardef~\ninetytwo
	|    }
	|}} \the\toksa
\endcode
%}}}  lunate sigma
%{{{  accent

\subsec{One-accent Greek}

	The |\monotonik| macro makes all the accent characters generate
	the modern symmetrical accent, while the breathings and iota
	subscript do nothing.
\code
	|\begingroup \catcode`\<=\active \catcode`\>=\active 
	|        \catcode`\'=\active \catcode`\`=\active \toksa={\endgroup
	|    \def\monotoniko{%
	|        \catcode\lq\'\active \chardef'3  
	|        \catcode\lq\`\active \chardef`3 
	|        \catcode\lq\~\active \chardef~3
	|        \catcode\lq\<\active \let<\relax
	|        \catcode\lq\>\active \let>\relax
	|        \catcode\lq\|\active \let|\relax
	|    }
	|}\the\toksa
\smallbreak
	|\def\plutoniko{%
	|    \catcode`\'\other \catcode`\`\other \catcode`\~\other
	|    \catcode`\<\other \catcode`\>\other \catcode`\|\other
	|}
\endcode
%}}}  accent
%{{{  define delims

\subsec{Choose shorthand delimiters for Greek Mode}

	Define |#1| to be a `greek shift' in the way |$| is a maths
	shift.  Like |$|, |#1| will stand for either |\begingreek| or
	|\endgreek| as required.  |#1| must be a one-character control
	sequence (as might be used after |`|).
\code
	|\def\grdelimiter#1{
	|    \begingroup \uccode`~=`#1 \uppercase{\toksa={\endgroup
	|        \def~{\begingreek \let~\endgreek}
	|    }} \the\toksa
	|}
\endcode

%}}}  define delims
\endcodefile
\enddocument
\bye
%}}} macros for greek

% Local variables:
% fold-folded-p: t
% tex-macros-p: t
% End: