summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/euenc/euenc.dtx
blob: 64b9787fc6734ae59e7a5355c90cd9c9bb5b4890 (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
% \iffalse meta-comment
%
%!TEX encoding = UTF-8 Unicode
%
% Copyright 2005 by Will Robertson <wspr81@gmail.com>
% 
% Distributable under the LaTeX Project Public License,
% version 1.3b 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}[2008/02/05 v0.1c Experimental unicode font encodings]
%</dtxinfo>
%
%<*internalbatchfile>
\begingroup
%</internalbatchfile>
%<*batchfile>
\input docstrip.tex
\keepsilent
\preamble

  ________________________________
  Copyright © 2006  Will Robertson

  License information appended.


\endpreamble
\postamble

Copyright © 2006 by Will Robertson <wspr81@gmail.com>

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{euenc.ins}{\from{\jobname.dtx}{batchfile}}}
\generate{\file{euenc-style.sty}{\from{\jobname.dtx}{dtx-style}}}
\generate{\file{eu1enc.def}{\from{\jobname.dtx}{eu1}}}
\generate{\file{test-eu1lm.ltx}{\from{\jobname.dtx}{lmtest}}}
\nopreamble\nopostamble
\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
\generate{\file{convert-lmfd.sh}{\from{\jobname.dtx}{lmscript}}}
\generate{\file{sed-eu1lmr.sed}{\from{\jobname.dtx}{sedlmr}}}
\generate{\file{sed-eu1lmdh.sed}{\from{\jobname.dtx}{sedlmdh}}}
\generate{\file{sed-eu1lmss.sed}{\from{\jobname.dtx}{sedlmss}}}
\generate{\file{sed-eu1lmssq.sed}{\from{\jobname.dtx}{sedlmssq}}}
\generate{\file{sed-eu1lmtt.sed}{\from{\jobname.dtx}{sedlmtt}}}
\generate{\file{sed-eu1lmvtt.sed}{\from{\jobname.dtx}{sedlmvtt}}}
%</batchfile>
%<batchfile>\endbatchfile
%<*internalbatchfile>
\endgroup
\immediate\write18{sh convert-lmfd.sh}%
%</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}
% \date{\filedate \qquad \fileversion}
%
% \maketitle
%
% \begin{abstract} 
% This file documents some experimental unicode font encodings, initially
% used for \XeTeX. Includes Latin Modern font definitions for version 1.106 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 seemingly 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 by necessity when changing 
% languages.
%
% 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 (to be addressed later).
%
% This document contains the first steps in this direction.
%
% \section{The \EUx\ encodings}
%
% As with much of my \XeTeX\ work, nothing can be relied upon to last
% unchanged into the future. This is an unfortunate fact that extensions to \TeX\
% that deal with unicode (>16 bit fonts) are still many and varied (by this time next
% year, there will be at least four\footnote{\XeTeX, Lua\TeX, Omega/Aleph, \ExTeX,
% if I've counted correctly}). \XeTeX\ is the only one with active macro
% development at the present time to the best of my knowledge. It thus serves
% as a testbed for new ideas; furthermore, I'm learning all of this stuff too so
% it's possible that I'll make conceptual mistakes that require changes later on.
%
% \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ôle is played for now by Ross Moore's \pkg{xunicode}
% package; in the future I hope some of that package will migrate here.
%
% Because we can assume that all current \TeX\ distributions will
% contain the Latin Modern OpenType fonts (\path{fonts/opentype/public/lm}),
% this is selected as the default font. More details on this font 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}
\ProvidesFile{eu1enc.def}[2008/02/05 v0.1c Experimental unicode font encoding]
\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}
% \iffalse
%</eu1>
% \fi
%
% \section{The Latin Modern OpenType fonts}
%
% Version 0.1c of \pkg{euenc} supports version~1.106 of the LM fonts, released in February 2008.
%
% \subsection{Conversion scripts}
% The |.fd| files are converted from the \enc{T1} encoding
% with the following shell script. In order to generate
% the Latin Modern \EU1 encoding font definitions, execute the following commands:
% \begin{verbatim}
%   latex euenc.ins
%   sh convert-lmfd.sh
% \end{verbatim}
% The sources that allow this generation are shown following.
%
% \subsubsection{Encoding conversion shell script}
% Make sure the \texttt{lm/} directory exists before running this script.
% \iffalse
%<*lmscript>
% \fi
%    \begin{macrocode}
sed -E -f sed-eu1lmr.sed   `kpsewhich t1lmr.fd`   > lm/eu1lmr.fd
sed -E -f sed-eu1lmdh.sed  `kpsewhich t1lmdh.fd`  > lm/eu1lmdh.fd
sed -E -f sed-eu1lmss.sed  `kpsewhich t1lmss.fd`  > lm/eu1lmss.fd
sed -E -f sed-eu1lmssq.sed `kpsewhich t1lmssq.fd` > lm/eu1lmssq.fd
sed -E -f sed-eu1lmtt.sed  `kpsewhich t1lmtt.fd`  > lm/eu1lmtt.fd
sed -E -f sed-eu1lmvtt.sed `kpsewhich t1lmvtt.fd` > lm/eu1lmvtt.fd
%    \end{macrocode}
% \iffalse
%</lmscript>
% \fi
%
% \subsubsection{Encoding conversion \texttt{sed} scripts}
% The shell script above clearly requires the following quickly assembled |sed| scripts.
% No doubt they could be reduced to a single script with enough motivation. For now, they work.
%
% \paragraph{Roman}
% \iffalse
%<*sedlmr>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/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/(>.[ ]*)(lm[a-z0-9\-]*)/\1"[\2]:mapping=tex-text"/g
%    \end{macrocode}
% \iffalse
%</sedlmr>
% \fi
% \paragraph{Dunhill}
% \iffalse
%<*sedlmdh>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/g

