编辑: kieth 2013-05-07
code-page a style to handle di?erent code-pages in the same document Alain Aubord November 29,

2008 Abstract This package provides some new commands to handle code page1 .

This text describes the interface o?ered by the package and some problems which occur when the implementation is done only in TEX.

1 Introduction The version

3 of TeX provides some facilities to work with documents written in a language di?erent than English. Mainly, by allowing the use of characters coded on eight bits (values from

1 to 255) and the possibility to use multiple hyphenation tables. Although, this improvements are necessary, they are not su?cient. The standard L A TEX style should be adapted to the di?erent languages and new polices of characters containing glyphs2 for the characters used in other language than English should be de?ned. The style Babel and the new font Dc have been developed to solve these problems. Well, one could think, don'

t worry, be happy , documents will be typeset without problem. Unfortunately this is not exactly the case, but the problem is outside TEX: there isn'

t any unique code page! Moreover some systems allow the use of many di?erent code pages. The Dc font obeys more or less to the Iso Latin Set

1 standard, but many other code pages exist. The solutions to this problem are multiples: ? The use of on external program to do the translation. If the program is well interfaced with TEX (like the Tcp tables of Emtex) this solution is very e?cient and comfortable to use. But its main disadvantage is to be implementation speci?c, and the transfer of the document on an other TEX implementation is not easy. ? The use of virtual fonts to match the position of each character in a font to the local code page. This solution is fully integrated with TEX3 , but when a document is transferred, all the virtual fonts should be given with the document (or de?ned at the other place), and the problem of hyphenation (see 1.1) is not solved. ? The use of the standard convention to write accented character in TEX (i.e.\'

e for ? e). This solution works well with Dc fonts (due to a very clever rede?nition of macros for positioning accent) and, naturally, is totally portable with any TEX (version

2 and 3). But the typing of accented characters is clumsy (even with a good editor) and the reading is boring. ? The use of the package codepage which is totally TEX (version

3 only) compatible. It can be used to typeset without any modi?cations a document with an other code page than those of the local computer (this may be useful for a demo version of a document) and the problem of hyphenation is partially (for hyphenation exceptions) solved. But the transfer of document implies the use of package and most of characters above

127 are made active (they are like macros). This could cause some interference with other packages. 1A code page is the convention for associating a character with a number used to represent it in a computer. 2Most foreign languages use characters with accent or diacritical marks. The traditional way to draw an accented character in TeX is the composition, ― i.e. by using a macro to put an accent over a letter ―. This method o?er the possibility to put accent on any character, but prohibit hyphenation on word containing an accented letter. 3Some old driver don'

t work with virtual fonts.

1 As one could see, no solution is totally perfect, this is due to the lack of a standard for code page not to TEX4 . 1.1 The hyphenation problem The algorithm used in the TEX program to hyphenate word is based on patterns read when the format5 is build. During the build of the hyphenation table, all the characters are put to lowercase by using the \lccode value. When a string of characters in a text is to be hyphenated, it is put in lowercase by using the \lccode value and the compared with hyphenation table to ?nd a good break point. If the pattern ?le use the \lccode values de?ned for the Dc font (which is generally the case), a match will never occur with the character above

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题