%% %% 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. %% %% Copyright (C) 2009 by 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, %% eu2enc.def, eu2lmr.fd and luainputenc.pdf %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luainputenc} [2009/04/15 v0.93 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 \RequirePackage{xetex-inputenc} \DeclareOption{unactivate}{\PassOptionsToPackage{utf8}{xetex-inputenc}} \DeclareOption{lutf8}{\PassOptionsToPackage{utf8}{xetex-inputenc}} \DeclareOption{lutf8x}{\PassOptionsToPackage{utf8}{xetex-inputenc}} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{xetex-inputenc}} \ProcessOptions* \expandafter\endinput \fi \ifluatex\else \RequirePackage{inputenc} \DeclareOption{unactivate}{\PassOptionsToPackage{utf8}{inputenc}} \DeclareOption{lutf8}{\PassOptionsToPackage{utf8}{inputenc}} \DeclareOption{lutf8x}{\PassOptionsToPackage{utf8}{inputenc}} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{inputenc}} \ProcessOptions* \expandafter\endinput \fi \RequirePackage{luatextra} \luaUseModule{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\^^_% \advance\endlinechar\@M \xdef\saved@space@catcode{\the\catcode`\ }% \catcode`\ 9\relax \input{#1.def}% \advance\endlinechar-\@M \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 } \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}% } \DeclareOption*{% \lIE@activate % \@inpenc@loop\^^?\^^ff% \inputencoding{\CurrentOption}% } \newcommand*\lIE@setstarted[0]{% \ifnum\lIE@activated=1 % \luadirect{luainputenc.setstarted()}% \fi % } \newcommand*\lIE@setstopped[0]{% \ifnum\lIE@activated=1 % \luadirect{luainputenc.setstopped()}% \fi % } \newcommand*\lIE@SetUtfFile[1]{% \luadirect{luainputenc.set_unicode_file([[#1]])}% } \newcommand*\lIE@SetNonUtfFile[1]{% \luadirect{luainputenc.set_non_unicode_file([[#1]])}% } \newcommand*\lIE@UnsetFile[1]{% \luadirect{luainputenc.unset_file([[#1]])}% } \newcommand*\lIE@SetUtfExt[1]{% \luadirect{luainputenc.set_unicode_extention([[#1]])}% } \newcommand*\lIE@SetNonUtfExt[1]{ \luadirect{luainputenc.set_non_unicode_extention([[#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% } \ProcessOptions* \endinput %% %% End of file `luainputenc.sty'.