0. ABSTRACT

This package is intended for  Greek Linux users wishing  to read and  write
Greek in an easy, DOSsy way on their Linux consoles.

Greek  Support does not  include fonts  for X,  [La]TeX, or anything  else,
apart from the text-based Linux console.

This version of Greek  Support knows about the  ISO-8859-7 encoding as well
as the traditionally used 437G. Read on.

Read the file COPYING for your license agreement.


1. INCLUDED FILES

This is a list of the included files:

INSTALL                 Tells you to run install.greek. :-)
KEYS                    A quick reference with the used keys
README                  You're reading me already!

437G                    Greek Support for the 437G encoding
437G/TEST.GREEK            A test message in Greek
437G/greek.map             Greek keymap with a few extra tricks.
437G/grk8x11-437G.fnt      A Greek 8x11 font.
437G/grk8x8-437G.fnt       Likewise, an 8x8 font.
437G/grk9x14-437G.fnt      9x14 Greek font.
437G/grk9x16-437G.fnt      9x16 Greek font.
437G/grk9x16mdv-437G.fnt   9x16 'Medieval' font with Greek characters.
437G/trivial               Trivial translation table, ideal for Greek chr sets!

ISO                     Greek Support for the ISO-8859 encoding
437G/TEST.GREEK            A test message in Greek
437G/greek.map             Greek keymap with a few extra tricks.
437G/grk8x11-437G.fnt      A Greek 8x11 font.
437G/grk8x8-437G.fnt       Likewise, an 8x8 font.
437G/grk9x14-437G.fnt      9x14 Greek font.
437G/grk9x16-437G.fnt      9x16 Greek font.
437G/grk9x16mdv-437G.fnt   9x16 'Medieval' font with Greek characters.
437G/trivial               Trivial translation table, ideal for Greek chr sets!

fontconviso             Script that converts a 437G VGA raw font into the ISO
                          encoding.
gren                    Script that enables Greek support for the console.
grdis                   Script that disables Greek support for the console.
greek20.lsm             Linux Software Map entry for this package.
install.greek           Run this one to install the package.
reset                   Modified version of reset(1).



2. WHAT TO DO

  OK... To make your system support Greek, you need to

(a). Load a Greek keymap  file. This will enable you  to switch from QWERTY
     to Greek  keyboard and vice versa.   It also gives you some additional
     goodies about which we will talk later on.

(b). Make your system  DISPLAY what  you type, i.e.  load  the  appropriate
     translation table.

(c). Load a Greek font so you can SEE what you type, as well.

(d). Make sure the above don't go away when the terminal is being reset.


2.1. THE GREEK KEYMAP (greek.map)

  Features:

  * Switch QWERTY<-->GREEK    using a   simple  key combination   (default:
     Alt-Enter)
  * Temporary switch while pressing AltGr key (right Alt key).
  * Full-featured standard US key map used as the normal mode of operation
  * Greek typewriter keymap (code page 437G or standard ISO-8859-7)
  * Capital & lower case Greek letters. 
  * Accents (tonoi) on lower case letters.
  * Diaereses (dialytika) on lower case iota and upsilon.
  * Compose key combinations yielding frame drawing characters and graphics
    (437G only).

  New features for version 2.0:

  * Support for new(ish) keyboard features, like the SAK (Secure Attention
    Key), Relative virtual console switching, etc.
  * Alt + numeric   keypad may  be  used  for entering  ASCII codes  as  in
    DOS/Win.
  * Support for Windows keyboards (bletch) -- uses the extra three keys.
  * Defines 72 function keys with different modifier combinations.
  * Defines 36 virtual console keys.
  * Fixes lots of little annoying bugs.


The keymap starts  in  Latin mode, so you  probably  won't notice  anything
unless you know what you're doing. :-)

Pressing Alt-Enter  (only the left Alt  key works for that purpose) toggles
Greek mode. In  Greek mode, everything except the  alphabetic keys and  the
semicolon-colon  key works   normally. The  alphabetic  keys,  however, are
remapped like this:


Q       W       E       R       T       Y       U       I       O       P
*    sigma**  epsilon  rho     tau   upsilon  theta    iota  omicron   pi

  A       S       D       F       G       H       J       K       L       ;
