/usr/share/texlive/texmf-dist/tex/lualatex/luainputenc/luainputenc.sty is in texlive-luatex 2012.20120611-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | %%
%% This is file `luainputenc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% luainputenc.dtx (with options: `package')
%% This is a generated file.
%%
%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
%%
%% This work is under the CC0 license. As an exception, the files
%% luainputenc.sty, lutf8.def and lutf8x.def have more restrictions.
%% See these file for more details.
%%
%% People who helped on this package:
%% Javier Bezos
%% Will Robertson
%% Hans Hagen
%% Heiko Oberdiek
%% Javier Mugica
%%
%% This work consists of the main source file luainputenc.dtx
%% and the derived files
%% luainputenc.sty, luainputenc.lua, lutf8.def, lutf8x.def,
%% and luainputenc.pdf
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luainputenc}
[2010/11/19 v0.973 inputenc package for LuaTeX]
%% This file was adapted from inputenc.sty, which copyright is:
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004
%% 2005 2006 The LaTeX3 Project.
%%
%% inputenc.sty is under the lppl version 1.3c or later, and can be
%% found in the base LaTeX system.
%%
%% The lppl can be found at http://www.latex-project.org/lppl.txt
%%
%% The changes to inputenc.sty are Copyright 2009 Elie Roux, and are
%% under the CC0 license.
%%
%% The changes are LuaTeX support.
%%
%% This file is distributed under the CC0 license, with clause 6 of the
%% lppl as additional restrictions.
\RequirePackage{ifluatex}
\RequirePackage{ifxetex}
\ifxetex
\DeclareOption{unactivate}{\PassOptionsToPackage{utf8}{xetex-inputenc}}
\DeclareOption{lutf8}{\PassOptionsToPackage{utf8}{xetex-inputenc}}
\DeclareOption{lutf8x}{\PassOptionsToPackage{utf8}{xetex-inputenc}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{xetex-inputenc}}
\ProcessOptions*
\RequirePackage{xetex-inputenc}
\expandafter\endinput
\fi
\ifluatex\else
\DeclareOption{unactivate}{\PassOptionsToPackage{utf8}{inputenc}}
\DeclareOption{lutf8}{\PassOptionsToPackage{utf8}{inputenc}}
\DeclareOption{lutf8x}{\PassOptionsToPackage{utf8}{inputenc}}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{inputenc}}
\ProcessOptions*
\RequirePackage{inputenc}
\expandafter\endinput
\fi
\RequirePackage{luatexbase}
\luatexbase@ensure@primitive{luaescapestring}
\RequireLuaModule{luainputenc}
\def\DeclareInputMath#1{%
\@inpenc@test
\bgroup
\uccode`\~#1%
\uppercase{%
\egroup
\def~%
}%
}
\def\DeclareInputText#1#2{%
\def\reserved@a##1 ${}%
\def\reserved@b{#2}%
\ifcat_\expandafter\reserved@a\meaning\reserved@b$ $_%
\DeclareInputMath{#1}{#2}%
\else
\DeclareInputMath{#1}{\IeC{#2}}%
\fi
}
\def\IeC{%
\ifx\protect\@typeset@protect
\expandafter\@firstofone
\else
\noexpand\IeC
\fi
}
\def\inputencoding#1{%
\the\inpenc@prehook
\gdef\@inpenc@test{\global\let\@inpenc@test\relax}%
\edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{#1}}%
\edef\inputencodingname{#1}%
\@inpenc@loop\^^A\^^H%
\@inpenc@loop\^^K\^^K%
\@inpenc@loop\^^N\^^_%
\xdef\saved@endlinechar{\the\endlinechar }%
\endlinechar=-1
\xdef\saved@space@catcode{\the\catcode`\ }%
\catcode`\ 9\relax
\input{#1.def}%
\endlinechar=\saved@endlinechar{}%
\catcode`\ \saved@space@catcode\relax
\ifx\@inpenc@test\relax\else
\PackageWarning{inputenc}%
{No characters defined\MessageBreak
by input encoding change to `#1'\MessageBreak}%
\fi
\the\inpenc@posthook
\luatexbase@directlua{luainputenc.set_option("\luatexluaescapestring{#1}")}
}
\newtoks\inpenc@prehook
\newtoks\inpenc@posthook
\def\@inpenc@undefined@#1{\PackageError{inputenc}%
{Keyboard character used is undefined\MessageBreak
in inputencoding `#1'}%
{You need to provide a definition with
\noexpand\DeclareInputText\MessageBreak or
\noexpand\DeclareInputMath before using this key.}}%
\def\@inpenc@loop#1#2{%
\@tempcnta`#1\relax
\loop
\catcode\@tempcnta\active
\bgroup
\uccode`\~\@tempcnta
\uppercase{%
\egroup
\let~\inpenc@undefined
}%
\ifnum\@tempcnta<`#2\relax
\advance\@tempcnta\@ne
\repeat}
\DeclareOption{utf8}{%
\inputencoding{lutf8}%
}
\DeclareOption{lutf8}{%
\inputencoding{lutf8}%
}
\DeclareOption{utf8x}{%
\inputencoding{lutf8}%
}
\DeclareOption{lutf8x}{%
\inputencoding{lutf8x}%
}
\DeclareOption{unactivate}{%
\edef\inputencodingname{unactivate}%
\luatexbase@directlua{luainputenc.set_option([[unactivate]])}
}
\DeclareOption*{%
\lIE@activate %
\@inpenc@loop\^^?\^^ff%
\inputencoding{\CurrentOption}%
}
\ifnum\luatexversion>42
\newcommand*{\lIE@activate}[0]{%
\luatexbase@directlua{luainputenc.register_callbacks()}%
}
\else
\newcommand*\lIE@setstarted[0]{%
\ifnum\lIE@activated=1 %
\luatexbase@directlua{luainputenc.setstarted()}%
\fi %
}
\newcommand*\lIE@setstopped[0]{%
\ifnum\lIE@activated=1 %
\luatexbase@directlua{luainputenc.setstopped()}%
\fi %
}
\newcommand*\lIE@SetUtfFile[1]{%
\luatexbase@directlua{luainputenc.set_unicode_file("\luatexluaescapestring{#1}")}%
}
\newcommand*\lIE@SetNonUtfFile[1]{%
\luatexbase@directlua{luainputenc.set_non_unicode_file("\luatexluaescapestring{#1}")}%
}
\newcommand*\lIE@UnsetFile[1]{%
\luatexbase@directlua{luainputenc.unset_file("\luatexluaescapestring{#1}")}%
}
\newcommand*\lIE@SetUtfExt[1]{%
\luatexbase@directlua{luainputenc.set_unicode_extention("\luatexluaescapestring{#1}")}%
}
\newcommand*\lIE@SetNonUtfExt[1]{
\luatexbase@directlua{luainputenc.set_non_unicode_extention("\luatexluaescapestring{#1}")}
}
\newcommand*\lIE@InputUtfFile[1]{%
\lIE@SetUtfFile{#1}%
\input #1%
\lIE@UnsetFile{#1}%
}
\newcommand*\lIE@InputNonUtfFile[1]{%
\lIE@SetNonUtfFile{#1}%
\input #1%
\lIE@UnsetFile{#1}%
}
\newcommand*\InputUtfFile[1]{%
\lIE@InputUtfFile{#1}%
}
\newcommand*\InputNonUtfFile[1]{%
\lIE@InputNonUtfFile{#1}%
}
\newcount\lIE@activated
\newcommand*{\lIE@activate}[0]{%
\lIE@activated=1 %
\lIE@setstarted %
}
\newcommand*{\lIE@FromInputenc}[1]{%
\ifnum\lIE@activated=0 %
\lIE@activate %
\fi%
}
\fi
\ProcessOptions*
\endinput
%%
%% End of file `luainputenc.sty'.
|