MULTEXT - Document MSC 1. MtScript/Using MtScript.


Using MtScript


1. Running MtScript

1.1. Starting a new text

Once MtScript is installed on your system, you can run it by simply typing the following on the command line:


This command invokes MtScript for a new (untitled) text. Until the user chooses the language in which to begin typing (see below), the language is initially set to <unknown>.

If you want to start with a particular language, type:

mtscript -lang <language_code>

Here, the language is initially set to <language_code> instead of <unknown>, thus invoking the appropriate language rules and character set. For example, the command

mtscript -lang fr

opens a new file and invokes the language rules and character set for French.

See the list of language codes for the languages currently supported.

1.2. Editing a text previously created by MtScript

When a text is created with MtScript, all of the information concerning the languages associated with portions of the text is stored in a corresponding "style file"). To edit a file previously created with MtScript and automatically load its style file, type:
mtscript <file_name>

Note that the -lang option is not valid when calling up an MtScript file.

1.3. Editing a text not previously created by MtScript

If the text stored in <file_name> was not created with MtScript (and therefore has no associated style file), the text can be loaded into MtScript with the command
mtscript <file_name>
Initially, the language is set to <unknown> for the entire text. Once loaded, the user can change the language for the entire text or portions of it by selecting the appropriate zone and choosing the desired language. The -lang option may be used when calling up a non-MtScript file:
mtscript -lang <language_code> <file_name>

This sets the language of the entire text initially to <language_code>.

1.4. Summary of options

The following options are available:

displays the version number

sets the display of all languages to black and white: useful on monochrome screens or for people with vision problems

-visual staticgray | grayscale | staticcolor |
pseudocolor | truecolor | directcolor
sets the type of display on color or grayscale monitors: see the X11 documentation

-lang <lang>
sets the initial language to <lang>, where <lang> is a language code, e.g. 'fr'

default value: 'xx' ("unknown")

-unknown <charset>
sets the character set of the "unknown" language to <charset>, e.g. 'iso_8859_2'

default value: 'iso_8859_1'

2. The menu bar


3. Choosing languages


To choose the language in which you will enter text:

To modify the language of any previously typed portion of text:

For convenience, each language is displayed in a different color in the text (the language name appears in the same color in the Insert menu). The language-to-color mapping cannot be changed in the current version.

4. Typing text in alphabetic languages

4.1. Overview

Typing text in many different languages based on different alphabets on a standard keyboard requires

These rules are kept in language rule files and can be redefined by the user.

4.2. Writing rules

The current version of MtScript includes writing rules for several languages, for example:

French French

The rule "a + ` = à" indicates that when the user types a immediately followed by `, an a with grave accent (à) is displayed. There is an escape mechanism which allows displaying the sequence a`, if needed.

The rule "é + BS = e" indicates that when the user enters a backspace following é, the accent is deleted first. A second backspace erases the character e itself.

German German

The rule "s + s = ß" indicates that typing two consecutive s's results in displaying ß. The escape mechanism allows displaying two s's where needed.

Greek Greek

This table provides two rules for the letter "sigma" in Greek, which has two different forms, depending whether it appears at the end of a word (rule "sigma + space") or inside a word (rule "sigma + any").

arabic Arabic

This table provides contextual rules for Arabic characters, most of which can be written in four different forms, depending on their position within a word: initial, internal, final, or isolated. These rules specify that when a user initially types any letter, the isolated form is first displayed. If the letter is followed by a space, it remains as such. If it is followed by a second letter, it becomes an initial form, and the second one is displayed as final, etc.

Note: In the left column of the table, the characters are given in the order they are typed, whereas in the second column they are given in the order in which they are displayed (Arabic is written from right to left).

4.3. Transliteration rules


For languages that are not based on the Latin alphabet, a file of transliteration rules provides a mapping between keys on the standard keyboard and non-Latin characters. These rules can be redefined by the user.

The figure on the left gives an example of the Arabic transliteration rules (file

4.4. Escape mechanisms

Writing rules provide a means to compose characters with diacritics and contextual variants that are common in a language. When inputing text in any language, it is possible to insert characters, which, although part of the same character set for that language, are not a part of the usual set of characters used in displaying that language. For example, the character é is not defined in the writing rules for English, since it is not a character in that language, although é is part of the same character set used by MtScript for displaying English. If it is desired to input é in a portion of text that has been identified as English, the by using the compose key provided on Sun keyboards. A mapping between various compose and character key sequences and special characters is standard to Sun keyboards (see the Sun documentation for a table of correspondences).

Example: when typing English, the character é can be displayed by typing

COMPOSE + e + ' = é

Note: The feature above does not work properly in the current version.

When necessary, special sequences for generating characters with diacritics can be disabled. For example, in the default writing rules for French, the keystroke sequence e + ' yields the character é; if it is desired to generate the actual two characters e', an escape sequence can be used. Thus:

e + ' = é

e + ESC + ' = e'

5. Typing text in non-alphabetic languages

Typing text for non-alphabetic languages such as Chinese, Japanese or Korean requires special input modules. These modules are still under development.

For the time being, although texts in non-alphabetic languages cannot be typed, they can be displayed using the following procedure:

Alternatively, texts in non-alphabetic languages can be displayed by indicating the appropriate language with the -lang option when launching MtScript.

6. Saving the text

To save a text, use the item Save or Save as in the File menu.

Each file saved under a "file_name" is associated with a style file named "file_name@":

The current version of MtScript does not include menus for changing the style, size, color or justification attributes of characters. Until the menus are incorporated into MtScript, you can modify these attributes manually by editing the style file associated with your text.

7. Creating or modifying language rules

As noted above, each language is associated with two sets of rules: writing rules and transliteration rules. Existing writing rules and transliteration rules may be redefined by the user to accomodate special needs, and new writing rules and transliteration rules may be created from scratch when adding new languages.

7.1 Stucture of writing rules

Each language is associated with a set of writing rules (filename: rules.<language_name_code>). Each rules.<language_code> file is divided into two main parts:

Example: file.

7.2 Stucture of transliteration rules

The transliteration rules define the association between individual keyboard keys and the characters of the non-Latin languages. Each language is associated with a set of transliteration rules (filename: keys.<language_code>).

Example: file.

7.3 Location of rules

When you want to load a given language lang, MtScript looks for the corresponding rules.lang_code and keys.lang_code files successively in the following directories:

Therefore, several versions of the rules files may exist on the system; the one used on a particular invocation of MtScript is determined by the directory search order given above.

HTML3.2 Checked! | Top | Next | MtScript home page | LPL/CNRS | MULTEXT

Copyright © Centre National de la Recherche Scientifique, 1996.