alpha   sigma   delta    phi    gamma    eta     xi     kappa   lambda   ***

    Z       X       C       V       B       N       M
   zeta    chi     psi    omega   beta      nu      mu


*: This works just like the colon/semicolon key when in Greek mode
**: This is the version of sigma used to end words with.
***: Pressing this (semicolon) key will add an accent to the next lower case
     vowel key pressed. Typing a colon (shift+key) will add a diaeresis symbol
     to the next character, if possible. Upper case accented characters are
     not supported yet.
  
Characters that can  be accented are  lower case alpha, epsilon, eta, iota,
omicron,  upsilon  and omega. Of them,  only  iota and  upsilon  may have a
diaeresis sign.

You can temporarily  switch to  the Greek  set  by holding  down the  AltGr
(Right Alt key) while typing. If you're already in the Greek mapping, AltGr
will temporarily switch you back to the Latin mapping.

Another interesting feature  of the keymap is its  ability to allow the use
of the IBM extended ASCII  graphics characters (only using the non-standard
encoding 437G). Since Greek keyboards don't use the compose  key, we use it
to form   these characters. Unfortunately,   on the AT keyboard,  AltGr was
normally used as the Compose key. We use AltGr as the Greek<->Latin switch,
so we have to find some alternatives:

  * The US mapping defines Ctrl-. (period) to be the compose key. It works
    here, as well.

  * The Windows  'menu' key (left of the  right  Ctrl key) is  your compose
    key, if you use a Windows keyboard.

  * In case you don't have such a convenient dead key, I've also mapped the
    Compose function to Ctrl-CapsLock.

To output a graphics character, you work like this (remember, this does NOT
work  under   ISO-8859-7,  since it   does not  leave   space  for graphics
characters).

  To draw frame characters:

Compose + <setchar> + <diamond>, where

<setchar> = 'q' or 'a' (or upper case versions).
<diamond> = one of the following characters:       w   e   r         o = -
                                                    s   d   f   OR   p = |
                                                     x   c   v

Compose + 'q' + lower case diamond characters -> single frame characters
Compose + 'q' + upper case diamond characters -> double frame characters

Compose + 'a' + lower case diamond -> horizontal double, vertical single
Compose + 'a' + upper case diamond -> horizontal single, vertical double


  To draw other characters:

Compose + 'z' + '1' = 25% grey block    ('')
Compose + 'z' + '2' = 50% grey block    ('')
Compose + 'z' + '3' = 75% grey block    ('')
Compose + 'z' + '4' = solid block       ('')
Compose + 'z' + '5' = bottom half block ('')
Compose + 'z' + '6' = left half block   ('')
Compose + 'z' + '7' = right half block  ('')
Compose + 'z' + '8' = top half block    ('')
Compose + 'z' + '9' = degrees           ('')
Compose + 'z' + '-' = small dot         ('')
Compose + 'z' + '=' = square root       ('')
Compose + 'z' + '\' = small box         ('') 


2.2. TRANSLATION TABLES

Normally, all  you'd need  would  be this keymap  file.  Unfortunately, the
Linux console driver  contains  four  character translation tables.     The
default one, LATIN-1 (ISO-8859-1)   does some funny  character translations
for ASCII characters >   128 and so you won't   be able to see anything  in
Greek.
 
To fix this,  a simple character map table  is provided. This character map
is loaded into the user   translation table of  the  console driver.   This
doesn't require a  kernel recompilation or anything  as  guru-like as that,
but you'll probably  have to reload the table  every time you  do a console
reset (<esc>c), as well as at boot time (See 2.3 for possible ways to patch
this up).

I've included a translation table (aka character map table, or whatever) by
the  name of   trivial,  which    leaves   all  the  >128  'ASCII'    codes
unchanged. Actually,  this    file   was in  my      Slackware distribution
(/usr/lib/kbd/consoletrans/trivial). It did have  a small problem,  though,
which I've corrected (char 0x9b was mapped to 0x9f by mistake).

There is  also a shell  script called gren  (Greek enable), which loads the
9x16 Greek font, the  Greek keymap, and switches  all consoles to the  user
translation table (you'll have to tell it whether you need  the 437G or ISO
encoding).

