Introduction~~~~~~~~~~~~~~~~~~~~~~This is Mem, a multilingual environment for Lamedh/Lambda.The name derives from the letter that comes after Lamedh--because Mem should go after Lamedh-- and from MultilingualEnvironMent. Its aim is to provide the possibility to writemultilingual document and to provide a framework where newlanguages can be added easily by User Groups and/ordevelopers interested in doing that.This package would no be possible to the previous workmade by Yannis Haralambous and John Plaice.Note at some places the name Lambda is still used. Iexpect it will be removed soon.This package is not intended for real use but just tomake tests.The previous version of the readme file follows, which somechanges in the name of files. In addition, there is afurther sample named russian, which demonstrates howencoding selection works (UT1/omlgc vs. T2A/cmr) and howa new level of ocp's can be easily added (in thatcase, to transliterate from Latin to Cyrillic).Javier Bezos2004/08/15=======================Preliminary Remark~~~~~~~~~~~~~~~~~~~After presenting this work in Tsukuba (March 2001) I have somedoubts about the future of the included files. LaTeX3 (or maybeLaTeX2e*) is almost here and therefore it doesn't make sense taking adifferent path. How lambda will evolve will depend largely on themultilingual model of LaTeX3; it's not unlikely that lambda, aspresented here, will vanish... but perhaps they won't and they willbecome a package working on top of LaTeX3, or even a multilingualcapable class. As of today it's impossible to say which the futurewill be.However, and despite the reservation made, I think that the bundledfiles are of enough interest and I will like to get some feedback.Javier Bezos2001 Now the original readme follows:=========================================================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 synchronizedwith runnings heads; and writing direction will not work atall just because I've not tackled that at all.I would like to note that I implemented that as fast aspossible in order to have a working package in Tsukuba. Theresulting code is somewhat chaotic and unstable (and sometimesnaive), but I hope it will be enough to begin to do simpleexperiments. It works with Omega 1.8.Files~~~~~As you can guess, mem.sty is the kernel of the system.There are files describing languages, named with theISO three letter code (esp.ld, eng.ld, fra.ld and ell.ld),and files describing scripts, named with the ISO two lettercode (la.sd and el.sd). Regarding TeX, there is a furtherfile with the configuration of the system: mem.cfg.Then come otp files. isolat1, isoell and macstd are similarto the corresponding files currently in Omega, but they canescape to utf8 and ucs16. However, after experimenting a little,escaping to utf8 is fairly complicated with arbitrary text.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 UT1.otp provides tranlation fromUnicode to the corresponding font encodings. They are veryquick and dirty, and in fact T1 is the same file than UT1 witha few lines added! Accents above work and may be stacked, accentsbelow don't work ar all. OT1 and T1 are used with onfss.sty, sincethey are not intended to form part of the core mem.Finally, a little package named spguill adds spaces beforeand 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 themwhich are not documented yet. However, I think that their namesare mostly self-explanatories.Samples~~~~~~~greek.tex contains both French and Greek text. The Greek texthas been taken from the Greek TeX Group, so in addition you willlearn how to become member of it :-). You should note that\MakeUppercase doesn't work correctly at some places (eg., therunning 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 \MakeUppercaseand behave accordingly). Only modern monotonic Greek!yatest.tex prints the date in Spanish, English and US English.testmisc.tex contains miscelaneous tests.spguill.tex provides an example for spguill.Random remarks~~~~~~~~~~~~~~- Scripts will have a default dummy language. This way, specificactions for this script are possible even if the main languageuses a different script.- Currently languages only have one script. However, some languagescan 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 athree level one (document, paragraph/block, text).- If you get an error of bad encoding or font, don't be worried;script specific macros are using the NFSS macros for its own purposeand some fine tuning is still to be done.- Many "auxiliary" files are far from complete. In fact, they arefairly uncomplete, but I will continue adding more code only whenwe 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 font. Sometimes I give the encoding explicitly with \SetFontEncoding{}{} - 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 appearwhen discussing Mem.- The files have been tested on Linux (RadHat 7.0) and MacOS(CMacTeX 3.4).The original message~~~~~~~~~~~~~~~~~~~~~~The following message was sent to the omega list by October 2000,and it explains the main aims of mem, with some examples. I'vechanged my mind in some points, but most of it remains true, atleast in concept.From: "Javier Bezos" Date: juev., 5 octu 2000 15:11To: omega@ens.frSubject: [omega] LambdaHi all,This is a short description of the goals of Lambda and theway they will accomplished. These are very preliminaryideas, and they are very likely to change before the betaversion, which is expected to be released by the nextEuroTeX meeting.General description~~~~~~~~~~~~~~~~~~~The goals of Lambda are mainly:- to provide a set of high level macros for users and developpers of language styles, which "hide" the involved primitives and make them easier to use.- to coodinate different languages so that Omega will become a true _multilingual_ environment.This will be done is such a way that you may still usenon-Lambda styles, because you may switch off the internalmodifications (provided, of course, the non-Lambda stylescan switch off their modifications). So, you will be ableto say \languageunset, then swith to other language, andswitch back to Lambda with, say, \languageset{spanish}.Small pieces of text are inserted with the help of\languagetext which is currently essentially the same as\languageset except that in a future it could handle writingdirection in a somewhat different fashion.Let's now explain how TeX handle non ascii characters. TeXcan read Unicode files, as xmltex demostrates, but non asciichars cannot be represented internaly by TeX this way. Instead,it uses macros which are generated by inputenc, and which areexpanded in turn into a true character (or a TeX macro) byfontenc: --- inputenc --> \'{e} --- fontenc --> ^^e9That's true even for cyrillyc, arabic, etc. characters!Omega can represent internally non ascii chars and henceactual chars are used instead of macros (with a few exceptions).Trivial as it can seem, this difference is in fact a HUGEdifference. For example, the path followed by will be: --an encoding ocp-| |-- T1 font ocp--> ^^e9 +-> U+00E9 -+ \'e -fontenc (!)----| |- OT1 font ocp -> \OT1\'{e}It's interesting to note that fontenc is used as a sort ofinput method! (Very likely, a package with the samefuncionality but with different name will be used.)For that to be accomplished using ocp's we must note that wecan divide them into two groups: those generating Unicode froman arbitrary input, and those rendering the resulting Unicodeusing suitable (or maybe just available :-) ) fonts. TheUnicode text may be so analyzed and transformed by externalocp's at the right place. Lambda further divides these twogroups into four (to repeat, these proposals are liable tochange):1a) encoding: converts the source text to Unicode.1b) input: set input conventions. Keyboards has a limited number of keys, and hands a limited number of fingers. The goal of this group is to provide an easy way to enter Unicode chars using the most basic keys of keyboards (which means ascii chars in latin ones). Examples could be: * --- => em-dash (a well known TeX input convention). * ij => U+0133 (in Dutch). * no => U+306E [the corresponding hiragana char]Now we have the Unicode (with TeX tags) memory representacionwhich has to be rendered:2a) writing: contextual analysis, ligatures, spaced punctuation marks, and so on.2b) font: conversion from Unicode to the local font encoding or the appropiate TeX macros (if the character is not available in the font).This scheme fits well in the Unicode Design Principles,which state that that Unicode deals with memory representationand not with text rendering or fonts (with is left to "appropiatestandars"). Hence, most of so-called Unicode fonts cannotrender properly text in many scripts because they lack therequired glyphs.There are some additional processes to "shape" changes (case,script variants, etc.)User interface~~~~~~~~~~~~~~Some of the features of Lambda will be:* You can switch between languages freely. You have not to take care of neither head lines nor toc and bib entries--the right language is always used. You can even get only a few commands from a language, not all of them, because they belong to one of several groups: layout, date, names, text, tools, math, and so on.* Dialects--small language variants--are supported. For instance: demotic and katharevusa.* Customization is quite easy---just redefine a command of a language with |\renewcommand| when the language is in force. The new definition will be remembered, even if you switch back and forth between languages.* An unique layout can be used through the document.Commands are pretty simple, and I've given some hints above.An example will be illustrative:\documentclass{book}\usepackage[encoding=latin1,arabic,english]{lambda} % The encoding in the document is latin1, except if % overriden explicitly by a language.\languageset*{english} % Set english as the main language. % All groups are activated. Not strictly necessary, because % it's automacally done by the package.\languageproperties{arabic}{input=latin} % Let Lambda translate from latin to arabic.\begin{document}An Arabic text: \languagetext{arabic}{Ab al-Laythal-Samarqand"}. And again English. % The layout, date and names groups are still those of % english.\end{document}Developper interface~~~~~~~~~~~~~~~~~~~~Here are a few examples of code for a style file:\DeclareLanguage{dutch} % Setting things up\SetEncodingDefault{latin1} % the encoding used in this % file, to make sure that the text written here is % correctly transcoded.\DeclareLanguageCommand*{names} {\listfigurename}{Lijst van figuren} % The star means that \chaptername will select latin1 % even if the encoding in the document is, say, applemac.\DeclareLanguageCommand{text}{\dots}{\mbox{...}}\SetLanguageProcess{input}{texinput,ndlinput} % Two files for input conventions: % - texinput provides ---, --, etc. % - ndlinput provides ij => U+0133There are many other commands to handle:- properties: \DeclareLanguageProperty- shape changes \DeclareShapeProcess- dates: \DeclareDateCommand \DeclareDateFunction \DeclareDateFunctionDefault- values: \SetLanguageValue \SetLanguageCode [\catcode, \sfcode, etc.]___________________________________________________________Javier Bezos | TeX y tipografiajbezos at wanadoo dot es | http://perso.wanadoo.es/jbezos/...........................................................CervanTeX http://apolo.us.es/CervanTeX/CervanTeX.html