Debian Codegraph @

texmf-dist/tex/lualatex/luainputenc/lutf8.def

raw
1 %%
2 %% This is file `lutf8.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% luainputenc.dtx (with options: `def')
8 %% This is a generated file.
9 %%
10 %% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
11 %%
12 %% This work is under the CC0 license. As an exception, the files
13 %% luainputenc.sty, lutf8.def and lutf8x.def have more restrictions.
14 %% See these file for more details.
15 %%
16 %% People who helped on this package:
17 %% Javier Bezos
18 %% Will Robertson
19 %% Hans Hagen
20 %% Heiko Oberdiek
21 %% Javier Mugica
22 %%
23 %% This work consists of the main source file luainputenc.dtx
24 %% and the derived files
25 %% luainputenc.sty, luainputenc.lua, lutf8.def, lutf8x.def,
26 %% and luainputenc.pdf
27 %%
28 %% This file was adapted from utf8.def, which copyright is:
29 %% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
30 %% 2004 2005 2006 The LaTeX3 Project.
31 %%
32 %% utf8.def is under the lppl version 1.3c or later, and can be found
33 %% in the base LaTeX system.
34 %%
35 %% The lppl can be found at http://www.latex-project.org/lppl.txt
36 %%
37 %% The changes to utf8.def are Copyright 2009 Elie Roux, and are under
38 %% the CC0 license.
39 %%
40 %% The changes are LuaTeX support.
41 %%
42 %% This file is distributed under the CC0 license, with clause 6 of the
43 %% lppl as additional restrictions.
44
45
46 \ProvidesFile{lutf8.def}
47 [2010/05/10 v0.97 UTF-8 support for luainputenc]
48
49 \makeatletter
50 \catcode`\ \saved@space@catcode
51
52 \@inpenc@test
53
54 \ifx\@begindocumenthook\@undefined
55 \makeatother
56 \endinput \fi
57
58
59 \gdef\DeclareUnicodeCharacter#1#2{%
60 \@tempcnta"#1%
61 \catcode\@tempcnta\active %
62 \DeclareInputText{\the\@tempcnta}{#2}%
63 }
64
65 \@onlypreamble\DeclareUnicodeCharacter
66
67 \def\cdp@elt#1#2#3#4{%
68 \wlog{Now handling font encoding #1 ...}%
69 \lowercase{%
70 \InputIfFileExists{#1enc.dfu}}%
71 {\wlog{... processing UTF-8 mapping file for font encoding
72 #1}%
73 \catcode`\ 9\relax}%
74 {\wlog{... no UTF-8 mapping file for font encoding #1}}%
75 }
76 \cdp@list
77
78 \def\DeclareFontEncoding@#1#2#3{%
79 \expandafter %
80 \ifx\csname T@#1\endcsname\relax %
81 \def\cdp@elt{\noexpand\cdp@elt}%
82 \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
83 {\default@family}{\default@series}%
84 {\default@shape}}%
85 \expandafter\let\csname#1-cmd\endcsname\@changed@cmd %
86 \begingroup %
87 \wlog{Now handling font encoding #1 ...}%
88 \lowercase{%
89 \InputIfFileExists{#1enc.dfu}}%
90 {\wlog{... processing UTF-8 mapping file for font encoding #1}}%
91 {\wlog{... no UTF-8 mapping file for font encoding #1}}%
92 \endgroup
93 \else
94 \@font@info{Redeclaring font encoding #1}%
95 \fi
96 \global\@namedef{T@#1}{#2}%
97 \global\@namedef{M@#1}{\default@M#3}%
98 \xdef\LastDeclaredEncoding{#1}%
99 }
100
101 \DeclareUnicodeCharacter{00A9}{\textcopyright}
102 \DeclareUnicodeCharacter{00AA}{\textordfeminine}
103 \DeclareUnicodeCharacter{00AE}{\textregistered}
104 \DeclareUnicodeCharacter{00BA}{\textordmasculine}
105 \DeclareUnicodeCharacter{02C6}{\textasciicircum}
106 \DeclareUnicodeCharacter{02DC}{\textasciitilde}
107 \DeclareUnicodeCharacter{200C}{\textcompwordmark}
108 \DeclareUnicodeCharacter{2026}{\textellipsis}
109 \DeclareUnicodeCharacter{2122}{\texttrademark}
110 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
111
112 \endinput
113 %%
114 %% End of file `lutf8.def'.