Comprehensive TeX Archive Network

Direc­tory tex-archive/macros/latex/exptl/mem

[See also bugs.txt]


Before tacking the task of writing the selector of
"features" I've decides to stabilize a few things.
The otp part has been rewritten from scratch and now
it works better. The macros has been redesigned, too:
- \DeclareLanguageProcessGroup is like the previous
- \AddLanguageProcess has changed radically. Now is 
  a set of "slots" for specific tasks; each task can
  be assigned to a process with \SetLanguageProcess
  (or left empty).
- \DeclareProcess groups several physical OTPs as a
  single logical process (eg, in t1.ed through
- \SelectProcesses, select the current processes
  defined with the previous commands.
- \ShowProcesses shows the current processes (for
As before, commands replacing "Language" by "Mem" refer
to processes not assigned automatically to a language.

For example:
\DeclareMemProcessGroup{1000}{case} % new group

\AddMemProcess{case}{case} % new task

% By default, it does a \SetMemProcess{case}{case}
% but this is not what we want, so:




Finally, \DeclareLanguageProcess is an afterthought to
allow unaccented uppercasing (see the French style).

As Mem is still a work in progress, it traces by default
how processes are built and selected (this is another new

A file named <lang-code><encoding>.id is loaded if it
exists and the corresponding pair language/encoding
exists. This is somewhat experimental as I think this
is not the right way to translate macro names to the
language. Being just an experiment, only a file is
provided: espisolat1.id (used in yatest.tex).

(Note. I've just upgraded to TeXLive2005 and it seems Greek
fonts are not set up correctly. I'll try to fix my
-> 2006/01/25 Fixed. Now greek.pdf looks fine.)



This is Mem, a multilingual environment for Lamed/Lambda.
The name derives from the letter that comes after Lamedh
--because Mem should go after Lamedh-- and from Multilingual
EnvironMent. Its aim is to provide the possibility to write
multilingual document and to provide a framework where new
languages can be added easily by User Groups and/or
developers interested in doing that.

This package would no be possible without the previous work
by Yannis Haralambous and John Plaice.

Note at some places the name Lambda is still appears. I
expect it will be removed soon.

This package is not intended for real use but just to
make tests.

A selection of previous version of the readme file follows,
which some modifications to reflect the latests changes.
Changes in the previous release are marked with ****04. 
Many parts of the readme has been moved to the manual, too.

Javier Bezos


Currently Mem requires several ocp files from other
sources, namely:
- from Omega: upppercase, lowercase, cuni2oar. The
  latter apperently mixes contextual analysis and
  font encondins, but until a better otp is devised
  it can  be used to test Arabic.

Some remarks.

Firstly of all, will it work?

Well, some parts will and some other will not. For example,
automatic selection of fonts is still at a very early stage
(to be generous) and it will not be correctly synchronized
with runnings heads.

****04 There is a first experiment with bidirectional
writing named arabic.tex. However, apparently Aleph does
not reverses the direccion in all elements properly.
This requires further investigation. See below.

I would like to note that I implemented that as fast as
possible in order to have a working package in Tsukuba.  The
resulting code is somewhat chaotic and unstable (and
sometimes naive), but I'm fixing it and hope it will be
enough to begin to do simple experiments.  


As you can guess, mem.sty is the kernel of the system.
There are files describing languages, named with the
ISO three letter code (esp.ld, eng.ld, fra.ld, ell.ld),
and files describing scripts, named with the ISO two letter
code (la.sd and el.sd). Regarding TeX, there is a further
file with the configuration of the system: mem.cfg.

****04 added rus.ld, ara.ld, ar.sd and cy.sd, uncomplete.

Then come otp files. isolat1, isoell, macstd, etc., can
escape to utf8 and ucs16. However, after experimenting a little,
escaping to utf8 is fairly complicated with arbitrary text.

****04 Added a script to generate these files, 

inputtex defines TeX input conventions.  fratext defines (visual) text 
transformation for French.  The files for Greek are those by Yannis 
and John with new names beginning with ell: this is a proposal to 
systematize names.

OT1.otp, T1.otp and LOM.otp provides tranlation from
Unicode to the corresponding font encodings. They are very
quick and dirty, and in fact T1 is the same file than LOM with
a few lines added! Accents above work and may be stacked, accents
below [...]

****04 Accents below now work with some limitations:
up to three accents in total, max. 2 above, max. 1 below.
This is enough for most cases, but in a future it
should be improved.

Finally, a little package named spguill adds spaces before
and after guillemets in non French text. It requires 
spguill.otp and demostrates the possibilities of the scheme.

mem.tex explains most of macros, but there are some of them
which are not documented yet. However, I think their names
are mostly self-explanatories.


greek.tex contains both French and Greek text. The Greek text
has been taken from the Greek TeX Group, so in addition you will
learn how to become member of it :-). You should note that
\MakeUppercase doesn't work correctly at some places (eg., the
running head with French text should be unaccented; the problem here 
is pretty simple: when \MakeUppercase is called it does not know that 
the corresponding ocp will be changed by french.  Thus,
\frenchtext must see in a future a "case status" set by \MakeUppercase
and behave accordingly). Only modern monotonic Greek!

yatest.tex prints the date in Spanish, English and US

****04 yatest has some additinal tests with ligatures and

testmisc.tex contains miscelaneous tests.

spguill.tex provides an example for spguill.

russian.tex demonstrates how encoding selection works
(LOM/omlgc vs.  T2A/cmr) and how to transliterate from Latin
to Cyrillic.

arabic.tex shows bidirectional text, but unfortunately the
bidirectional mechanism of Omega and Aleph is problematic.
In the sample you can see page layout (including
elements like sections and lists) are not handled properly
by Aleph, particularly because you cannot change the direction
to mix Arabic and English sections.

Python scripts  ****04

I'm using Python scripts to automatically perform some
tasks. I think it would be useful for the TeX community
to make available these scripts.

charset2otp.py creates ocp files for serveral input

mtp2ocp.py is like otp2ocp but replaces on the fly
spacial characters by characters in the PUA area with
special catcodes. Eg, \ becomes @"F000 whose catcode
is set by mem.sty to 0 (escape).

Random remarks

- Scripts will have a default dummy language. This way, specific
actions for this script are possible even if the main language
uses a different script.
- Currently languages only have one script. However, some languages
can be written with several scripts (eg, Azeri [Latin, Arabic, Cyrillic]
or Spanish [Latin, Hebrew]).
- I'm now studying how to accomplish macros depending on scripts,
namely for fonts, case, and so on.
- I'm studying as well how to replace the two level system by a
three level one (document, paragraph/block, text).
- Many "auxiliary" files are far from complete. In fact, they are
fairly uncomplete, but I will continue adding more code only when
we had decided the "right way".
- Currently, the code includes some experiments I've done, mainly:
   - Automatic selection of font encoding based on fd files--if there
     is an fd file for some combination then select it (with certain
     preferences). Hovever, it turns out that t1cmr exists but pointing
     to _another_ font, and that ot1omlgc points to an ut1 encoded
   - An escaping mechanism in input encoding otp's, which will allow
     to enter Unicode text (ucs16 or utf8) without changing the
     current ocp list (otherwise ligatures and kerning could be
     killed). It works fine when applied that to a single char,
     but I didn't manage to extend it to arbitrary text (including
     non expandable primitives--ocp states are not saved).