s/ec-lmdunh([0-9]*)/lmromandunh\1-regular/g
s/ec-lmduno([0-9]*)/lmromanslant\1-oblique/g
%    \end{macrocode}
% \iffalse
%</sedlmdh>
% \fi
% \paragraph{Sans}
% \iffalse
%<*sedlmss>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/g

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

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

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

s/(>.[ ]*)(lm[a-z0-9\-]+)/\1"[\2]:mapping=tex-text"/g
%    \end{macrocode}
% \changes{v0.1}{2007/01/18}{`ssdc' and `ssdo' were switched with the upright for some reason.}
% \iffalse
%</sedlmss>
% \fi
% \paragraph{Sans Quotation}
% \iffalse
%<*sedlmssq>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/g

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

s/(>.[ ]*)(lm[a-z0-9\-]+)/\1"[\2]:mapping=tex-text"/g
%    \end{macrocode}
% \iffalse
%</sedlmssq>
% \fi
% \paragraph{Typewriter}
% \iffalse
%<*sedlmtt>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/g

s/ec-lmtt([0-9]+)/lmmono\1-regular/g
s/ec-lmtto([0-9]+)/lmmono\1-oblique/g

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

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

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

s/(>.[ ]*)(lm[a-z0-9\-]+)/\1"[\2]:mapping=tex-text"/g
%    \end{macrocode}
% \iffalse
%</sedlmtt>
% \fi
% \paragraph{Variable-width Typewriter}
% \iffalse
%<*sedlmvtt>
% \fi
%    \begin{macrocode}
/^%.*/d
s/{T1}/{EU1}/g
s/t1lm/eu1lm/g

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

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

s/(>.[ ]*)(lm[a-z0-9\-]+)/\1"[\2]:mapping=tex-text"/g
%    \end{macrocode}
% \iffalse
%</sedlmvtt>
% \fi
%
% \subsection{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[EU1]{fontenc}
\usepackage{lmodern}
\begin{document}

\title{Testing the Latin Modern \texttt{EU1} 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
%
%<*readme>
%    \begin{macrocode}
________________________
THE EU ENCODING(S) v0.1c

Warning: don't install this package with Latin Modern fonts prior to 
version 1.106, which was released in Feb 2008.

This package is the first release of the first step towards offering a 
LaTeX font encoding based on unicode. XeTeX is the only engine currently
utilising it to the best of my knowledge. No macro support is offered (the
encoding is just a placeholder for now) but an EU1 Latin Modern encoding is
offered in order to access the OpenType versions of those fonts.

N.B. This will only work when xdvipdfmx is used as the output driver for
XeTeX; xdv2pdf (Mac OS X only) does not support OpenType fonts that aren't
installed in the system itself. As of XeTeX v0.997, xdv2pdf is no longer
the default driver in Mac OS X.

Usually you'll just want to use fontspec:
\documentclass{article}
\usepackage{fontspec}
\begin{document}
...
\end{document}

Example of use without fontspec:
\documentclass{article}
\usepackage[EU1]{fontenc}
\usepackage{lmodern}
\begin{document}
...
\end{document}

See the accompanying file <test-eu1lm.ltx> for a complete example.

____________
INSTALLATION

CTAN contains the necessary files to install for this package:
  - eu1enc.def
  - lm/eu1lm*.fd (* is a wild card: six files in all)
These should be placed in $TEXMF/tex/xelatex/euenc .

To generate these files from the euenc.dtx file, first run `latex eu1enc.ins`.
This will extract the eu1enc.def file and a slew of shell scripts that
create the lm/eu1lm*.fd files. These .fd files are generated by executing
`sh convert-lmfd.sh`.

______________
Will Robertson
2007
%    \end{macrocode}
%</readme>
%
%<*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{fontspec,xltxtra}  
  
\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 Palatino:
\TeX@logo@spacing{-0.12em}{-0.12em}%
  {0.5ex}{-0.3em}{-0.12em}{-0.1em}

\def\MacOSX{Mac~OS~X}

%% fontspec declarations:
\setromanfont[Mapping=tex-text]{FPL Neu}
\defaultfontfeatures{Scale=MatchLowercase}
\setsansfont[Mapping=tex-text,
             BoldFont={Skia},
             BoldFeatures={Weight=1.7}]{Skia}
\setmonofont{Osaka-Mono}
\defaultfontfeatures{Mapping=tex-text}

\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}      % FPL Neu needs more space between lines
\frenchspacing         % Remove ugly extra space after punctuation

\def\MacOSX{Mac~OS~X}
%    \end{macrocode}
%</dtx-style>
%\fi
%
% \makeatother
% \typeout{*************************************************************}
% \typeout{*}
% \typeout{* To finish the installation you have to move the following}
% \typeout{* file into a directory searched by XeTeX:}
% \typeout{*}
% \typeout{* \space\space\space eu1enc.def}
% \typeout{*}
% \typeout{*************************************************************}
%
\endinput