summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/enctex/enc-u.tex
blob: 132e4c70bdb9af7e4994efbc8bcfd116d64d212e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
% enc-u.tex 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Petr Olsak                                              Jan. 2002

% This file implements the conversion from UTF8 to ISO-8859-2
% encoding (used by CSfonts in csplain and cslatex). 
% The conversion is done by encTeX v. Dec 2002 or higher. 

% This file is used during csplain generation if you write
%
% initex '\let\enc=u \input csplain.ini'

\ifx\mubyte\undefined
   \errhelp{Sorry, you can't use this file without encTeX ver. Dec. 2002.}
   \errmessage{The encTeX extension of TeX is not found}
   \endinput \fi

% first, we set the identity mapping in xord/xchr:

\bgroup
\ifx\xordcode\undefined
   \errhelp{May be, you are using this file from csplain which disables 
            the xordcode primitive. Use 
            initex \string\let\string\enc=u \string\input csplain.ini
            for csplain generation instead this file.
            If you are using ISO8859-2 input encoding in csplain,
            you can skip this error message.}
   \errmessage{I can't se the xord/xchr to identity mapping}
   \def\xchrcode\count255=\count255{} \def\xchrcode\count255=\count255{}
\fi
\count255=128
\loop \xordcode\count255=\count255 
      \xchrcode\count255=\count255
      \advance\count255 by 1
\ifnum \count255<256 \repeat
\egroup


% we remove the current conversion table, if exists:

{\catcode`\^^@=12
\gdef\clearmubytes{\bgroup \count255=1
   \loop \uccode`X=\count255
       \uppercase{\mubyte XX\endmubyte}%
       \advance\count255 by1
       \ifnum\count255<256 \repeat
   \mubyte ^^@^^@\endmubyte
   \egroup}
}
\clearmubytes

% now, the conversion table is created:

\mubyte ^^c1  ^^c3^^81\endmubyte % \'A
\mubyte ^^e1  ^^c3^^a1\endmubyte % \'a
\mubyte ^^c9  ^^c3^^89\endmubyte % \'E
\mubyte ^^e9  ^^c3^^a9\endmubyte % \'e
\mubyte ^^cd  ^^c3^^8d\endmubyte % \'I
\mubyte ^^ed  ^^c3^^ad\endmubyte % \'i
\mubyte ^^d3  ^^c3^^93\endmubyte % \'O
\mubyte ^^f3  ^^c3^^b3\endmubyte % \'o
\mubyte ^^da  ^^c3^^9a\endmubyte % \'U
\mubyte ^^fa  ^^c3^^ba\endmubyte % \'u
\mubyte ^^dd  ^^c3^^9d\endmubyte % \'Y
\mubyte ^^fd  ^^c3^^bd\endmubyte % \'y
\mubyte ^^d4  ^^c3^^94\endmubyte % \^O
\mubyte ^^f4  ^^c3^^b4\endmubyte % \^o
\mubyte ^^c4  ^^c3^^84\endmubyte % \"A
\mubyte ^^e4  ^^c3^^a4\endmubyte % \"a
\mubyte ^^d6  ^^c3^^96\endmubyte % \"O
\mubyte ^^f6  ^^c3^^b6\endmubyte % \"o
\mubyte ^^dc  ^^c3^^9c\endmubyte % \"U
\mubyte ^^fc  ^^c3^^bc\endmubyte % \"u

\mubyte ^^c8  ^^c4^^8c\endmubyte % \v C
\mubyte ^^e8  ^^c4^^8d\endmubyte % \v c
\mubyte ^^cf  ^^c4^^8e\endmubyte % \v D
\mubyte ^^ef  ^^c4^^8f\endmubyte % \v d
\mubyte ^^cc  ^^c4^^9a\endmubyte % \v E
\mubyte ^^ec  ^^c4^^9b\endmubyte % \v e
\mubyte ^^c5  ^^c4^^b9\endmubyte % \' L
\mubyte ^^e5  ^^c4^^ba\endmubyte % \' l
\mubyte ^^a5  ^^c4^^bd\endmubyte % \v L
\mubyte ^^b5  ^^c4^^be\endmubyte % \v l

\mubyte ^^d2  ^^c5^^87\endmubyte % \v N
\mubyte ^^f2  ^^c5^^88\endmubyte % \v n
\mubyte ^^d8  ^^c5^^98\endmubyte % \v R
\mubyte ^^f8  ^^c5^^99\endmubyte % \v r
\mubyte ^^a9  ^^c5^^a0\endmubyte % \v S
\mubyte ^^b9  ^^c5^^a1\endmubyte % \v s
\mubyte ^^ab  ^^c5^^a4\endmubyte % \v T
\mubyte ^^bb  ^^c5^^a5\endmubyte % \v t
\mubyte ^^d9  ^^c5^^ae\endmubyte % \r U
\mubyte ^^f9  ^^c5^^af\endmubyte % \r u
\mubyte ^^ae  ^^c5^^bd\endmubyte % \v Z
\mubyte ^^be  ^^c5^^be\endmubyte % \v z
\mubyte ^^c0  ^^c5^^94\endmubyte % \' R
\mubyte ^^e0  ^^c5^^95\endmubyte % \' r

% You can add more UTF-8 codes here. You can map these codes to
% control sequences (see encTeX.doc for more datails) so,
% the number of UTF-8 codes examined by TeX is unlimited.

% ...

\mubytein=1 \mubyteout=3

% finally, we can forbid the encTeX primitives in document
% (this is commented out here because it is only an example):

% \let\xordcode=\undefined \let\xchrcode=\undefined\let
% \let\xprncode=\undefined
% \let\mubytein=\undefined \let\mubyteout=\undefined
% \let\mubyte=\undefined   \let\endmubyte=\undefined

\endinput