diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/inputenx.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/inputenx.sty | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/inputenx.sty b/Master/texmf-dist/tex/latex/oberdiek/inputenx.sty new file mode 100644 index 00000000000..266890f350a --- /dev/null +++ b/Master/texmf-dist/tex/latex/oberdiek/inputenx.sty @@ -0,0 +1,146 @@ +%% +%% This is file `inputenx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% inputenx.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Heiko Oberdiek. +%% +%% This work consists of the main source file inputenx.dtx +%% and the derived files +%% inputenx.sty, inputenx.pdf, inputenx.ins, inputenx.drv, +%% ix-alias.def, ix-math.def, ix-name.def, ix-slot.def, +%% ix-uc.def, ix-utf8enc.dfu, x-ascii.def, x-iso-8859-1.def, +%% x-iso-8859-2.def, x-iso-8859-3.def, x-iso-8859-4.def, +%% x-iso-8859-9.def, x-iso-8859-10.def, x-iso-8859-13.def, +%% x-iso-8859-14.def, x-iso-8859-15.def, x-iso-8859-16.def, +%% x-cp437.def, x-cp850.def, x-cp852.def, x-cp858.def, +%% x-cp865.def, x-cp1250.def, x-cp1252.def, x-cp1257.def, +%% x-mac-roman.def, x-mac-ce.def, x-nextstep.def, +%% x-dec-mcs.def, inputenx-licrcmds.txt, inputenx-utf8enc.txt. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{inputenx}% + [2006/08/24 v1.0 Enhanced input encoding handling (HO)] +\providecommand*{\CurrentInputEncodingName}{} +\providecommand*{\CurrentInputEncodingOption}{} +\def\IEX@LookupEncoding#1{% + \edef\CurrentInputEncodingName{#1}% + \@onelevel@sanitize\CurrentInputEncodingName + \let\CurrentInputEncodingOption\@empty + \@ifundefined{IEX@enc@\CurrentInputEncodingName}{% + \global\expandafter\let + \csname IEX@enc@\CurrentInputEncodingName\endcsname + \CurrentInputEncodingName + \IEX@DoLookup + }{}% + \edef\CurrentInputEncodingOption{% + \csname IEX@enc@\CurrentInputEncodingName\endcsname + }% + \ifx\CurrentInputEncodingOption\@empty + \PackageWarning{inputenx}{% + Encoding `\CurrentInputEncodingName' is not available\MessageBreak + and therefore ignored% + }% + \else + \IfFileExists{\CurrentInputEncodingOption.def}{% + \PackageInfo{inputenx}{% + Encoding name: \CurrentInputEncodingName\MessageBreak + Encoding file: \CurrentInputEncodingOption.def\MessageBreak + }% + }{% + \PackageError{inputenx}{% + Cannot load encoding `\CurrentInputEncodingName'.\MessageBreak + A valid encoding alias was not found and\MessageBreak + encoding file `\CurrentInputEncodingOption.def' does not exist% + }\@ehc + \global\expandafter\let + \csname IEX@enc@\CurrentInputEncodingName\endcsname\@empty + \let\CurrentInputEncodingName\@empty + \let\CurrentInputEncodingOption\@empty + }% + \fi +} +\def\IEX@DoLookup{% + \begingroup + \advance\endlinechar\@M + \IfFileExists{ix-alias.cfg}{% + \input{ix-alias.cfg}% + }{% + \input{ix-alias.def}% + }% + \advance\endlinechar-\@M + \endgroup +} +\def\InputenxAlias#1#2{% + \edef\IEX@temp{#1}% + \@onelevel@sanitize\IEX@temp + \ifx\IEX@temp\CurrentInputEncodingName + \edef\IEX@temp{#2}% + \@onelevel@sanitize\IEX@temp + \IfFileExists{\IEX@temp.def}{% + \global\expandafter\let + \csname IEX@enc@\CurrentInputEncodingName\endcsname\IEX@temp + \expandafter\endinput + }{% + \PackageWarning{inputenx}{% + Missing encoding file `\IEX@temp.def'\MessageBreak + for encoding `\CurrentInputEncodingName', continuing\MessageBreak + with lookup search% + }% + }% + \fi +} +\newif\ifIEX@math +\DeclareOption{math}{\IEX@mathtrue} +\let\IEX@enclist\@empty +\DeclareOption*{% + \ifx\IEX@enclist\@empty + \let\IEX@enclist\CurrentOption + \else + \edef\IEX@enclist{\IEX@enclist,\CurrentOption}% + \fi +} +\ProcessOptions* +\@for\CurrentOption:=\IEX@enclist\do{% + \IEX@LookupEncoding\CurrentOption + \ifx\CurrentInputEncodingOption\@empty + \else + \PassOptionsToPackage{\CurrentInputEncodingOption}{inputenc}% + \fi +} +\RequirePackage{inputenc} +\newcommand*{\InputEncoding}[1]{% + \IEX@LookupEncoding{#1}% + \ifx\CurrentInputEncodingOption\@empty + \else + \inputencoding{\CurrentInputEncodingOption}% + \fi +} +\ifIEX@math + \RequirePackage{inpmath} + \IfFileExists{ix-math.cfg}{% + \input{ix-math.cfg}% + }{% + \input{ix-math.def}% + }% +\fi +\endinput +%% +%% End of file `inputenx.sty'. |