Another shell  script, grdis (Greek disable), negates  the effects of gren,
and forces the system back to the LATIN-1 character set, with a default 437
font and a US keyboard map.


2.3. GREEK FONTS

Two sets of  fonts are included. Each set  contains a Greek font in various
dimensions  (8x8, 8x11, 8  or 9x14  and 8 or  9x16). One  set contains 437G
compliant fonts; the other has ISO fonts.

There is a utility script, fontconviso, to convert  a standard raw VGA font
from the 437G to the ISO-8859-7 encoding.

Here are the   upper  128  characters  of  the  437G  Greek  character  set
(characters below 127 are standard ASCII):

        8       9       A       B       C       D       E       F
0       ALPHA   RHO     iota    *       *       *      omega    OMEGA'
1       BETA    SIGMA   kappa   *       *       *      alpha'   *
2       GAMMA   TAU     lambda  *       *       *      epsilon' *
3       DELTA   UPSILON mu      *       *       *      eta'     *
4       EPSILON PHI     nu      *       *       *      iota"    *
5       ZETA    CHI     xi      *       *       *      iota'    *
6       ETA     PSI     omicron *       *       *      omicron' *
7       THETA   OMEGA   pi      *       *       *      upsilon' *
8       IOTA    alpha   rho     *       *       *      upsilon" *
9       KAPPA   beta    sigma   *       *       *      omega'   *
A       LAMBDA  gamma   sigma2  *       *       *      ALPHA'   *
B       MU      delta   tau     *       *       *      EPSILON' *
C       NU      epsilon upsilon *       *       *      ETA'     *
D       XI      zeta    phi     *       *       *      IOTA'    *
E       OMICRON eta     chi     *       *       *      OMICRON' *
F       PI      theta   psi     *       *       *      UPSILON' *

legend:
        Capital letters are ALPHA, BETA, etc.
        Lower case letters are signified by alpha, beta, etc.
        sigma2: The version of sigma used to end words with.
        alpha', eta', etc: Accented vowels.
        iota",upsilon": Vowels with diaeresis sign.
        The capital accented vowels (EA to F0) are not supported by all
           fonts -- this package offers no support for them as of yet.


2.4. MAKING IT STAY

  To make Greek Support 2.0 stay on, we only have to do one thing:

  * Change your   shell  prompt (or   just  add  an  echo command  to  your
    .bash_profile) to print the  following string in addition to everything
    else:

                                <ESC>(K<ESC>)K

      A suitable command for bash would be as follows:

              export PS1='`echo -e "\033(K\033)K"` blah blah > '

     (or if your editor supports quoting characters, you can skip the 'echo'
     bit and put the ESC directives directly into the prompt string).

     One additional advantage of this technique is that with this prompt,
     CAT'ing binary files on your screen will not foul up the console
     display.


3. INSTALLING

To  install Greek   support,   run  the script   install.greek and   follow
instructions. The following actions will be taken:

* The files will be copied to /usr/local/lib/greek.2.0/
* The scripts (gren, grdis et al) get copied to /usr/local/sbin/.
* /etc/rc.d/rc.local is modified to run gren at boot time (optional).
* Activating and testing Greek Support.


4. TESTING AND 8-BIT FRIENDLY APPLICATIONS

After installation, the install script will  run gren, and test the results
by displaying the file TEST.GREEK.

If everything goes well, try this:

# cat

Press Alt-Enter, and type something silly, like 'asd'. If everything is OK,
you should get an alpha, a sigma, and a delta. Otherwise, oops. :-)

Remember that not  everything running under  Unix  is 8-bit friendly.   Try
something which you know will accept 8-bit ASCII, like  minicom with the -l
flag or joe with the -asis flag.



5. CONTACTING THE AUTHOR

Bug reports, hate mail, and other stuff go to

                          alexios@vennea.demon.co.uk

For more  information and help, try  the Linux newsgroups, or  the Hellenic
Linux Users' Group mailing list. Try the following URL:

                        http://www.compulink.gr/linux/

There, you'll find instructions about how to subscribe to the mailing list.


Regards,
Alexios Chouchoulas
