summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/euenc/euenc.dtx
blob: 8f75c7a2db9fbf0f8a33e252b0d7779916b0b2d1 (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
% \iffalse meta-comment
%
% Copyright 2006-2010 Will Robertson <wspr81@gmail.com>
% Copyright 2009-2010 Elie Roux <elie.roux@telecom-bretagne.eu>
% Copyright 2009-2010 Khaled Hosny <khaledhosny@eglug.org>
%
% Distributable under the LaTeX Project Public License,
% version 1.3c or higher (your choice). The latest version of
% this license is at: http://www.latex-project.org/lppl.txt
%
% This work is "maintained" (as per LPPL maintenance status)
% by Will Robertson.
%
% This work consists of the file  euenc.dtx and various derived files.
%
%<*dtxinfo>
\ProvidesFile{euenc.dtx}
%</dtxinfo>
%<eu1>\ProvidesFile{eu1enc.def}
%<eu2>\ProvidesFile{eu2enc.def}
%<euxunicode>\ProvidesFile{euxunicode.sty}
%<*eu1|eu2|euxunicode>
    [2010/05/27 v0.1g Experimental Unicode font encodings]
%</eu1|eu2|euxunicode>
%
%<*internalbatchfile>
\begingroup
%</internalbatchfile>
%<*batchfile>
\input docstrip.tex
\keepsilent
\preamble

  _____________________________________
  The EUENC bundle
  Will Robertson, Elie Roux, Khaled Hosny

  EUXUNICODE is based on the XUNICODE package version 0.91
  dated 2008/02/08 and copyright 2004-2007 Ross Moore.
  
  License information appended.

\endpreamble
\postamble

Copyright 2006-2010 Will Robertson <wspr81@gmail.com>
Copyright 2009-2010 Elie Roux <elie.roux@telecom-bretagne.eu>
Copyright 2009-2010 Khaled Hosny <khaledhosny@eglug.org>

Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt

This work is "maintained" (as per LPPL maintenance status)
by Will Robertson.

This work consists of the file  \jobname.dtx and various derived files.

\endpostamble
\askforoverwritefalse
\generate{\file{eu1enc.def}{\from{\jobname.dtx}{eu1}}}
\generate{\file{eu2enc.def}{\from{\jobname.dtx}{eu2}}}
\generate{\file{test-euxlm.ltx}{\from{\jobname.dtx}{lmtest}}}
\generate{\file{euxunicode.sty}{\from{\jobname.dtx}{euxunicode}}}
%</batchfile>
%<batchfile>\endbatchfile
%<*internalbatchfile>
\generate{\file{euenc.ins}{\from{\jobname.dtx}{batchfile}}}
\generate{\file{euenc-style.sty}{\from{\jobname.dtx}{dtx-style}}}
\nopreamble\nopostamble
\generate{\file{convert-lmfd.sh}{\from{\jobname.dtx}{lmscript}}}
\generate{\file{sed-eu1lm.sed}{\from{\jobname.dtx}{eu1sedlm}}}
\generate{\file{sed-eu2lm.sed}{\from{\jobname.dtx}{eu2sedlm}}}
\endgroup
%</internalbatchfile>
%
%<*driver>
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%\OnlyDescription
\usepackage{euenc-style}
\begin{document}
  \DocInput{euenc.dtx}
\end{document}
%</driver>
%
% \fi
%
% \CheckSum{0}
% \errorcontextlines=999                ^^A% Show up all my mistakes
% \GetFileInfo{euenc.dtx}
%
% \title{The Experimental Unicode `\EUx' Encodings}
% \author{Will Robertson \and Elie Roux \and Khaled Hosny}
% \date{\filedate \qquad \fileversion}
%
% \maketitle
%
% \begin{abstract}\noindent
% This file documents some experimental Unicode font encodings,
% used for \XeTeX\ and Lua\TeX. Includes Latin Modern font definitions for version 1.6 and later of those fonts.
% \end{abstract}
%
% \tableofcontents
%
% \section{Introduction}
%
% \LaTeX's font encoding system provides a method for ensuring that
% characters in a document can be rendered properly by glyphs in the output.
% It is also a sensible system for typesetting multilingual documents
% while remaining within \TeX's restrictions of 8-bit fonts.
%
% When \XeTeX\ came along, no work had been done on using
% this infrastructure for Unicode fonts. For one thing, the notion of a well-defined
% font encoding --- which neatly pigeonholes a font into a category of containing
% a specific set of glyphs --- doesn't work so well when designers have 
% an essentially unrestricted selection of glyphs they may add to their fonts.
%
% Both technical advantages of \LaTeX's font encodings --- error checking, and
% multilingual typesetting --- were no longer relevant with \XeTeX, due to
% impracticality for the former and redundancy in the latter; \XeTeX's support
% of OpenType fonts obviates the need for font switching (for glyph coverage only) by necessity when changing 
% languages, although multiple fonts will often be used for stylistic purposes.
%
% Nonetheless, font encodings are tied inextricably into \LaTeX's font selection
% mechanisms. For the first couple of years of \XeTeX's life, defined font families
% were placed in the |U| encoding; appropriate, given the Unicode initial, but 
% \emph{inappropriate} within the framework of \LaTeX\ itself. The |U| encoding
% stands for `undefined', to be used for fonts that contain glyphs that are essentially
% arbitrary; for example, a Dingbats font.
%
% Since \XeLaTeX\ documents didn't interact with the `regular' world so much,
% this overloading of the encoding didn't really matter in the long run. But eventually,
% it became apparent that it would be appropriate to use font encodings to represent 
% Unicode subsets and/or different methods of font loading. With the advent of Lua\TeX,
% this latter use has justified the approach originally taken here.
%
% This package now also includes most of the \textsf{xunicode} package
% when unicode fonts are used under Lua\TeX.
% (For \XeTeX, \pkg{xunicode} should still be loaded explicitly unless you
% are using the \pkg{xltxtra} package.)
% The justification here is that the \pkg{xunicode} package essentially
% defines and configures a unicode font encoding for \LaTeX, which is
% therefore appropriate to have as part of the standard encoding definitions
% for unicode.
%
% \section{The \EU1 encoding}
%
% The \EU1 encoding represents the first attempt of providing a
% standard \LaTeX\ encoding for Unicode fonts.
% At present, it loads and defines nothing in terms of declaring text
% glyphs and accents. That r\^{o}le is played for now by Ross Moore's \pkg{xunicode}
% package; in the future I hope some of that package will migrate here.
% (And indeed, some of it has; see the \EU2 encoding below.)
%
% Because we can assume that all current \TeX\ distributions will
% contain the Latin Modern OpenType fonts (\path{fonts/opentype/public/lm}),
% these are selected as the default fonts. More details on this later.
%
% I am now defining the convention that \EU1 encoded fonts have no
% necessary subsets of Unicode. Perhaps in the future this will be restricted
% to fonts that support Unicode accent characters.
%
% Furthermore, no restrictions are made on the method used to load the font.
% \XeTeX\ allows fonts of two types: system installed fonts (also accessible
% via regular applications or programs); and `local' fonts, which are specified
% by filename to be found either in a |texmf| tree of the local directory.
% \iffalse
%<*eu1>
% \fi
%    \begin{macrocode}
\DeclareFontEncoding{EU1}{}{}
\DeclareErrorFont{EU1}{lmr}{m}{n}{10}
\DeclareFontSubstitution{EU1}{lmr}{m}{n}
%    \end{macrocode}
% The |:| character needs to be sanitised in case \pkg{babel} makes it active:
%    \begin{macrocode}
\g@addto@macro\nfss@catcodes{\@makeother:}
%    \end{macrocode}
% \changes{v0.1d}{2008/03/08}{Bug fix for French babel.}
% \iffalse
%</eu1>
% \fi
%
% \section{The \EU2 encoding}
%
% The \EU2 encoding is to be used with Lua\TeX, it is essentially the same as
% \EU1, the actual difference is in the font definition files.
%
% \iffalse
%<*eu2>
% \fi
%    \begin{macrocode}
\DeclareFontEncoding{EU2}{}{}
\DeclareErrorFont{EU2}{lmr}{m}{n}{10}
\DeclareFontSubstitution{EU2}{lmr}{m}{n}
%    \end{macrocode}
% The |:| character needs to be sanitised in case \pkg{babel} makes it active:
%    \begin{macrocode}
\g@addto@macro\nfss@catcodes{\@makeother:}
%    \end{macrocode}
% We also load \pkg{euxunicode},\footnote{For backwards compatibility reasons, we do not do the same under the \EU1 encoding.} our subset of Ross Moore's \pkg{xunicode} package, which provides control sequences for accessing a wide range of unicode symbols and (especially) accents.
%    \begin{macrocode}
\providecommand{\UTFencname}{EU2}
\input euxunicode.sty
%    \end{macrocode}
% \iffalse
%</eu2>
% \fi
%
% \section{The Latin Modern OpenType fonts}
%
% Version 0.1g of \pkg{euenc} supports version~1.6 of the LM fonts, released in October 2009.
%
% \subsection{Conversion scripts}
% The |.fd| files are converted from the \enc{T1} encoding
% with the following shell script.
% Only the package maintainers need to be able to run this script and those following.
%
% \subsubsection{Encoding conversion shell script}
%
% \iffalse
%<*lmscript>
% \fi
%    \begin{macrocode}
sed -f sed-eu1lm.sed `kpsewhich t1lmr.fd`   > eu1lmr.fd
sed -f sed-eu1lm.sed `kpsewhich t1lmdh.fd`  > eu1lmdh.fd
sed -f sed-eu1lm.sed `kpsewhich t1lmss.fd`  > eu1lmss.fd
sed -f sed-eu1lm.sed `kpsewhich t1lmssq.fd` > eu1lmssq.fd
sed -f sed-eu1lm.sed `kpsewhich t1lmvtt.fd` > eu1lmvtt.fd

sed -f sed-eu2lm.sed `kpsewhich t1lmr.fd`   > eu2lmr.fd
sed -f sed-eu2lm.sed `kpsewhich t1lmdh.fd`  > eu2lmdh.fd
sed -f sed-eu2lm.sed `kpsewhich t1lmss.fd`  > eu2lmss.fd
sed -f sed-eu2lm.sed `kpsewhich t1lmssq.fd` > eu2lmssq.fd
sed -f sed-eu2lm.sed `kpsewhich t1lmvtt.fd` > eu2lmvtt.fd

sed -f sed-eu1lm.sed -e \
    's/:mapping=tex-text//g' `kpsewhich t1lmtt.fd` > eu1lmtt.fd
sed -f sed-eu2lm.sed -e \
    's/;.trep;.tlig;//g' `kpsewhich t1lmtt.fd` > eu2lmtt.fd
%    \end{macrocode}
% \iffalse
%</lmscript>
% \fi
%
% \subsubsection{Encoding conversion \texttt{sed} scripts}
% The shell script above requires the following |sed| scripts.
%
% \paragraph{Sed scripts}
% \iffalse
%<*eu1sedlm,eu2sedlm>
% \fi
%    \begin{macrocode}
/^%.*/d
%<eu1sedlm>s/{T1}/{EU1}/g
%<eu1sedlm>s/t1lm/eu1lm/g
%<eu2sedlm>s/{T1}/{EU2}/g
%<eu2sedlm>s/t1lm/eu2lm/g

s/ec-lmri\([0-9]*\)/lmroman\1-italic/g
s/ec-lmro\([0-9]*\)/lmromanslant\1-regular/g
s/ec-lmr\([0-9]*\)/lmroman\1-regular/g
s/ec-lmcsco\([0-9]*\)/lmromancaps\1-oblique/g
s/ec-lmcsc\([0-9]*\)/lmromancaps\1-regular/g

s/ec-lmbxo\([0-9]*\)/lmromanslant\1-bold/g
s/ec-lmbxi\([0-9]*\)/lmroman\1-bolditalic/g
s/ec-lmbx\([0-9]*\)/lmroman\1-bold/g
s/ec-lmbo\([0-9]*\)/lmromandemi\1-oblique/g
s/ec-lmb\([0-9]*\)/lmromandemi\1-regular/g

s/ec-lmdunh\([0-9]*\)/lmromandunh\1-regular/g
s/ec-lmduno\([0-9]*\)/lmromandunh\1-oblique/g

s/ec-lmss\([0-9]\{1,\}\)/lmsans\1-regular/g
s/ec-lmsso\([0-9]\{1,\}\)/lmsans\1-oblique/g

s/ec-lmssdc\([0-9]\{1,\}\)/lmsansdemicond\1-regular/g
s/ec-lmssdo\([0-9]\{1,\}\)/lmsansdemicond\1-oblique/g

s/ec-lmssbx\([0-9]\{1,\}\)/lmsans\1-bold/g
s/ec-lmssbo\([0-9]\{1,\}\)/lmsans\1-boldoblique/g

s/ec-lmssq\([0-9]\{1,\}\)/lmsansquot\1-regular/g
s/ec-lmssqo\([0-9]\{1,\}\)/lmsansquot\1-oblique/g
s/ec-lmssqbx\([0-9]\{1,\}\)/lmsansquot\1-bold/g
s/ec-lmssqbo\([0-9]\{1,\}\)/lmsansquot\1-boldoblique/g

s/ec-lmtt\([0-9]\{1,\}\)/lmmono\1-regular/g
s/ec-lmtto\([0-9]\{1,\}\)/lmmonoslant\1-regular/g
s/ec-lmtti\([0-9]\{1,\}\)/lmmono\1-italic/g

s/ec-lmtcsc\([0-9]\{1,\}\)/lmmonocaps\1-regular/g
s/ec-lmtcso\([0-9]\{1,\}\)/lmmonocaps\1-oblique/g

s/ec-lmtl\([0-9]\{1,\}\)/lmmonolt\1-regular/g
s/ec-lmtlo\([0-9]\{1,\}\)/lmmonolt\1-oblique/g
s/ec-lmtk\([0-9]\{1,\}\)/lmmonolt\1-bold/g
s/ec-lmtko\([0-9]\{1,\}\)/lmmonolt\1-boldoblique/g

s/ec-lmtlc\([0-9]\{1,\}\)/lmmonoltcond\1-regular/g
s/ec-lmtlco\([0-9]\{1,\}\)/lmmonoltcond\1-oblique/g

s/ec-lmvtt\([0-9]\{1,\}\)/lmmonoprop\1-regular/g
s/ec-lmvtto\([0-9]\{1,\}\)/lmmonoprop\1-oblique/g

s/ec-lmvtl\([0-9]\{1,\}\)/lmmonoproplt\1-regular/g
s/ec-lmvtlo\([0-9]\{1,\}\)/lmmonoproplt\1-oblique/g
s/ec-lmvtk\([0-9]\{1,\}\)/lmmonoproplt\1-bold/g
s/ec-lmvtko\([0-9]\{1,\}\)/lmmonoproplt\1-boldoblique/g

%<eu1sedlm>s/\(>.[ ]*\)\(lm[a-z0-9\-]\{1,\}\)/\1"[\2]:mapping=tex-text"/g
%<eu2sedlm>s/\(>.[ ]*\)\(lm[a-z0-9\-]\{1,\}\)/\1file:\2:script=latn;+trep;+tlig;/g
%    \end{macrocode}
% \changes{v0.1}{2007/01/18}{`ssdc' and `ssdo' were switched with the upright for some reason.}
% \changes{v0.1d}{2008/03/08}{Missed typewriter italic somehow.}
% \changes{v0.1e}{2008/05/14}{Oblique mono was wrong (?!).}
% \iffalse
%</eu1sedlm,eu2sedlm>
% \fi
%
% \section{euxunicode.sty file}
%
% This file is derived heavily from Ross Moore's \pkg{xunicode} package.
% Most, if not all, of the code comments are his.
% We have removed the \XeTeX-specific components and removed some of the
% more esoteric control sequences from its repertoire.
%
% For backwards compatibility, we load it only under Lua\TeX.
% (I.e., with the |EU2| encoding.)
%
% \iffalse
%<*euxunicode>
% \fi
%
% \subsection{First checks}
%
% Because \pkg{euxunicode} is part of a font encoding, it may be theoretically
% loaded at any time, not just in the document preamble. (Of course, this
% is unlikely because \pkg{fontspec} will usually be setting up the font
% encoding anyway.)
%
% For this reason we do not load it as a regular package but use \cs{input} and \cs{endinput} to ensure it is only loaded once.
%    \begin{macrocode}
\csname ifeuxunicodeloaded\endcsname
\let\ifeuxunicodeloaded\endinput
%    \end{macrocode}
% Now check for \XeTeX\ or Lua\TeX\ use:
% (again, just as unlikely this will fail)
%    \begin{macrocode}
\def\notUnicodeEngine{%
  \@latex@error{*** this package currently works only with XeTeX or LuaTeX ***^^J
   You are not using XeTeX or LuaTeX, so we are exiting cleanly!^^J
   Continuing may lead to 'unavailable font metrics' errors!^^J}\@ehc
  \endgroup\endinput}
\expandafter\ifx\csname XeTeXrevision\endcsname\relax
  \expandafter\ifx\csname directlua\endcsname\relax
    \notUnicodeEngine
  \else
    \def\@Engine{LuaTeX}
  \fi
\else
  \def\@Engine{XeTeX}
\fi
%    \end{macrocode}
% The single biggest mistake made by novice \XeTeX\ users is
% to declare wrong encodings, using the {(lua)inputenc} package.
% While not fatal, this can cause bad output, which they then
% incorrectly attribute to \XeTeX\ or Lua\TeX .
% So here is a test for this error, which posts warning messages.
%
% We also deprecate \pkg{xunicode}, but there is no way by default
% that that code path will ever run (this package is only loaded under
% Lua\TeX\ for now, and \pkg{xunicode} can only be loaded under \XeTeX).
%
%    \begin{macrocode}
\def\@TestForWongPackage{%
 \@ifpackageloaded{inputenc}{\@dontuse@inputenc}{}%
 \@ifpackageloaded{luainputenc}{\@dontuse@inputenc}{}%
 \@ifpackageloaded{xunicode}{\@dontuse@xunicode}{}%
}
\def\@dontuse@inputenc{%
  \typeout{*** You should *not* be loading inputenc nor luainputenc}%
  \typeout{*** with the \UTFencname\space encoding. Your engine}%
  \typeout{*** expects the source to be in UTF-8 encoding.}%
  \typeout{*** Some features of other encodings may conflict,
 resulting in poor output.}%
}
\def\@dontuse@xunicode{%
  \typeout{*** xunicode is deprecated, please use only the fontspec package,}%
  \typeout{*** it will automatically load the relevant packages.}%
}
\def\@cleanupaftertest{%
 \let\@TestForWongPackage\relax
 \let\@dontuse@inputenc\relax
 \let\@dontuse@xunicode\relax
}
\@TestForWongPackage
\AtBeginDocument{\@TestForWongPackage}
\AtBeginDocument{\@cleanupaftertest}
%    \end{macrocode}
%
% \subsection{Macro definitions}
%
% \begin{macro}{\DeclareUTFcharacter}
% Use |\DeclareUTFcharacter| to assign a cs-name to
% access a Unicode code-point.
%    \begin{macrocode}
\newcommand{\DeclareUTFcharacter}[3][\UTFencname]{%
  \let\add@flag\@ne % ==> add support in this encoding
  \check@hexcom@digits #2@@@@@!@{#1}{#2}{#3}%
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\UndeclareUTFcharacter}
% Use |\UndeclareUTFcharacter| to cancel a declaration
% when the appropriate code-point is not supported in the
% desired text-font.
%    \begin{macrocode}
\newcommand{\UndeclareUTFcharacter}[3][\UTFencname]{%
  \let\add@flag\z@ % ==> remove support in this encoding
  \check@hexcom@digits #2@@@@@!@{#1}{#2}{#3}%
}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\def\check@hexcom@digits#1#2@!@#3#4#5{%
 \ifx x#1\relax
  \check@hexcom@digits@#2@!@{#3}{#4}{#5}%
 \else
  \UTFacc@warning@{code #4 for #3-\string#5 fails to start with 'x'}%
 \fi
}
%    \end{macrocode}
% \begin{macro}{\DeclareUTFcomposite}
% Use |\DeclareUTFcomposite| to assign a cs-name to access
% accents or composite characters via Unicode code-points,
% or the Unicode "Composing Character" mechanism.
%    \begin{macrocode}
\newcommand{\DeclareUTFcomposite}[4][\UTFencname]{{%
  \let\add@flag\@ne % ==> add support in this encoding
  \check@hex@digits #2@@@@@!@{#1}{#2}{#3}{#4}%
}}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\newcommand{\DeclareUTFmulticomposite}[4][\UTFencname]{{%
  \let\add@flag\@ne % ==> add support in this encoding
  \check@hex@digits #2@@@@@!@{#1}{#2}{#3}{#4}%
}}
%    \end{macrocode}
%
% \begin{macro}{\UndeclareUTFcomposite}
% Use |\UndeclareUTFcomposite| to cancel a declaration
% when the appropriate code-point is not supported in the
% desired text-font.
%    \begin{macrocode}
\newcommand{\UndeclareUTFcomposite}[4][\UTFencname]{{%
  \let\add@flag\z@ % ==> remove support in this encoding
  \check@hex@digits #2@@@@@!@{#1}{#2}{#3}{#4}%
}}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\def\check@hex@digits#1#2@!@#3#4#5#6{%
 \ifx x#1\relax
   \check@hex@digits@#2@!@{#3}{#4}{#5}{#6}%
 \else
  \UTFacc@warning@{code #4 for #3-\string#5#6 fails to start with 'x'}%
 \fi
}
\def\UTF@ignore#1{\iffalse}
\def\UTF@doit#1{\iftrue}
%    \end{macrocode}
% These next macros need to have |"| with correct catcode.
%    \begin{macrocode}
{\catcode`\"=12
%
\gdef\check@hexcom@digits@#1#2#3#4#5@!@#6#7#8{%
 \ifx @#4\relax
  \UTFacc@warning@{insufficient hex digits #7 for #6-\string#8}%
 \else
  \ifcat \active\noexpand#8%
   \ifx\add@flag\@ne %
    \expandafter\def\csname\UTFencname\string#8\endcsname{\char"#1#2#3#4\relax}%
    \ifx\unDeFiNed@#8%
     \ifx\cf@encoding\UTFencname
      \DeclareTextCommand{#8}{OT1}{\undefined}%
     \else
      \DeclareTextCommand{#8}{\cf@encoding}{\undefined}%
     \fi
    \else {% macro #8 exists already ...
      \let\protect\noexpand
      \edef\UTF@testi{#8}\def\UTF@testii{#8}%
      \ifx\UTF@testi\UTF@testii\aftergroup\UTF@ignore
      \else\aftergroup\UTF@doit\fi
     }%
     \iffalse
      % ... but when it isn't robust, make it so
      \expandafter\let\csname?-\string#8\endcsname#8\relax
      \edef\next@UTF@{{\cf@encoding}%
        {\expandafter\noexpand\csname?-\string#8\endcsname}}%
      \expandafter\DeclareTextCommand\expandafter
         {\expandafter#8\expandafter}\next@UTF@
     \fi
    \fi %
   \else % \add@flag \z@
    \expandafter\global\expandafter
      \let\csname\UTFencname\string#8\endcsname\relax
   \fi % end of \add@flag switch
  \else % not active catcode --- shouldn't happen
  % \typeout{*** did you really mean #8 ? ***}%
   \ifx\add@flag\@ne %
    \edef\tmp@name{\expandafter\string\csname\UTFencname\endcsname
      \expandafter\string\csname#8\endcsname}%
    \expandafter\def\csname\tmp@name\endcsname{\char"#1#2#3#4\relax}%
    \ifx\cf@encoding\UTFencname
     \expandafter\DeclareTextCommand\expandafter
       {\csname#8\endcsname}{OT1}{\undefined}%
    \else
     \expandafter\DeclareTextCommand\expandafter
       {\csname#8\endcsname}{\cf@encoding}{\undefined}%
    \fi
   \else % \add@flag \z@
    \expandafter\global\expandafter\let\csname#8\endcsname\relax
   \fi % end of \add@flag switch
  \fi % end of \ifcat
 \fi}
\gdef\check@hex@digits@#1#2#3#4#5@!@#6#7#8#9{%
 \ifx @#4\relax
  \UTFacc@warning@{insufficient hex digits #7 for #6-\string#8#9}%
 \else
  \def\UTFchar{\char"#1#2#3#4\relax}%
  \expandafter\expandafter\expandafter\declare@utf@composite
  \expandafter\expandafter\expandafter
   {\expandafter\csname#6\endcsname}{\UTFchar}{#8}{#9}\relax
 \fi}
%\gdef\add@UTF@accent#1#2#3{#2\char"#1\relax}
\gdef\add@UTF@accent#1#2#3{\ifx\relax#2\relax\char"#3\else
 \ifx\ #2\relax\char"#3\else
 \expandafter\ifx\UTF@space#2\relax\char"#3\else
 \ifx~#2\char"#3\else#2\char"#1\fi\fi\fi\fi\relax}
\gdef\add@UTF@accents#1#2#3{#2\char"#1\char"#3\relax}
\gdef\add@set@accentCOMP#1#2#3{\add@accent{"#1}{#2}}
\gdef\add@set@accentMOD#1#2#3{\add@accent{"#3}{#2}}
\gdef\declare@hex@command#1#2{\gdef#2{#1}}%
%
}%  end of \catcode`\"=12

{\catcode`\ =10\relax%
\gdef\UTF@@space{ }}%
\edef\UTF@space{\UTF@@space}

\def\declare@utf@composite#1#2#3#4{%
 \expandafter\ifcat\expandafter A\string#4\relax
  {\ifx\add@flag\@ne %
   \expandafter\xdef\csname\string#1\string#3-#4\endcsname{#2}%
  \else
   \expandafter\global\expandafter
    \let\csname\string#1\string#3-#4\endcsname\relax
  \fi}%
 \else
  {\ifx\add@flag\@ne %
   \expandafter\xdef\csname\string#1\string#3-\string#4\endcsname{#2}%
  \else
   \expandafter\global\expandafter
    \let\csname\string#1\string#3-\string#4\endcsname\relax
  \fi}%
 \fi
}
%    \end{macrocode}
% \begin{macro}{\DeclareEncodedCompositeCharacter}
% |\DeclareEncodedCompositeCharacter|\\
% \#1 = encoding\\
% \#2 = accent-macro in TeX\\
% \#3 = position of combining glyph in Unicode\\
% \#4 = bare accent position, in Unicode\\
% \#\#1 = slot for the accented letter
%    \begin{macrocode}
\newcommand{\DeclareEncodedCompositeCharacter}[4]{%
  \expandafter\def\csname #1\string#2\endcsname##1{%
    \expandafter\@text@composite \csname #1\string#2\endcsname##1\@empty
    \@text@composite{\add@encoded@accent{#3}{##1}{#4}}}%
}
%    \end{macrocode}
% \end{macro}
%    \begin{macrocode}
\newcommand{\DeclareEncodedCompositeAccents}[4]{%
  \expandafter\def\csname #1\string#2\endcsname##1{%
    \expandafter\@text@composite \csname #1\string#2\endcsname##1\@empty
    \@text@composite{\add@encoded@accents{#4}{##1}{#3}}}%
}
\let\add@encoded@accent\add@UTF@accent
\let\add@encoded@accents\add@UTF@accents
%\let\add@encoded@accent\add@set@accentCOMP
%\let\add@encoded@accent\add@set@accentMOD
%    \end{macrocode}
% \subsection{Basic definitions}
%    \begin{macrocode}
\DeclareEncodedCompositeCharacter{\UTFencname}{\`}{0300}{02CB}  % Combining grave accent
\@ifundefined{capitalgrave}{\DeclareTextAccent{\capitalgrave}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalgrave}{0300}{02CB}  % textcomp grave accent
\DeclareEncodedCompositeCharacter{\UTFencname}{\'}{0301}{02CA}  % Combining acute accent
\@ifundefined{capitalacute}{\DeclareTextAccent{\capitalacute}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalacute}{0301}{02CA}  % textcomp acute accent
\DeclareEncodedCompositeCharacter{\UTFencname}{\^}{0302}{02C6}  % Combining circumflex accent
\@ifundefined{capitalcircumflex}{\DeclareTextAccent{\capitalcircumflex}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalcircumflex}{0302}{02C6}  % textcomp circumflex accent
\DeclareEncodedCompositeCharacter{\UTFencname}{\~}{0303}{02DC}  % Combining tilde
\@ifundefined{capitaltilde}{\DeclareTextAccent{\capitaltilde}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitaltilde}{0303}{02DC}  % textcomp tilde
\DeclareEncodedCompositeCharacter{\UTFencname}{\=}{0304}{02C9}  % Combining macron
\@ifundefined{capitalmacron}{\DeclareTextAccent{\capitalmacron}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalmacron}{0304}{02C9}  % textcomp macron
\DeclareTextAccent{\textoverline}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textoverline}{0305}{203E}  % Combining overline
\DeclareEncodedCompositeCharacter{\UTFencname}{\u}{0306}{02D8}  % Combining breve
\@ifundefined{capitalbreve}{\DeclareTextAccent{\capitalbreve}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalbreve}{0306}{02D8}  % textcomp breve
\DeclareEncodedCompositeCharacter{\UTFencname}{\.}{0307}{02D9}  % Combining dot above
\@ifundefined{capitaldotaccent}{\DeclareTextAccent{\capitaldotaccent}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitaldotaccent}{0307}{02D9}  % textcomp dot above
\DeclareEncodedCompositeCharacter{\UTFencname}{\"}{0308}{00A8}  % Combining diaeresis
\@ifundefined{capitaldieresis}{\DeclareTextAccent{\capitaldieresis}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitaldieresis}{0308}{00A8}  % textcomp diaeresis
\@ifundefined{m}{\DeclareTextAccent{\m}{OT1}{999}}{} % miscellaneous IPA symbols
\DeclareEncodedCompositeCharacter{\UTFencname}{\m}{0309}{0309}  % (Combining hook above)
\DeclareTextAccent{\texthookabove}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\texthookabove}{0309}{0309}  % Combining hook above
\DeclareEncodedCompositeCharacter{\UTFencname}{\r}{030A}{02DA}  % Combining ring above
\@ifundefined{capitalring}{\DeclareTextAccent{\capitalring}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalring}{030A}{02DA}  % textcomp ring above
\DeclareEncodedCompositeCharacter{\UTFencname}{\H}{030B}{02DD}  % Combining double acute
\@ifundefined{capitalhungarumlaut}{\DeclareTextAccent{\capitalhungarumlaut}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalhungarumlaut}{030B}{02DD}  % textcomp double acute
\DeclareEncodedCompositeCharacter{\UTFencname}{\v}{030C}{02C7}  % Combining caron
\@ifundefined{capitalcaron}{\DeclareTextAccent{\capitalcaron}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalcaron}{030C}{02C7}  % textcomp caron
\@ifundefined{textvbaraccent}{\DeclareTextAccent{\textvbaraccent}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textvbaraccent}{030D}{02C8}  % Combining vertical line above
\@ifundefined{textdoublevbaraccent}{\DeclareTextAccent{\textdoublevbaraccent}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoublevbaraccent}{030E}{030E}  % Combining double vertical line above
\@ifundefined{U}{\DeclareTextAccent{\U}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\U}{030E}{}  % Combining double vertical line above
\@ifundefined{textdoublegrave}{\DeclareTextAccent{\textdoublegrave}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoublegrave}{030F}{02F5}  % Combining double grave accent
\@ifundefined{G}{\DeclareTextAccent{\G}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\G}{030F}{02F5}  % Combining double grave accent
\@ifundefined{textdotbreve}{\DeclareTextAccent{\textdotbreve}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdotbreve}{0310}{0310}  % Combining candrabindu
\@ifundefined{textroundcap}{\DeclareTextAccent{\textroundcap}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textroundcap}{0311}{0311}  % Combining inverted breve
\@ifundefined{newtie}{\DeclareTextAccent{\newtie}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\newtie}{0311}{0311}  % Combining inverted breve
\@ifundefined{capitalnewtie}{\DeclareTextAccent{\capitalnewtie}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalnewtie}{0311}{0311}  % Combining inverted breve
\@ifundefined{t}{\DeclareTextAccent{\t}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\t}{0311}{0311}  % Combining inverted breve
\@ifundefined{capitaltie}{\DeclareTextAccent{\capitaltie}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitaltie}{0311}{0311}  % Combining inverted breve
\DeclareTextAccent{\textturncommaabove}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textturncommaabove}{0312}{02BB}  % Combining turned comma above
\DeclareTextAccent{\textcommaabove}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textcommaabove}{0313}{02BC}  % Combining comma above
\DeclareTextAccent{\textrevcommaabove}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrevcommaabove}{0314}{02BD}  % Combining reversed comma above
\DeclareTextAccent{\textcommaabover}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textcommaabover}{0315}{02BC}  % Combining comma above right
\@ifundefined{textsubgrave}{\DeclareTextAccent{\textsubgrave}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubgrave}{0316}{02CE}  % Combining grave accent below
\@ifundefined{textsubacute}{\DeclareTextAccent{\textsubacute}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubacute}{0317}{02CF}  % Combining acute accent below
\@ifundefined{textadvancing}{\DeclareTextAccent{\textadvancing}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textadvancing}{0318}{0318}  % Combining left tack below
\@ifundefined{textretracting}{\DeclareTextAccent{\textretracting}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textretracting}{0319}{0319}  % Combining right tack below
\DeclareTextAccent{\textlangleabove}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textlangleabove}{031A}{031A}  % Combining left angle above
\DeclareTextAccent{\textrighthorn}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrighthorn}{031B}{031B}  % Combining horn
\@ifundefined{textsublhalfring}{\DeclareTextAccent{\textsublhalfring}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsublhalfring}{031C}{02D3}  % Combining left half ring below
\@ifundefined{textraising}{\DeclareTextAccent{\textraising}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textraising}{031D}{02D4}  % Combining up tack below
\@ifundefined{textlowering}{\DeclareTextAccent{\textlowering}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textlowering}{031E}{02D5}  % Combining down tack below
\@ifundefined{textsubplus}{\DeclareTextAccent{\textsubplus}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubplus}{031F}{02D6}  % Combining plus sign below
\@ifundefined{textsubminus}{\DeclareTextAccent{\textsubminus}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubminus}{0320}{02D7}  % Combining minus sign below
\DeclareTextAccent{\textpalhookbelow}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textpalhookbelow}{0321}{0321}  % Combining palatalized hook below
\@ifundefined{M}{\DeclareTextAccent{\M}{OT1}{999}}{} % more Miscellaneous IPA characters
\DeclareEncodedCompositeCharacter{\UTFencname}{\M}{0322}{0322}  % (Combining retroflex hook below)
\DeclareTextAccent{\textrethookbelow}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrethookbelow}{0322}{0322}  % Combining retroflex hook below
\DeclareEncodedCompositeCharacter{\UTFencname}{\d}{0323}{0323}  % Combining dot below
\@ifundefined{textsubdot}{\DeclareTextAccent{\textsubdot}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubdot}{0323}{0323}  % Combining dot below
\@ifundefined{textsubumlaut}{\DeclareTextAccent{\textsubumlaut}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubumlaut}{0324}{0324}  % Combining diaeresis below
\@ifundefined{textsubring}{\DeclareTextAccent{\textsubring}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubring}{0325}{02F3}  % Combining ring below
\DeclareTextAccent{\textcommabelow}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textcommabelow}{0326}{0326}  % Combining comma below
\DeclareEncodedCompositeCharacter{\UTFencname}{\c}{0327}{00B8}  % Combining cedilla
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalcedilla}{0327}{00B8}  % Combining cedilla
\DeclareEncodedCompositeCharacter{\UTFencname}{\k}{0328}{02DB}  % Combining ogonek
\DeclareEncodedCompositeCharacter{\UTFencname}{\capitalogonek}{0328}{02DB}  % Combining ogonek
\@ifundefined{textpolhook}{\DeclareTextAccent{\textpolhook}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textpolhook}{0328}{02DB}  % Combining ogonek
\@ifundefined{textsyllabic}{\DeclareTextAccent{\textsyllabic}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsyllabic}{0329}{02CC}  % Combining vertical line below
\@ifundefined{textsubbridge}{\DeclareTextAccent{\textsubbridge}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubbridge}{032A}{032A}  % Combining bridge below
\let\dental\textsubbridge
\@ifundefined{textsubw}{\DeclareTextAccent{\textsubw}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubw}{032B}{032B}  % Combining inverted double arch below
\@ifundefined{textsubwedge}{\DeclareTextAccent{\textsubwedge}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubwedge}{032C}{032C}  % Combining caron below
\@ifundefined{textsubcircum}{\DeclareTextAccent{\textsubcircum}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubcircum}{032D}{032D}  % Combining circumflex accent below
\@ifundefined{textundertie}{\DeclareTextAccent{\textundertie}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textundertie}{032E}{203F}  % Combining breve below
\@ifundefined{textsubarch}{\DeclareTextAccent{\textsubarch}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubarch}{032F}{032F}  % Combining inverted breve below
\let\underarch\textsubarch
\@ifundefined{textsubtilde}{\DeclareTextAccent{\textsubtilde}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubtilde}{0330}{02F7}  % Combining tilde below
\@ifundefined{textsubbar}{\DeclareTextAccent{\textsubbar}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubbar}{0331}{02CD}  % Combining macron below
\DeclareEncodedCompositeCharacter{\UTFencname}{\b}{0332}{005F}  % Combining low line
\@ifundefined{subdoublebar}{\DeclareTextAccent{\subdoublebar}{OT1}{999}}{} 
\DeclareEncodedCompositeCharacter{\UTFencname}{\subdoublebar}{0333}{0333}  % ??? see x0347
%\DeclareEncodedCompositeCharacter{\UTFencname}{\subdoublebar}{0333}{0347}  % Combining double low line
\DeclareTextAccent{\textsuperimposetilde}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsuperimposetilde}{0334}{007E}  % Combining tilde overlay,  x02DC ?
\@ifundefined{B}{\DeclareTextAccent{\B}{OT1}{999}}{} % barred variants for TIPA
\DeclareEncodedCompositeCharacter{\UTFencname}{\B}{0335}{02D7}  % (Combining short stroke overlay)
\DeclareTextAccent{\textsstrokethru}{OT1}{999} % stroke thru lowercase letters
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsstrokethru}{0335}{00AF}  % Combining short stroke overlay,  x02D7 ?
\DeclareTextAccent{\textlstrokethru}{OT1}{999} % stroke thru Uppercase letters
\DeclareEncodedCompositeCharacter{\UTFencname}{\textlstrokethru}{0336}{0336}  % Combining long stroke overlay
\DeclareTextAccent{\textsstrikethru}{OT1}{999} % strike out lowercase letters
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsstrikethru}{0337}{0337}  % Combining short solidus overlay
\DeclareTextAccent{\textlstrikethru}{OT1}{999} % strike out Uppercase letters
\DeclareEncodedCompositeCharacter{\UTFencname}{\textlstrikethru}{0338}{0338}  % Combining long solidus overlay
\@ifundefined{textsubrhalfring}{\DeclareTextAccent{\textsubrhalfring}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubrhalfring}{0339}{02D2}  % Combining right half ring below
\@ifundefined{textinvsubbridge}{\DeclareTextAccent{\textinvsubbridge}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textinvsubbridge}{033A}{033A}  % Combining inverted bridge below
\@ifundefined{textsubsquare}{\DeclareTextAccent{\textsubsquare}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textsubsquare}{033B}{033B}  % Combining square below
\@ifundefined{textseagull}{\DeclareTextAccent{\textseagull}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textseagull}{033C}{033C}  % Combining seagull below
\@ifundefined{textovercross}{\DeclareTextAccent{\textovercross}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textovercross}{033D}{033D}  % Combining x above
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{033E}{}  % Combining vertical tilde
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{033F}{}  % Combining double overline
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0340}{}  % Combining grave tone mark
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0341}{}  % Combining acute tone mark
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0342}{}  % Combining greek perispomeni
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0343}{}  % Combining greek koronis
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0344}{}  % Combining greek dialytika tonos
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0345}{}  % Combining greek ypogegrammeni
\@ifundefined{overbridge}{\DeclareTextAccent{\overbridge}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\overbridge}{0346}{0346}  % Combining bridge above
%\@ifundefined{subdoublebar}{\DeclareTextAccent{\subdoublebar}{OT1}{999}}{}
%\DeclareEncodedCompositeCharacter{\UTFencname}{\subdoublebar}{0347}{0347}  % ???  see x0333
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0347}{0347}  % Combining equals sign below
\@ifundefined{subdoublevert}{\DeclareTextAccent{\subdoublevert}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\subdoublevert}{0348}{0348}  % Combining double vertical line below
\@ifundefined{subcorner}{\DeclareTextAccent{\subcorner}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\subcorner}{0349}{0349}  % Combining left angle below
\@ifundefined{textoverw}{\DeclareTextAccent{\textoverw}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textoverw}{034A}{034A} % ??? Combining not tilde above
\@ifundefined{crtilde}{\DeclareTextAccent{\crtilde}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\crtilde}{034A}{034A} % Combining not tilde above
\@ifundefined{dottedtilde}{\DeclareTextAccent{\dottedtilde}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\dottedtilde}{034B}{034B}  % Combining homothetic above
\@ifundefined{doubletilde}{\DeclareTextAccent{\doubletilde}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\doubletilde}{034C}{034C}  % Combining almost equal to above
\@ifundefined{spreadlips}{\DeclareTextAccent{\spreadlips}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\spreadlips}{034D}{034D}  % Combining left right arrow below
\@ifundefined{whistle}{\DeclareTextAccent{\whistle}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\whistle}{034E}{02F0}  % Combining upwards arrow below
\DeclareTextAccent{\textgraphemejoin}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textgraphemejoin}{034F}{034F}  % Combining grapheme joiner
\DeclareTextAccent{\textrightarrowhead}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrightarrowhead}{0350}{0350}  % Combining right arrowhead above
\DeclareTextAccent{\textlefthalfring}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textlefthalfring}{0351}{02D3}  % Combining left half ring above
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0352}{0352}  % Combining fermata
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0353}{0353}  % Combining x below
\@ifundefined{sublptr}{\DeclareTextAccent{\sublptr}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\sublptr}{0354}{02F1}  % Combining left arrowhead below
\@ifundefined{subrptr}{\DeclareTextAccent{\subrptr}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\subrptr}{0355}{02F2}  % Combining right arrowhead below
\DeclareTextAccent{\textrightuparrowhead}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrightuparrowhead}{0356}{0356}  % Combining right arrowhead and up
\DeclareTextAccent{\textrighthalfring}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textrighthalfring}{0357}{02D2}  % Combining right half ring above
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0358}{}  %  ** unassigned **
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0359}{}  %  ** unassigned **
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{035A}{}  %  ** unassigned **
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{035B}{}  %  ** unassigned **
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{035C}{}  %  ** unassigned **
\DeclareTextAccent{\textdoublebreve}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoublebreve}{035D}{035D}  % Combining double breve
\DeclareTextAccent{\textdoublemacron}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoublemacron}{035E}{035E}  % Combining double macron
\DeclareTextAccent{\textdoublemacronbelow}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoublemacronbelow}{035F}{035F}  % Combining double macron below
\DeclareTextAccent{\textdoubletilde}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textdoubletilde}{0360}{0360}  % Combining double tilde
\@ifundefined{texttoptiebar}{\DeclareTextAccent{\texttoptiebar}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\texttoptiebar}{0361}{0361}  % Combining double inverted breve
\@ifundefined{sliding}{\DeclareTextAccent{\sliding}{OT1}{999}}{}
\DeclareEncodedCompositeCharacter{\UTFencname}{\sliding}{0362}{0362}  % Combining double rightwards arrow
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0363}{0363}  % Combining latin small letter a
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0364}{0364}  % Combining latin small letter e
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0365}{0365}  % Combining latin small letter i
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0366}{0366}  % Combining latin small letter o
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0367}{0367}  % Combining latin small letter u
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0368}{0368}  % Combining latin small letter c
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{0369}{0369}  % Combining latin small letter d
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036A}{036A}  % Combining latin small letter h
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036B}{036B}  % Combining latin small letter m
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036C}{036C}  % Combining latin small letter r
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036D}{036D}  % Combining latin small letter t
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036E}{036E}  % Combining latin small letter v
%\DeclareEncodedCompositeCharacter{\UTFencname}{\?}{036F}{036F}  % Combining latin small letter x
%    \end{macrocode}
% \subsection{Missing IPA accenting macros}
%    \begin{macrocode}
%\DeclareEncodedCompositeCharacter{\UTFencname}{\partvoiceless}{????}  % Combining (o) below
%\DeclareEncodedCompositeCharacter{\UTFencname}{\inipartvoiceless}{????}  % Combining (o  below
%\DeclareEncodedCompositeCharacter{\UTFencname}{\finpartvoiceless}{????}  % Combining  o) below
%\DeclareEncodedCompositeCharacter{\UTFencname}{\partvoice}{????}  % Combining (v) below
%\DeclareEncodedCompositeCharacter{\UTFencname}{\inipartvoice}{????}  % Combining (v  below
%\DeclareEncodedCompositeCharacter{\UTFencname}{\finpartvoice}{????}  % Combining  v) below

\@ifundefined{bibridge}{\DeclareTextAccent{\bibridge}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\bibridge}{032A}{0346}  % IPA bi-bridge
\@ifundefined{textmidacute}{\DeclareTextAccent{\textmidacute}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textmidacute}{0304}{0301}  % macron-acute ligature
\@ifundefined{textgravemid}{\DeclareTextAccent{\textgravemid}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textgravemid}{0300}{0304}  % grave-macron ligature
\@ifundefined{textgravecircum}{\DeclareTextAccent{\textgravecircum}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textgravecircum}{0300}{0302}  % grave-circumflex ligature
\@ifundefined{textcircumacute}{\DeclareTextAccent{\textcircumacute}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textcircumacute}{0301}{0302}  % circumflex-acute ligature
\@ifundefined{textgravedot}{\DeclareTextAccent{\textgravedot}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textgravedot}{0300}{0307}  % grave-dot ligature
\@ifundefined{textdotacute}{\DeclareTextAccent{\textdotacute}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdotacute}{0307}{0301}  % dot-acute ligature
\@ifundefined{textacutemacron}{\DeclareTextAccent{\textacutemacron}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textacutemacron}{0301}{0304}  % acute-macron ligature
\@ifundefined{textgravemacron}{\DeclareTextAccent{\textgravemacron}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textgravemacron}{0300}{0304}  % grave-macron ligature
\@ifundefined{textacutewedge}{\DeclareTextAccent{\textacutewedge}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textacutewedge}{0301}{030C}  % acute-wedge ligature
\@ifundefined{textcircumdot}{\DeclareTextAccent{\textcircumdot}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textcircumdot}{0302}{0307}  % circumflex-dot ligature
\@ifundefined{texttildedot}{\DeclareTextAccent{\texttildedot}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\texttildedot}{0303}{0307}  % tilde-dot ligature
\@ifundefined{textringmacron}{\DeclareTextAccent{\textringmacron}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textringmacron}{030A}{0304}  % ring-macron ligature
\@ifundefined{textbrevemacron}{\DeclareTextAccent{\textbrevemacron}{OT1}{999}}{}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbrevemacron}{0306}{0304}  % breve-macron ligature

\DeclareTextAccent{\texthookcircum}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\texthookcircum}{0309}{0302}
\DeclareTextAccent{\texttildecircum}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\texttildecircum}{0303}{0302}
\DeclareTextAccent{\textdieresisoverline}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdieresisoverline}{0304}{0308}
\DeclareTextAccent{\textdieresisacute}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdieresisacute}{0301}{0308}
\DeclareTextAccent{\textdieresisgrave}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdieresisgrave}{0300}{0308}
\DeclareTextAccent{\textdieresiscaron}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdieresiscaron}{030C}{0308}
\DeclareTextAccent{\texttildeoverline}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\texttildeoverline}{0303}{0304}
\DeclareTextAccent{\textdotoverline}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdotoverline}{0304}{0307}
\DeclareTextAccent{\textringacute}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textringacute}{0301}{030A}
\DeclareTextAccent{\textcircumdotbelow}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textcircumdotbelow}{0302}{0323}
\DeclareTextAccent{\textbreveacute}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbreveacute}{0301}{0306}
\DeclareTextAccent{\textbrevegrave}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbrevegrave}{0300}{0306}
\DeclareTextAccent{\textbrevehook}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbrevehook}{0309}{0306}
\DeclareTextAccent{\textbrevetilde}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbrevetilde}{0303}{0306}
\DeclareTextAccent{\textbrevedotbelow}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textbrevedotbelow}{0323}{0306}
\DeclareTextAccent{\textacutehorn}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textacutehorn}{0301}{031B}
\DeclareTextAccent{\textgravehorn}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textgravehorn}{0300}{031B}
\DeclareTextAccent{\texthookhorn}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\texthookhorn}{0309}{031B}
\DeclareTextAccent{\texttildehorn}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\texttildehorn}{0303}{031B}
\DeclareTextAccent{\textdotbelowhorn}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textdotbelowhorn}{0323}{031B}
\DeclareTextAccent{\textogonekoverline}{OT1}{999}
\DeclareEncodedCompositeAccents{\UTFencname}{\textogonekoverline}{0328}{0304}

\DeclareTextAccent{\textmiddledot}{OT1}{999}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textmiddledot}{05BC}{05BC}
%    \end{macrocode}
% \subsection{Rare definitions}
% Not many fonts support these code-points yet.
%    \begin{macrocode}
\DeclareUTFcharacter[\UTFencname]{x3008}{\textlangle}
\DeclareUTFcharacter[\UTFencname]{x3009}{\textrangle}
\DeclareUTFcharacter[\UTFencname]{x301A}{\textlbrackdbl}
\DeclareUTFcharacter[\UTFencname]{x301B}{\textrbrackdbl}
%    \end{macrocode}
% \subsubsection{Old-style numbers}
%    \begin{macrocode}
\DeclareUTFcharacter[\UTFencname]{xFF10}{\textzerooldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF11}{\textoneoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF12}{\texttwooldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF13}{\textthreeoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF14}{\textfouroldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF15}{\textfiveoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF16}{\textsixoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF17}{\textsevenoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF18}{\texteightoldstyle}
\DeclareUTFcharacter[\UTFencname]{xFF19}{\textnineoldstyle}
%    \end{macrocode}
% \subsubsection{Circled letters and small numbers}
%    \begin{macrocode}
\DeclareEncodedCompositeCharacter{\UTFencname}{\textcircled}{20DD}{25EF}
%    \end{macrocode}
%    \begin{macrocode}
\DeclareUTFcomposite[\UTFencname]{x2460}{\textcircled}{1}
\DeclareUTFcomposite[\UTFencname]{x2461}{\textcircled}{2}
\DeclareUTFcomposite[\UTFencname]{x2462}{\textcircled}{3}
\DeclareUTFcomposite[\UTFencname]{x2463}{\textcircled}{4}
\DeclareUTFcomposite[\UTFencname]{x2464}{\textcircled}{5}
\DeclareUTFcomposite[\UTFencname]{x2465}{\textcircled}{6}
\DeclareUTFcomposite[\UTFencname]{x2466}{\textcircled}{7}
\DeclareUTFcomposite[\UTFencname]{x2467}{\textcircled}{8}
\DeclareUTFcomposite[\UTFencname]{x2468}{\textcircled}{9}
\DeclareUTFcomposite[\UTFencname]{x2469}{\textcircled}{10}
\DeclareUTFcomposite[\UTFencname]{x246A}{\textcircled}{11}
\DeclareUTFcomposite[\UTFencname]{x246B}{\textcircled}{12}
\DeclareUTFcomposite[\UTFencname]{x246C}{\textcircled}{13}
\DeclareUTFcomposite[\UTFencname]{x246D}{\textcircled}{14}
\DeclareUTFcomposite[\UTFencname]{x246E}{\textcircled}{15}
\DeclareUTFcomposite[\UTFencname]{x246F}{\textcircled}{16}
\DeclareUTFcomposite[\UTFencname]{x2470}{\textcircled}{17}
\DeclareUTFcomposite[\UTFencname]{x2471}{\textcircled}{18}
\DeclareUTFcomposite[\UTFencname]{x2472}{\textcircled}{19}
\DeclareUTFcomposite[\UTFencname]{x2473}{\textcircled}{20}

\DeclareUTFcomposite[\UTFencname]{x24B6}{\textcircled}{A}
\DeclareUTFcomposite[\UTFencname]{x24B7}{\textcircled}{B}
\DeclareUTFcomposite[\UTFencname]{x24B8}{\textcircled}{C}
\DeclareUTFcomposite[\UTFencname]{x24B9}{\textcircled}{D}
\DeclareUTFcomposite[\UTFencname]{x24BA}{\textcircled}{E}
\DeclareUTFcomposite[\UTFencname]{x24BB}{\textcircled}{F}
\DeclareUTFcomposite[\UTFencname]{x24BC}{\textcircled}{G}
\DeclareUTFcomposite[\UTFencname]{x24BD}{\textcircled}{H}
\DeclareUTFcomposite[\UTFencname]{x24BE}{\textcircled}{I}
\DeclareUTFcomposite[\UTFencname]{x24BF}{\textcircled}{J}
\DeclareUTFcomposite[\UTFencname]{x24C0}{\textcircled}{K}
\DeclareUTFcomposite[\UTFencname]{x24C1}{\textcircled}{L}
\DeclareUTFcomposite[\UTFencname]{x24C2}{\textcircled}{M}
\DeclareUTFcomposite[\UTFencname]{x24C3}{\textcircled}{N}
\DeclareUTFcomposite[\UTFencname]{x24C4}{\textcircled}{O}
\DeclareUTFcomposite[\UTFencname]{x24C5}{\textcircled}{P}
\DeclareUTFcomposite[\UTFencname]{x24C6}{\textcircled}{Q}
\DeclareUTFcomposite[\UTFencname]{x24C7}{\textcircled}{R}
\DeclareUTFcomposite[\UTFencname]{x24C8}{\textcircled}{S}
\DeclareUTFcomposite[\UTFencname]{x24C9}{\textcircled}{T}
\DeclareUTFcomposite[\UTFencname]{x24CA}{\textcircled}{U}
\DeclareUTFcomposite[\UTFencname]{x24CB}{\textcircled}{V}
\DeclareUTFcomposite[\UTFencname]{x24CC}{\textcircled}{W}
\DeclareUTFcomposite[\UTFencname]{x24CD}{\textcircled}{X}
\DeclareUTFcomposite[\UTFencname]{x24CE}{\textcircled}{Y}
\DeclareUTFcomposite[\UTFencname]{x24CF}{\textcircled}{Z}
\DeclareUTFcomposite[\UTFencname]{x24D0}{\textcircled}{a}
\DeclareUTFcomposite[\UTFencname]{x24D1}{\textcircled}{b}
\DeclareUTFcomposite[\UTFencname]{x24D2}{\textcircled}{c}
\DeclareUTFcomposite[\UTFencname]{x24D3}{\textcircled}{d}
\DeclareUTFcomposite[\UTFencname]{x24D4}{\textcircled}{e}
\DeclareUTFcomposite[\UTFencname]{x24D5}{\textcircled}{f}
\DeclareUTFcomposite[\UTFencname]{x24D6}{\textcircled}{g}
\DeclareUTFcomposite[\UTFencname]{x24D7}{\textcircled}{h}
\DeclareUTFcomposite[\UTFencname]{x24D8}{\textcircled}{i}
\DeclareUTFcomposite[\UTFencname]{x24D9}{\textcircled}{j}
\DeclareUTFcomposite[\UTFencname]{x24DA}{\textcircled}{k}
\DeclareUTFcomposite[\UTFencname]{x24DB}{\textcircled}{l}
\DeclareUTFcomposite[\UTFencname]{x24DC}{\textcircled}{m}
\DeclareUTFcomposite[\UTFencname]{x24DD}{\textcircled}{n}
\DeclareUTFcomposite[\UTFencname]{x24DE}{\textcircled}{o}
\DeclareUTFcomposite[\UTFencname]{x24DF}{\textcircled}{p}
\DeclareUTFcomposite[\UTFencname]{x24E0}{\textcircled}{q}
\DeclareUTFcomposite[\UTFencname]{x24E1}{\textcircled}{r}
\DeclareUTFcomposite[\UTFencname]{x24E2}{\textcircled}{s}
\DeclareUTFcomposite[\UTFencname]{x24E3}{\textcircled}{t}
\DeclareUTFcomposite[\UTFencname]{x24E4}{\textcircled}{u}
\DeclareUTFcomposite[\UTFencname]{x24E5}{\textcircled}{v}
\DeclareUTFcomposite[\UTFencname]{x24E6}{\textcircled}{w}
\DeclareUTFcomposite[\UTFencname]{x24E7}{\textcircled}{x}
\DeclareUTFcomposite[\UTFencname]{x24E8}{\textcircled}{y}
\DeclareUTFcomposite[\UTFencname]{x24E9}{\textcircled}{z}
\DeclareUTFcomposite[\UTFencname]{x24EA}{\textcircled}{0}

\DeclareUTFcomposite[\UTFencname]{x3251}{\textcircled}{21}
\DeclareUTFcomposite[\UTFencname]{x3252}{\textcircled}{22}
\DeclareUTFcomposite[\UTFencname]{x3253}{\textcircled}{23}
\DeclareUTFcomposite[\UTFencname]{x3254}{\textcircled}{24}
\DeclareUTFcomposite[\UTFencname]{x3255}{\textcircled}{25}
\DeclareUTFcomposite[\UTFencname]{x3256}{\textcircled}{26}
\DeclareUTFcomposite[\UTFencname]{x3257}{\textcircled}{27}
\DeclareUTFcomposite[\UTFencname]{x3258}{\textcircled}{28}
\DeclareUTFcomposite[\UTFencname]{x3259}{\textcircled}{29}
\DeclareUTFcomposite[\UTFencname]{x325A}{\textcircled}{30}
\DeclareUTFcomposite[\UTFencname]{x325B}{\textcircled}{31}
\DeclareUTFcomposite[\UTFencname]{x325C}{\textcircled}{32}
\DeclareUTFcomposite[\UTFencname]{x325D}{\textcircled}{33}
\DeclareUTFcomposite[\UTFencname]{x325E}{\textcircled}{34}
\DeclareUTFcomposite[\UTFencname]{x325F}{\textcircled}{35}

\DeclareUTFcomposite[\UTFencname]{x32B1}{\textcircled}{36}
\DeclareUTFcomposite[\UTFencname]{x32B2}{\textcircled}{37}
\DeclareUTFcomposite[\UTFencname]{x32B3}{\textcircled}{38}
\DeclareUTFcomposite[\UTFencname]{x32B4}{\textcircled}{39}
\DeclareUTFcomposite[\UTFencname]{x32B5}{\textcircled}{40}
\DeclareUTFcomposite[\UTFencname]{x32B6}{\textcircled}{41}
\DeclareUTFcomposite[\UTFencname]{x32B7}{\textcircled}{42}
\DeclareUTFcomposite[\UTFencname]{x32B8}{\textcircled}{43}
\DeclareUTFcomposite[\UTFencname]{x32B9}{\textcircled}{44}
\DeclareUTFcomposite[\UTFencname]{x32BA}{\textcircled}{45}
\DeclareUTFcomposite[\UTFencname]{x32BB}{\textcircled}{46}
\DeclareUTFcomposite[\UTFencname]{x32BC}{\textcircled}{47}
\DeclareUTFcomposite[\UTFencname]{x32BD}{\textcircled}{48}
\DeclareUTFcomposite[\UTFencname]{x32BE}{\textcircled}{49}
\DeclareUTFcomposite[\UTFencname]{x32BF}{\textcircled}{50}
%    \end{macrocode}
% \iffalse
%</euxunicode>
% \fi
%
% \section{Latin Modern test file}
% Adapted and improved from my Prac\TeX\ Journal article on the Latin Modern fonts.
%
% \iffalse
%<*lmtest>
% \fi
%    \begin{macrocode}
\documentclass[12pt]{article}
\usepackage[margin=2.5cm]{geometry}
\newenvironment{vrb}
               {\begin{tabular}{@{}p{7cm}l@{}}}
               {\end{tabular}}

\usepackage{fancyvrb}
\DefineShortVerb{\|}
               
\usepackage{slantsc}
\usepackage{ifluatex}
\usepackage{ifxetex}
\ifxetex
  \def\EU{EU1}
\else
  \ifluatex
    \usepackage{luaotfload}
    \def\EU{EU2}
  \else
    \def\EU{T1}
  \fi
\fi
\usepackage[\EU]{fontenc}
\usepackage{lmodern}
\begin{document}

\title{Testing the Latin Modern \texttt{\EU} encoding}
\author{Will Robertson}
\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\section*{Roman}

\fontfamily{lmr}\selectfont
\begin{vrb}
|\rmdefault| & {\selectfont Latin Modern Roman} \\
|   \itshape| & {\itshape Latin Modern Roman Italic} \\
|   \slshape| & {\slshape Latin Modern Roman Oblique} \\
|   \scshape| & {\scshape Latin Modern Roman Small Caps} \\
|     \slshape| & {\scshape\slshape Latin Modern Roman Oblique Small Caps} \\
|   \bfseries| & {\bfseries Latin Modern Roman Bold Extended} \\
|      \itshape| & {\bfseries\itshape Latin Modern Roman Bold Italic Extended} \\
|      \slshape| & {\bfseries\slshape Latin Modern Roman Bold Oblique Extended} \\
|   \fontseries{b}| & {\fontseries{b}\selectfont Latin Modern Roman Bold} \\
|   \fontseries{b}\slshape| & {\fontseries{b}\slshape Latin Modern Roman Bold Oblique} \\
\end{vrb}

\section*{Dunhill}

\fontfamily{lmdh}\selectfont
\begin{vrb}
|\fontfamily{lmdh}\selectfont| & {Latin Modern Dunhill} \\
|   \slshape| & {\slshape Latin Modern Dunhill Oblique} \\
\end{vrb}

\section*{Sans}

\fontfamily{lmss}\selectfont
\begin{vrb}
|\sffamily| & {\selectfont Latin Modern Sans} \\
|   \slshape| & {\slshape Latin Modern Sans Oblique} \\
|   \bfseries| & {\bfseries Latin Modern Sans Bold} \\
|      \slshape| & {\bfseries\slshape Latin Modern Sans Bold Oblique} \\
|   \fontseries{sbc}\selectfont| & {\fontseries{sbc}\selectfont Latin Modern Sans Demi Condensed} \\
|      \slshape| & {\fontseries{sbc}\selectfont\slshape Latin Modern Sans Demi Condensed Oblique} \\
\end{vrb}

\section*{Sans Quotation}

\fontfamily{lmssq}\selectfont
\begin{vrb}
|\renewcommand\sfdefault{lmssq}| \\
|\sffamily      | & {\selectfont Latin Modern Sans Extended} \\
|   \slshape    | & {\slshape Latin Modern Sans Extended Oblique} \\
|   \bfseries   | & {\bfseries Latin Modern Sans Bold Extended} \\
|      \slshape | & {\bfseries\slshape Latin Modern Sans Bold Extended Oblique} \\
\end{vrb}

\section*{Typewriter}

\fontfamily{lmtt}\selectfont
\begin{vrb}
|\ttfamily      | & {\selectfont Latin Modern Typewriter} \\
|   \itshape    | & {\itshape Latin Modern Typewriter Italic} \\
|   \slshape    | & {\slshape Latin Modern Typewriter Oblique} \\
|   \scshape    | & {\scshape Latin Modern Typewriter Small Caps} \\
|   \scshape\slshape | & {\scshape\slshape Latin Modern Typewriter Oblique Small Caps} \\
|   \bfseries   | & {\bfseries Latin Modern Typewriter Dark} \\
|      \slshape | & {\bfseries\slshape Latin Modern Typewriter Dark Oblique} \\
|   \fontseries{b}\selectfont | & {\fontfamily{lmtt}\fontseries{b}\selectfont Latin Modern Typewriter Dark} \\
|   \fontseries{b}\slshape    | & {\fontfamily{lmtt}\fontseries{b}\slshape Latin Modern Typewriter Dark Oblique} \\
|   \fontseries{l}\selectfont | & {\fontfamily{lmtt}\fontseries{l}\selectfont Latin Modern Typewriter Light} \\
|   \fontseries{l}\slshape    | & {\fontfamily{lmtt}\fontseries{l}\slshape Latin Modern Typewriter Light Oblique} \\
|   \fontseries{lc}\selectfont | & {\fontfamily{lmtt}\fontseries{lc}\selectfont Latin Modern Typewriter Light Condensed} \\
|   \fontseries{lc}\slshape    | & {\fontfamily{lmtt}\fontseries{lc}\slshape Latin Modern Typewriter Light Condensed Oblique} \\
\end{vrb}

\section*{Variable-width Typewriter}

\fontfamily{lmvtt}\selectfont
\def\fixedspacing{\fontdimen3\font0pt\fontdimen4\font0pt} 
\begin{vrb}
|\renewcommand\ttdefault{lmvtt}| \\
|\ttfamily                     | & {\selectfont \fixedspacing Latin Modern Typewriter Proportional} \\
|   \slshape                   | & {\slshape \fixedspacing Latin Modern Typewriter Proportional Oblique} \\
|   \fontseries{l}\selectfont | & {\fontseries{l}\selectfont \fixedspacing Latin Modern Typewriter Proportional Light} \\
|   \fontseries{l}\slshape    | & \mbox{\fontseries{l}\slshape \fixedspacing Latin Modern Typewriter Proportional Light Oblique} \\
|   \fontseries{b}\selectfont | & {\fontseries{b}\selectfont \fixedspacing Latin Modern Typewriter Proportional Dark} \\
|   \fontseries{b}\slshape    | & \mbox{\fontseries{b}\slshape \fixedspacing Latin Modern Typewriter Proportional Dark Oblique} \\
\end{vrb}

\end{document}
%    \end{macrocode}
% \iffalse
%</lmtest>
% \fi
%
% \clearpage
% \PrintChanges
%
% \clearpage
%
% \PrintIndex
%
% \Finale
%
%\iffalse
%
%<*dtx-style>
%    \begin{macrocode}
\ProvidesPackage{euenc-style}

\def\@dotsep{1000}
\setcounter{tocdepth}{2}
\setlength\columnseprule{0.4pt}
\renewcommand\tableofcontents{\relax
  \begin{multicols}{2}[\section*{\contentsname}]\relax
    \@starttoc{toc}\relax
  \end{multicols}}

\setcounter{IndexColumns}{2}
\renewenvironment{theglossary}
  {\small\list{}{}
     \item\relax
     \glossary@prologue\GlossaryParms 
     \let\item\@idxitem \ignorespaces 
     \def\pfill{\hspace*{\fill}}}
  {\endlist}

\usepackage{booktabs,calc,color,fancyvrb,graphicx,ifthen,refstyle,url,varioref}
\usepackage{metalogo}
\usepackage{tgpagella,eulervm}
\usepackage[scaled=1.1]{inconsolata}
\usepackage[
  bookmarks=true,
  colorlinks=true,
  linkcolor=niceblue,
  urlcolor=niceblue,
  citecolor=niceblue,
  pdftitle={The Experimental Unicode 'EUx' Encodings},
  pdfsubject={Experimental Unicode font encodings for Unicode TeX engines},
  pdfauthor={Will Robertson},
  pdfkeywords={xetex, xelatex, luatex, lualatex, unicode, fontenc}
  ]{hyperref}
  
\definecolor{niceblue}{rgb}{0.4,0.6,1.000}
\newenvironment{example}
  {\hrulefill\par\VerbatimEnvironment
   \begin{VerbatimOut}[gobble=4]{\examplefilename}}
  {\end{VerbatimOut}\relax
   \begingroup
     \color{niceblue}
     \typesetexample
   \endgroup\par\hrulefill}

\let\examplesize\normalsize
\let\auxwidth\relax

\newlength\examplewidth\newlength\verbatimwidth
\newlength\exoutdent   \newlength\exverbgap
\setlength\exverbgap{1em}
\setlength\exoutdent{-0.15\textwidth}
\newsavebox\verbatimbox
\edef\examplefilename{\jobname.example}

\newcommand\typesetexample{\relax
   \begin{lrbox}{\verbatimbox}\relax
     \BVerbatimInput[fontsize=\small]{\examplefilename}\relax
   \end{lrbox}
   \begin{list}{}{\setlength\itemindent{0pt}
                  \setlength\leftmargin\exoutdent
                  \setlength\rightmargin{0pt}}\item
   \ifx\auxwidth\relax
     \setlength\verbatimwidth{\wd\verbatimbox}\relax
   \else
     \setlength\verbatimwidth{\auxwidth}\relax
   \fi
   \begin{minipage}[c]{\textwidth-\exoutdent-\verbatimwidth-\exverbgap}
     \catcode`\%=14\centering\examplesize\input\examplefilename\relax
   \end{minipage}\hfill
   \begin{minipage}[c]{\verbatimwidth}
     \usebox\verbatimbox
   \end{minipage}
   \end{list}
   \global\let\examplesize\normalsize}

\newcommand*\setexsize[1]{\let\examplesize#1}
\newcommand*\setverbwidth[1]{\def\auxwidth{#1}}

\newcommand*\name[1]{{#1}}
\newcommand*\pkg[1]{\textsf{#1}}
\newcommand*\enc[1]{\texttt{#1}}

\let\latin\textit
\def\eg{\latin{e.g.}}
\def\ie{\latin{i.e.}}
\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}

%% LOGOS, tuned for Pagella:
\setlogokern{Te}{-0.12em}%
\setlogokern{eT}{-0.12em}%
\setlogokern{eX}{-0.12em}%
\setlogokern{Xe}{-0.12em}%
\setlogokern{La}{-0.3em}%
\setlogokern{aT}{-0.12em}%
\setlogokern{eL}{-0.1em}

\def\MacOSX{Mac~OS~X}

\DeclareRobustCommand\ExTeX{\textrm{\relax
 \ensuremath{\textstyle\varepsilon_{\kern-0.15em\mathcal{X}}}\relax
 \kern-.15em\TeX}}
 
\def\EU#1{\enc{EU#1}}
\def\EUx{\enc{EU$x$}} 

%% (La)TeX font-related declarations:
\linespread{1.05}      % Pagella needs more space between lines
\frenchspacing         % Remove ugly extra space after punctuation

%    \end{macrocode}
%</dtx-style>
%\fi
%
% \makeatother
% \typeout{*************************************************************}
% \typeout{*}
% \typeout{* To finish the installation you have to move the following}
% \typeout{* files into a directory searched by LaTeX:}
% \typeout{*}
% \typeout{* \space\space\space eu1enc.def, \space eu2enc.def, \space eu*.fd, }
% \typeout{* \space\space\space euxunicode.sty, \space euxunicode-extra.sty}
% \typeout{*}
% \typeout{*************************************************************}
%
\endinput