Using 8-bit Character Sets with mapcodes ^{∗}

Michael Piotrowski

        mlpiotro@linguistik.uni-erlangen.de

Printed on December 1, 1995

Abstract The mapcodes package allows you to use 8-bit input files in a variety

of encodings, like ISO 8859-1 or the IBM codepage 850. It can be used with both T1 and OT1 fonts and language-specific extension packages.

1 Deutsche Kurzbeschreibung

mapcodes ermöglicht die Verwendung von 8-bit-Eingabedateien mit verschiedenen Zeichensätzen. In dieser Version sind das:

• ISO 8859-1 (Latin 1)

• ISO 8859-2 (Latin 2)

• IBM Kodeseite 850

• IBM Kodeseite 852

• HP Roman 8

• Macintosh Roman

• Atari TOS Um mapcodes zu benutzen, schreiben Sie eine Zeile der folgenden Form in die Präambel der Eingabedatei:

  \usepackage[Zeichensatz]{mapcodes}

Für Zeichensatz können sie im Augenblick folgendes einsetzen:^{1}

            iso8859-1  iso8859-2  ibm850  ibm852
            hproman8   macroman   atari

∗This document describes version 1.04 of 07 Apr 95.

1Für iso8859-x kann auch latinx geschrieben werden.

mapcodes erkennt selbständig, ob Sie T1- oder OT1-Schriften verwenden, wobei erstere zu empfehlen sind. Wenn Sie OT1-Schriften und ein LaTeX-Paket wie german oder eine babel-Option wie german oder spanish verwenden, kann mapcodes die entsprechenden Erweiterungen nutzen, die z. B. Trennungen in Wörtern mit Umlauten erlauben. Geben sie hierzu die Sprache als zusätzliche Option an. Beispiel:

     \usepackage[hproman8,german]{mapcodes}

Sie können die Sprache auch als globale Option zum \documentclass-Befehl angeben. Im Augenblick werden folgende Sprachoptionen unterstützt:

                        german  spanish

2 Introduction

When using TEX with languages other than English you always have the problem of how to enter language-specific characters like ä, é or í. The L^{A}TEX commands \"{a}, \'{e} and \`{\i{}} are neither intended nor adequate for writing texts in German, French or Italian, as they are too difficult to type; besides of that, they inhibit proper hyphenation of the words in which they are contained. Packages like german or babel offer some help in producing non-English texts, providing commands like "a for ä which also allow correct hyphenation. However, this is still not perfect; it would be much nicer if you could simply use the “ä” key on a German keyboard and directly see “ä” on your screen. The drawback here is that unfortunately nearly every computer system is still using its own character sets and tables, which makes it difficult to correctly process 8-bit coded texts from one system on an other system. The mapcodes package allows you to use (nearly) all of the characters in the character set you are using while providing a high level of portability.

3 Specifications

Currently supported character sets:

• ISO 8859-1 (Latin 1)

• ISO 8859-2 (Latin 2)

• IBM codepage 850

• IBM codepage 852

• HP Roman 8

• Macintosh Roman

• Atari TOS mapcodes can easily be extended in a modular way to support further encodings. Output can be produced for:

• OT1 fonts; "cf in Latin 1 encoding will be mapped to \ss

• OT1 with extension packages; currently supported are the german package and the german and spanish options of babel. For the german package the above code would be mapped to "s and thus allowing hyphenation.

• T1 fonts; "cf is mapped to the the corresponding character code in the T1 set, namely "ff.

4 The User Interface

To use mapcodes, simply specifiy it in a \usepackage command, with the name of the desired encoding as an option. Example:

     \usepackage[iso8859-1]{mapcodes}

If you are using emTEX make sure that you use a L^{A}TEX format without a character translation table built-in (this is done by specifying the option /c when building it). Use the option /8 instead to enable 8-bit character processing. mapcodes automatically detects whether you are using T1 or OT1 fonts. Note, however, that the usage of OT1 fonts can in some cases yield esthetically dubious results due to limitations of these fonts. Usage of T1 fonts is recommended. If you are using OT1 fonts with one of the extension packages named above, you can request support for them by specifying the language name in addition to the encoding. Example:

     \usepackage[hproman8,german]{mapcodes}

When you are using T1 fonts, the request will be ignored. Valid encoding options in this version are:^{2}

              iso8859-1  iso8859-1  ibm850  ibm852
              hproman8   macroman   atari

Valid language options in this version are:

                        german  spanish

5 Bugs and features

Suggestions and bug reports are welcome. Direct them to the E-mail address indicated on the first page.

2iso8859-x can be replaced by latinx

6 Acknowledgments

The character tables in Kosta Kostis’ trans097 conversion tools were very helpful.

References

[1] Lamport, Leslie. L^{A}TEX: A Document Preparation System. 2nd ed. Reading, Mass.: Addison-Wesley 1994.

[2] Adobe Systems Incorporated. POSTSCRIPT language reference manual. Reading, Mass.: Addison-Wesley 1986.