MAGRMAC—Malvern Greek Macros

Version 1.3, last changed pdc 1995–03–29

P. Dmaian Cugley

1. 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·2 has a collection of fonts (maXXgY Y) 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 GreekTEX (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.

Note These macros are not necessarily in final form and are not intended to be supported. Use them at your own risk.

The document you are reading is a plain TEX file called magrmac.dtx. This ‘documented TEX macros’* 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.

2. File identification

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

 1 % magrmac.tex 1.3 1995/03/29 -- Malvern Greek Macros
 2 %%%@TeX-definition-file {
 3 %%% filename       = "$texmf/tex/plain/pdcmac/magrmac.tex",
 4 %%% version        = "1.3",
 5 %%% date           = "1995/03/29",
 6 %%% package        = "pdcmac 1.0",
 7 %%% author         = "P. Damian Cugley",
 8 %%% email          = "damian.cugley@comlab.ox.ac.uk",
 9 %%% address        = "Oxford University Computing Laboratory,
10 %%%                   Parks Road, Oxford  OX1 3QD, UK",
11 %%% codetable      = "USASCII",
12 %%% keywords       = "TeX, plain TeX, Malvern, Greek, macros",
13 %%% supported      = "Maybe",
14 %%% abstract       = "Macros for using Malvern Greek fonts.
15 %%%                   This file was generated by running
16 %%%                   plain TeX on magrmac.dtx",
17 %%% copyright      = "Copyright (c) 1991-1995 P. Damian Cugley",
18 %%% copying        = "DO NOT DISTRIBUTE THIS FILE.
19 %%%                   Distribute magrmac.dtx only as part of the
20 %%%                   package it came in.",
21 %%% dependencies   = "",
22 %%%}

23

24 \message{1.3 1995/03/29}

25

* The suffix dtx is the same as files used to simlar effect in the LaTEX 2e distribution.

26–58 MAGRMAC—Malvern Greek Macros 1.3 1995–03–29

3. Greek Mode

The Greek Mode is started with \begingreek for compatibility with the precedent of GreekTEX and Levy’s original Greek macros.*

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.

26 \newtoks\everygreek
27 \chardef\other=12
28 \def\begingreek{%
29  \begingroup
30  \catcode` \~\other \catcode` \|\other \catcode` \"\other
31  \the\everygreek

32 }

33 \let\endgreek=\endgroup

4. Customization

4.1. 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!

34 \toksdef\toksa=0
35 \begingroup \let\\=\toksa \catcode` \s=13 \catcode` \S=13 \\={\endgroup
36  \def\tmp{%
37  \catcode` \s\active \chardef s` c
38  \catcode` \S\active \chardef S` C

39 }

40 }\the\\
41 \let\grlunatesigma=\tmp

4.2. Variant phi In the end I make the two-stroke phi ϕ the default one, with φ as the ‘variant’, for compatibility with plain TEX.

42 \chardef\ninetytwo=92
43 \begingroup \uccode` \~=` f \uppercase{\toksa={\endgroup
44  \def\grvarphi{%
45  \catcode` \f\active \chardef~\ninetytwo

46 }

47 }} \the\toksa

4.3. One-accent Greek The \monotonik macro makes all the accent characters generate the modern symmetrical accent, while the breathings and iota subscript do nothing.

48 \begingroup \catcode` \<=\active \catcode` \>=\active
49  \catcode` \´ =\active \catcode` \` =\active \toksa={\endgroup
50  \def\monotoniko{%
51  \catcode\lq\´ \active \chardef´ 3
52  \catcode\lq\` \active \chardef` 3
53  \catcode\lq\~\active \chardef~3
54  \catcode\lq\<\active \let<\relax
55  \catcode\lq\>\active \let>\relax
56  \catcode\lq\|\active \let|\relax

57 }

58 }\the\toksa

* The conventions of PDCFMT2 would suggest \greek… \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.

59 \def\plutoniko{%
60  \catcode` \´ \other \catcode` \` \other \catcode` \~\other
61  \catcode` \<\other \catcode` \>\other \catcode` \|\other

62 }

4.4. 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 ` ).

63 \def\grdelimiter#1{
64  \begingroup \uccode` ~=` #1 \uppercase{\toksa={\endgroup
65  \def~{\begingreek \let~\endgreek}
66  }} \the\toksa

67 }