- There are lots of open questions, and no doubt they will appear
when discussing Mem.

Javier Bezos              | TeX y tipografia
jbezos at wanadoo dot es  | http://perso.wanadoo.es/jbezos/
CervanTeX   http://www.cervantex.org


Name Notes


Name Size Date Notes
ar.sd 111 2004-10-08 11:41
ara.ld 375 2005-07-15 17:18
ara­bic.pdf 26189 2006-01-24 17:46
ara­bic.tex 3226 2005-12-31 18:44
bugs.txt 773 2006-01-02 16:53
cp1251.ocp 1180 2004-10-08 11:41
cp1252.ocp 796 2004-10-08 11:41
cp1253.ocp 1180 2004-10-08 11:41
cp1256.ocp 1180 2004-10-08 11:41
cp1257.ocp 1180 2004-10-08 11:41
cy.sd 984 2005-12-10 12:51
el.sd 1015 2005-12-10 12:49
ell.ld 7870 2006-01-01 15:20
ellintex.ocp 8244 2004-12-14 17:51
ellinviu.ocp 184 2004-12-14 17:51
ellmedb.ocp 288 2004-12-14 17:51
ellp­sili.ocp 312 2004-12-14 17:51
eng.ld 2385 2004-10-08 11:41
esp.ld 1811 2004-10-08 11:41
es­piso­lat1.id 236 2005-12-14 13:37
fra.ld 4201 2006-01-01 15:27
fratext.ocp 1284 2004-12-14 17:51
greek.pdf 88734 2006-01-25 18:06
greek.tex 12329 2006-01-01 17:49
in­put­tex.ocp 320 2004-12-14 17:51
isoara.ocp 1052 2004-10-08 11:41
iso­cyr.ocp 1052 2004-10-08 11:41
isoell.ocp 1052 2004-10-08 11:41
iso­lat1.ocp 616 2004-10-08 11:41
iso­lat2.ocp 1052 2004-10-08 11:41
iso­lat4.ocp 1052 2004-10-08 11:41
koi8ru.ocp 1052 2004-10-08 11:41
koi8uk.ocp 1052 2004-10-08 11:41
la.sd 1942 2005-12-10 12:51
lat2ru.ocp 1676 2004-12-14 17:51
lgr-com.ocp 2568 2006-01-01 19:12
lgr-dec.ocp 6868 2006-01-01 19:12
lgr-rec.ocp 16352 2006-01-01 19:12
lgr.ed 165 2005-09-25 16:34
mac­std.ocp 1180 2004-10-08 11:41
mem-comm.sty 2501 2005-12-17 13:55
mem.cfg 626 2004-10-08 11:41
mem.pdf 213362 2004-10-19 10:39
mem.sty 40235 2006-01-24 17:17
mem.tex 40991 2005-12-10 12:39
ot1-com.ocp 3968 2006-01-01 19:12
ot1-dec.ocp 12612 2006-01-01 19:12
ot1-rec.ocp 8476 2006-01-01 19:12
ot1.ed 159 2005-09-25 16:35
readme.txt 9402 2006-01-25 18:08
rus.ld 2125 2005-12-31 19:42
rus­sian.pdf 31721 2006-01-24 17:46
rus­sian.tex 2038 2006-01-01 17:49
shared.sd 4265 2004-10-08 11:41
spguill.ocp 276 2004-12-14 17:51
spguill.sty 224 2004-10-08 11:41
spguill.tex 341 2005-12-31 18:44
sp­p­cent.ocp 132 2005-12-15 12:17
t1-com.ocp 3984 2006-01-01 19:46
t1-dec.ocp 12612 2006-01-01 19:12
t1-rec.ocp 12512 2006-01-01 19:12
t1.ed 143 2005-09-25 16:35
t1­comp.ocp 23548 2004-11-14 19:45
t2a-com.ocp 3904 2006-01-01 19:12
t2a-dec.ocp 1476 2006-01-01 19:12
t2a-rec.ocp 9436 2006-01-01 19:12
t2a.ed 148 2005-09-25 16:35
test­misc.pdf 22012 2006-01-24 17:46
test­misc.tex 1556 2006-01-02 16:44
uar.ed 133 2005-09-25 16:35
uaro­marb.fd 860 2004-10-08 11:41
uc­noacc.ocp 5212 2004-12-14 17:51
ucy-com.ocp 11148 2006-01-01 19:12
ucy-dec.ocp 1416 2006-01-01 19:12
ucy-rec.ocp 3320 2006-01-01 19:12
ucy.ed 148 2005-12-08 11:39
ucy­omlgc.fd 842 2004-10-08 11:41
uel-com.ocp 10732 2006-01-01 19:12
uel-dec.ocp 6808 2006-01-01 19:12
uel-rec.ocp 9080 2006-01-01 19:12
uel.ed 152 2005-10-16 19:48
uelomlgc.fd 842 2004-10-08 11:41
ula-com.ocp 10692 2006-01-01 19:12
ula-dec.ocp 12552 2006-01-01 19:12
ula-rec.ocp 17520 2006-01-01 19:12
ula.ed 154 2005-10-16 19:48
ulaomlgc.fd 842 2004-10-08 11:41
utf8.ocp 448 2004-12-14 17:51
ver­ba­tim.pdf 14099 2006-01-24 17:46
ver­ba­tim.tex 401 2006-01-01 17:47
yat­est.pdf 25665 2006-01-24 17:46
yat­est.tex 3010 2005-12-31 18:44

Down­load the con­tents of this pack­age in one zip archive (532.6k).

mem – A mul­ti­lin­gual sys­tem for Lamed

This pack­age con­sists of ex­per­i­men­tal code for a mul­ti­ligual sys­tem for Lamed (i.e., LaTeX run­ning over Aleph). This dis­tri­bu­tion has pre-al­pha sta­tus, and is of­fered for ex­per­i­men­ta­tion and to at­tract con­tri­bu­tions.

Pack­age De­tailsmem
Home pagehttp://mem-la­tex.source­forge.net
Li­censeThe LaTeX Project Public Li­cense
Main­tainerJavier Be­zos
Topics sup­port for more than one (nat­u­ral) lan­guage
Guest Book Sitemap Contact Contact Author