Babel Yannis Haralambous, John Plaice, Johannes Braams
Total Page:16
File Type:pdf, Size:1020Kb
Never again active characters! Ω-Babel Yannis Haralambous, John Plaice, Johannes Braams To cite this version: Yannis Haralambous, John Plaice, Johannes Braams. Never again active characters! Ω-Babel. Tug- boat, TeX Users Group, 1995, 16 (4), pp.418-427. hal-02101590 HAL Id: hal-02101590 https://hal.archives-ouvertes.fr/hal-02101590 Submitted on 25 Apr 2019 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. 418 TUGboat, Volume 16 (1995), No. 4 LATEX Never again active characters! Ω-Babel Yannis Haralambous, John Plaice and Johannes Braams »Weißt Du, wo ich das Wasser des Lebens finden kann?« »An der Grenze Phantásiens«, sagte Dame Aiuóla. »Aber Phantásien hat keine Grenzen«, antwortete er. »Doch, aber sie liegen nicht außen, sondern innen.« M. Ende, Die unendliche Geschichte Abstract This progress report of the Ω development team (the first two authors) presents the first major applica- tion of Ω: an adaptation of Babel, the well-known multilingual LATEX package, developed by the third author. We discuss problems related to multilingual typesetting, and show their solutions in the Ω-Babel system. The paper is roughly divided into two parts: the first one (sections 1–4) is intended for average LATEX users, especially those typesetting in languages other than American English; the second part (section 5) is more technical and will be of more interest to developers of multilingual LATEX software. TUGboat, Volume 16 (1995), No. 4 419 1 Introduction Ω-Babel is the first real-world application of Ω:we are in the process of adapting the multilingual LATEX package Babel by Johannes Braams (1991a, 1991b) to take advantage of the functionality of Ω.This allows safer and more complete LATEX typesetting of languages other than American English. Prob- lems due to technical limitations of TEX are solved; for example, the LATEX macros \MakeUppercase and \MakeLowercase have been replaced by Ω filtering processes. The whole process is simpler and more natural. In this progress report we present the first step in adapting Babel to Ω. There will be (at least) two more steps which we describe below; for more information, see section 5 (the technicalities). 1. Babel adapted to Ω;weuseDC font output. \MakeUppercase and \MakeLowercase macros are being replaced by macros launching transla- tion processes. Various input encoding transla- tion processes are being written. The inputenc and fontenc packages are being adapted (their Figure 1: Allegory: input (on the left) and Ω counterparts are called inpenc and fntenc). output (on the right) encodings, too close together. This step has been completed. 2. UC (Unicode Computer Modern) fonts will be released by spring 1996. These fonts contain bel (Bahasa, Breton, Catalan, Croatian, Czech, Dan- Latin, Greek and Cyrillic characters, and a cer- ish, Dutch, English, Estonian, Finnish, French, Gali- tain number of dingbats and graphical charac- cian, German, Hungarian, Irish, Italian, Lower or ters. Ω-Babel uses UC fonts for output: new upper Sorbian, Norwegian, Polish, Romanian, Scot- languages will be dealt with (Bulgarian, Es- tish, Slovakian, Slovenian, Spanish, Swedish, Por- peranto, Greek, Latvian, Lithuanian, Maltese, tuguese or Turkish), then Ω can make it easier for Russian, Vietnamese, Welsh, etc.). Alan Jef- you and give you better results. All you have to do frey’s fontinst will be adapted to make ex- is download the Ω implementation for your machine tended virtual fonts in UC encoding. from ftp://ftp.ens.fr/pub/tex/yannis/omega/ Latin letters with dieresis will be provided in systems or the top-level omega directory1;ifyou two versions: with high or low accent: French- use a T X implementation not already covered, then → E men like dieresis ( tréma) to be high, Ger- (kindly) suggest to the implementor that they → mans prefer to have it ( Umlaut) a little lower. consider including Ω support). Then download the 3. Arabic alphabet languages, Hebrew and Yid- Ω-Babel package from ftp://ftp.ens.fr/pub/tex/ dish will be added at some point during 1996. yannis/omega/macros/obabel or , install it on your 4. Soft hyphenation will be done through Ω trans- machine and use it! The basic syntax is the same lation processes. This allows dynamic loading as in Babel, but we will discuss new options and of hyphenation algorithms, independently of the functionality in section 4.1. process of format creation. There will be no Ω need to recompile formats when adding or chang- 3 General philosophy of combined and ing hyphenation patterns. It will also be possi- Babel ble to add new features to hyphenation (auto- In Fig. 1, the reader can see an allegory of how TEX matic processing of German „ck→k-k“, prefer- works: input (the worker on the left) and output ential hyphenations, etc.). 2 Practically, what does this mean for me? 1 At press time Ω has been ported to several UNIX ma- It means that if you are typesetting in some non- chines (Sun, Silicon Graphics and others), DOS (by Kraus American English language covered by current Ba- Kalle) and Macintosh (by Tom Kiffe). 420 TUGboat, Volume 16 (1995), No. 4 (the one on the right) are close together. For exam- the fact that there should be no ‘ff’, ‘fi’, ... ple, consider the fact that hyphenation patterns— ligatures, etc. which are a language-intrinsic feature—are described See 4.4 for a good example of the difference and in the output font encoding. In Fig. 2 you can see combined use of aliases and inherent transforms. how Ω remedies this situation: input and output are clearly separated and, in between, there is a big Hyphenation container (imagine a huge barrel), the Unicode en- Hyphenation must be done on the level where the coding. information is most device-independent: that is, the Whatever you type is first of all converted into Unicode level. Not only can you define hyphenation Unicode. This conversion is language dependent; algorithms using all possible 16-bit characters (for for example, the ASCII character ‘i’ does not mean example to hyphenate Welsh, which uses letters such the same thing in Turkish and in the other Latin- as “ˆw”), but your algorithm is automatically valid alphabet languages. Unicode is very big; so you will for any input or output encoding. We’ll come back hardly ever ask for something not available; even if to this issue later in 1996, when we reach step 3 of that happens there is a “private zone” where we can Ω-Babel development. temporarily store characters of our own choice. Once inside Unicode we deal with pure device- Upper/lowercasing independent information: we can process it in many This is certainly not a trivial process: different let- different ways. In Fig. 2 we list five possible trans- ters may share the same glyph for their upper or Ω forms, all pertaining to -Babel, and we will discuss lower forms (example: both the Icelandic eth “ð” Ω these in turn. The translation processes needed and the Croatian dz “ñ” share the glyph “Д for for every language are activated when you enter the their upper form); letters may have different upper Ω corresponding -Babel environment. Our goal is to forms depending on the semantics of the word (ex- keep the technical aspects hidden: the average user ample: one possible upper form of the German “ß” typesetting in a given language does not need to be is “SS”, another one is “SZ”), or on local traditions aware of the different transformations we have just (in bad French typography, upper forms of accented described. letters are not always accented), or on the language Aliasing itself (example: the upper form of the Turkish letter “i” is “İ” and not “I”—the lower form of “I” is “ı” We call “aliasing” the making of aliases. An alias and not “i”) these are major incompatibilities, and is the expression of a character in some convenient hence we should be able to dynamically change the way: for example in 7-bit ASCII. InGermanBa- upper/lowercasing process. bel, when you write "s instead of \ss{},thisisan Finally, as Martin Dürst pointed out on the alias: (a) it is 7-bit, (b) you can very well avoid it if omega list2, there are six kinds of letter cases: your keyboard and screen support 8-bit characters, 1. regular lowercase (glyph becomes uppercase when and (c) in TEX, it used to be handled using active characters. we apply the uppercasing process); 2. regular uppercase (glyph becomes lowercase when Inherent transforms we apply the lowercasing process); These go deeper than aliases; they are: 3. fixed lowercase (glyph is invariant under the up- 1. either transforms that traditionally belong to percasing process), for example the “m” and TEX syntax, like --- for “—”, or ‘‘ for the En- “b” in the German „GmbH“; glish opening double quote, or ?‘ for the Span- 4. fixed uppercase (glyph is invariant under the ish inverted question mark “¿”; lowercasing process), for example the first letter 2. or transforms that historically derive from dacty- of a name; lographical keyboard traditions (for example, the French << that gets converted into “«” with 5. fake lowercase (the glyph is uppercase, it be- the appropriate spacing, or the Catalan l.l comes lowercase when we apply the uppercas- which produces “l.l”); ing process), for example the “i” in the mod- 3.