May 1999. Staszek Wawrykiewicz (StaW@gust.org.pl). Public domain.

Dokumentacja po polsku i po angielsku (nizej).
The documentation in Polish and in English (below).

------------------------------------------------------------------------
POLSKI (bez znakow diakrytycznych):
------------------------------------------------------------------------

MeX jest adaptacja formatu PLAIN TeX do skladu w jezyku polskim
z uwzglednieniem polskich zwyczajow drukarskich.
Autorzy: Bogus\l{}aw Jackowski & Marek Ry\'cko.
Dokumentacja ponizsza omawia pokrotce tworzenie formatu mex.fmt
i jego uzycie w srodowisku opartym na web2c. Szczegolowe informacje
nt. pakietu MeX zawarto w pliku mexinfo.pol.

I. Przygotowanie formatu MeX (polskiej implementacji formatu Plain)
   Istnieja tu dwie metody:
   1. prosta: nalezy uruchomic program texconfig, wybrac menu ,,Formats'',
      odblokowac w edytowanym pliku texmf/web2c/fmtutil.cnf wiersz
      dotyczacy formatu MeX i po zapisaniu pliku powrocic do menu
      nadrzednego; ,,w tle'' zostanie wykonany program `fmtutil --byfmt mex';
      texconfig tworzy ponadto dowiazanie (lub program) -- gotowe do pracy
      polecenie `mex'.
   2. reczna: nalezy uruchomic `tex -ini mex.ini' w katalogu texmf/web2c/
      i nastepnie odswiezyc baze danych instalacji (polecenie `mktexlsr').
   W obu wypadkach zostanie utworzony format mex.fmt z polskimi
   i angloamerykanskimi wzorcami przenoszenia wyrazow.
   Deklaracje formatow znajduja sie w pliku texmf/web2/fmtutil.cnf
   Plik ten mozna modyfikowac zgodnie z zawartymi w nim wskazowkami, po czym
   uruchomienie programu
          fmtutil --all
   wygeneruje wszystkie potrzebne formaty (`fmtutil --help' wyswietla
   dostepne opcje).
   Uwaga: w podobny sposob mozna wygenerowac format pdfmex.fmt
   dla programu pdfTeX -- wersji TeX-a tworzacej od razu pliki PDF.

II. Uzycie: aktualne implementacje bazujace na webc 7.3 pozwalaja wreszcie
      na prawidlowe przekodowanie znakow diakrytycznych w pliku TeX-owym
      na wewnetrzna reprezentacje. Przekodowanie dziala tez w druga
      strone, kiedy TeX wyswietla komunikaty i zapisuje pliki .log, .toc,
      .idx itp. Do tego celu uzywa sie zewnetrznych, czytelnych plikow TCX.
      Co wiecej, przekodowanie (plik TCX) moze byc deklarowane bezposrednio
      w pliku TeX-owym. Jesli _pierwszy_ wiersz pliku zawiera
      komentarz strukturalny postaci
          %&mex --translate-file=il2-pl
      to plik moze byc przetworzony za pomoca polecenia `tex plik.tex';
      zostanie wtedy wczytany format mex.fmt oraz tablica il2-pl.tcx
      przekodowania z iso8859-2 (latin2) do ukladu fontow PL (wewnetrznego
      dla programu TeX). Mozemy tez uzyc polecenia:
         `tex -fmt=mex -translate-file=TCXFILE myfile.tex' lub wrecz
         `mex myfile.tex'
      w przypadku gdy plik `myfile.tex' zawiera w pierwszym wierszu:
          %& -translate-file=TCXFILE
      (`mex' jest tu poleceniem uruchomienia TeX-a z mex.fmt).
      W tej dystrybucji dostarczono szereg plikow TCX. Mozna je znalezc
      w katalogu texmf/web2c/:
          amiga-pl.tcx   AmigaPL    <--> kodowanie PL
          il2-pl.tcx     iso8859-2 (latin2) <--> kodowanie PL
          cp1250-pl.tcx  Windows cp1250 <--> kodowanie PL
          cp852-pl.tcx   IBM cp852  <--> kodowanie PL
          maz-pl.tcx     Mazovia    <--> kodowanie PL

III. Polskie fonty PostScriptowe
     Dystrybucja podstawowa moze nie zawierac wersji Type 1 fontow PL, 
     znajduja sie one wsrod pakietow dodatkowych (goodies).
     Fonty te mozna pobrac takze z najblizszego wezla CTAN lub jego kopii:
     CTAN/fonts/psfonts/polish/plpsfont/
     Pliki .pfb nalezy skopiowac do nowo utworzonego katalogu instalacji:
     texmf/fonts/type1/public/pl/
     po czym nalezy zaktualizowac baze danych instalacji (`mktexlsr').
     Sterownik Dvips jest juz przygotowany do pracy z fontami PL, wystarczy
     uruchomic:
          dvips -Ppl plik.dvi
     Po dolaczeniu zawartosci pliku texmf/dvips/config/pl.map
     do pliku texmf/dvips/config/psfonts.map podawanie parametru `-Ppl'
     bedzie zbedne i polskie fonty .pfb beda ladowane przez program Dvips.
     Aby fonty PL Type 1 byly uzyte przez program pdfTeX mozna dodac do
     zawartosci pliku texmf/pdftex/config/pdftex.cfg wiersz: 
          map +pl.map
     albo dolaczyc zawartosc pl.map do pliku texmf/dvips/config/pdftex.map.
     Aktualizacje map fontowych dla programow Dvips, pdfTeX i in. ulatwia
     obecnie skrypt texmf/dvips/config/updmap -- wystarczy go zmodyfikowac
     i uruchomic. Powyzszy opis mial na celu jedynie przyblizenie
     Czytelnikowi tego, co wykonuje updmap. ;-)

------------------------------------------------------------------------
ENGLISH:
------------------------------------------------------------------------

MeX is an adaptation of PLAIN TeX format to the Polish language and to the
Polish printing customs.
Authors: Bogus\l{}aw Jackowski & Marek Ry\'cko.
This document describes shortly creation of mex.fmt and usage in web2c based
environment. See mexinfo.eng for detailed informations about MeX.

I.  Preparing MeX  (Polish Plain format)
    There are two techniques:
    1. a `simple' one which involves running `texconfig,'
       selecting `Formats' menu and unpercenting out MeX declaration
       in the edited file texmf/web2c/fmtutil.cnf; after leaving
       the menu, texconfig runs automagically `fmtutil --byfmt mex'
       script which makes mex.fmt with Polish and US English patterns;
    2. a `manual' one by just invoking `tex -ini mex.ini' in
       the directory texmf/web2c/ which makes the same format mex.fmt;
       but you have to update additionally ls-R database (running `mktexlsr').
   The format pdfmex.fmt for pdfTeX can be also prepared in the same way.
   Declarations of all formats are in texmf/web2/fmtutil.cnf self-documented
   file. Just modify it and run 
       fmtutil --all
   to regenerate all needed formats (see `fmtutill --help' for other options).

II. Usage: the current implementations based on web2c 7.3 allow (hopefully)
       proper reencoding of input national characters into internal TeX's,
       and back again, for all messages, .log, .toc, .idx files written by
       TeX, etc. External readable TCX translation files are used and they
       can be specified explicitly in the TeX file or in the command line.
       If the _first_ line of TeX's file contains a structured comment
       of the form
           %&mex --translate-file=il2-pl
       it suffices to run `tex file.tex' with mex.fmt and il2-pl.tcx
       translation table (iso8859-2 latin2 to internal PL reencoding).
       You can also use the command
           `tex -fmt=mex --translate-file=TCXFILE myfile.tex'
       or just `mex myfile.tex,' where the first line of `myfile.tex'
       contains a structured comment
            %& --translate-file=TCXFILE
       Several TCX files are provided; they can be found in the texmf/web2c/
       directory:
          amiga-pl.tcx   AmigaPL <--> PL encoding
          il2-pl.tcx     iso8859-2 (latin2) <--> PL encoding
          cp1250-pl.tcx  Windows cp1250 <--> PL encoding
          cp852-pl.tcx   IBM cp852 <--> PL encoding
          maz-pl.tcx     Mazovia <--> PL encoding

III. Polish PostScript fonts in Type 1 format
     The base installation usually does not contain Type 1 PL fonts,
     however they can be found in additional `goodies' package.
     PFB files can be also dowloaded from the nearest CTAN node or its mirror:
         CTAN/fonts/psfonts/polish/plpsfont/
     or copied from CD TeX Live.
     PFB files should reside in the newly created directory of
     our installation: texmf/fonts/type1/public/pl/
     The final step is refreshing the ls-R database of installation:
     `mktexlsr.'
     Dvips is already prepared for PL fonts in Type 1; just run:
         dvips -Ppl myfile.dvi
     If the contents of texmf/dvips/config/pl.map is included
     into the standard texmf/dvips/config/psfonts.map, `-Ppl' is not even
     needed. In order to use Type 1 fonts with pdfTeX the line
         map +pl.map
     can be added to the contents of texmf/pdftex/config/pdftex.cfg, or
     the contents of `pl.map' can be added to texmf/dvips/config/pdftex.map.
     The process of preparation of map files for Dvips, pdfTeX, etc.,
     is now much easier: it suffices to modify and next to run
     texmf/dvips/config/updmap script. The above description is only
     a reference what is done by updmap script. ;-)

------------------------------------------------------------------------
