diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:05:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:05:21 +0000 |
commit | 15f7206dd3f97a844cede7fb76358ba6a022981c (patch) | |
tree | e4cbc8f64972457d169dbc8482cf58698230e8c2 /Master/texmf-dist/tex/latex/relenc/relenc.sty | |
parent | ee0212e120bb432a474a7d5f7de31641543bccf6 (diff) |
relenc
git-svn-id: svn://tug.org/texlive/trunk@1275 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/relenc/relenc.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/relenc/relenc.sty | 389 |
1 files changed, 389 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/relenc/relenc.sty b/Master/texmf-dist/tex/latex/relenc/relenc.sty new file mode 100644 index 00000000000..c3335689884 --- /dev/null +++ b/Master/texmf-dist/tex/latex/relenc/relenc.sty @@ -0,0 +1,389 @@ +%% +%% This is file `relenc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% relenc.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from relenc.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file relenc.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% \CheckSum{724} +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{relenc}[1999/01/23] +\newtoks\RE@temptoks +\let\RE@define@first\@gobbletwo +\def\RE@text@variable{% + \expandafter\ifx \csname\cf@encoding/\f@family-path\endcsname \relax + \expandafter\ifx \csname\cf@encoding-path\endcsname \relax + \RE@spath@unavailable + \else + \RE@spath@available\RE@first@read@spath\RE@read@spath + \fi + \else + \expandafter\expandafter \expandafter\RE@first@read@spath + \csname\cf@encoding/\f@family-path\expandafter\endcsname + \expandafter\RE@read@spath + \fi +} +\def\RE@spath@available#1#2#3\fi#4\fi{\fi\fi + \expandafter\expandafter \expandafter#1% + \csname\cf@encoding-path\endcsname#2% +} +\def\RE@spath@unavailable#1\fi#2\fi#3{% + \fi\fi + \PackageError{relenc}{% + There is no search path for relaxed encoding \cf@encoding% + }\@eha +} +\def\RE@text@comp@variable{% + \expandafter\ifx \csname\cf@encoding/\f@family-path\endcsname \relax + \expandafter\ifx \csname\cf@encoding-path\endcsname \relax + \RE@spath@unavailable + \else + \RE@spath@available\RE@first@comp@read@spath\RE@comp@read@spath + \fi + \else + \expandafter\expandafter \expandafter\RE@first@comp@read@spath + \csname\cf@encoding/\f@family-path\expandafter\endcsname + \expandafter\RE@comp@read@spath + \fi +} +\def\RE@read@spath#1#2\RE@read@spath#3{% + \RE@temptoks={#2}% + \expandafter\ifx \csname#1\string#3\endcsname \relax + \expandafter\RE@read@spath \the\expandafter\RE@temptoks + \expandafter\RE@read@spath \expandafter#3% + \else + \RE@define@first{#1}{#3}% + \csname#1\string#3\expandafter\endcsname + \fi +} +\def\RE@first@read@spath#1#2\RE@read@spath#3{% + \RE@temptoks={#2}% + \expandafter\ifx \csname#1\string#3\endcsname \relax + \def\RE@first@search@item{#1}% + \expandafter\RE@read@spath \the\expandafter\RE@temptoks + \expandafter\RE@read@spath \expandafter#3% + \else + \csname#1\string#3\expandafter\endcsname + \fi +} +\def\RE@comp@read@spath#1#2\RE@comp@read@spath#3{% + \RE@temptoks={#2}% + \expandafter\ifx \csname#1\@empty\string#3\endcsname \relax + \expandafter\RE@comp@read@spath \the\expandafter\RE@temptoks + \expandafter\RE@comp@read@spath \expandafter#3% + \else + \RE@define@first{#1\@empty}{#3}% + \csname#1\@empty\string#3\expandafter\endcsname + \fi +} +\def\RE@first@comp@read@spath#1#2\RE@comp@read@spath#3{% + \RE@temptoks={#2}% + \expandafter\ifx \csname#1\@empty\string#3\endcsname \relax + \def\RE@first@search@item{#1\@empty}% + \expandafter\RE@comp@read@spath \the\expandafter\RE@temptoks + \expandafter\RE@comp@read@spath \expandafter#3% + \else + \csname#1\@empty\string#3\expandafter\endcsname + \fi +} +\def\RE@active@define@first#1#2{% + \global\expandafter\let + \csname\RE@first@search@item\string#2\expandafter\endcsname + \csname#1\string#2\endcsname +} +\def\RE@again@read@spath{% + \def\RE@first@search@item##1\expandafter\endcsname{% + RE@garbage\expandafter\endcsname + }% + \expandafter\RE@read@spath \the\RE@temptoks \RE@read@spath +} +\def\RE@var@not@found{relax\endcsname\relax\fi + \RE@gobble@readspath +} +\def\RE@gobble@readspath#1\string#2\endcsname#3\fi{% + \ifx\@empty#1% + \expandafter\expandafter \expandafter\RE@text@comp@unavail + \expandafter\@gobble \string#2\RE@text@comp@unavail + \else + \TextSymbolUnavailable{#2}% + \fi +} +\def\RE@text@comp@unavail#1-#2\RE@text@comp@unavail{% + \PackageError{relenc}{% + The composition of command #1 with #2\MessageBreak is declared % + in encoding \cf@encoding,\MessageBreak but no definition could % + be found% + }\@eha +} +\begingroup + \lccode`\$=13\relax + \lowercase{% + \gdef\RE@empty@is@qmark#1{\ifx$#1$?\else#1\fi}% + } +\endgroup +\def\RE@font@spec#1#2#3#4{% + \RE@empty@is@qmark{#1}/\RE@empty@is@qmark{#2}/% + \RE@empty@is@qmark{#3}/\RE@empty@is@qmark{#4}% +} +\def\RE@bsl@string{% + \ifnum \escapechar<\z@ \@backslashchar \fi + \string +} +\newcommand\DeclareTextVariableCommand{\RE@dec@text@varcmd\newcommand} +\@onlypreamble\DeclareTextVariableCommand +\newcommand\DeclareTextVariableCommandNoDefault{% + \RE@dec@text@varcmd\@gobble +} +\@onlypreamble\DeclareTextVariableCommandNoDefault +\newcommand\DeclareTextVariableSymbol[3]{% + \RE@dec@text@varcmd\chardef#1{#2}#3\relax +} +\@onlypreamble\DeclareTextVariableSymbol +\def\RE@dec@text@varcmd#1#2#3{% + \DeclareTextCommand{#2}{#3}{\RE@text@variable#2}% + \expandafter#1\csname#3/?/?/?\string#2\endcsname +} +\newcommand\ProvideTextVariableCommand[2]{% + \expandafter\ifx \csname#2\string#1\endcsname \relax + \ProvideTextCommand#1#2{\RE@text@variable#1}% + \expandafter\providecommand + \csname#2/?/?/?\string#1\expandafter\endcsname + \else + \long\def\RE@garbage{\RE@text@variable#1}% + \expandafter\ifx \csname#2\string#1\endcsname \RE@garbage + \expandafter\providecommand + \csname#2/?/?/?\string#1\expandafter\expandafter + \expandafter\endcsname + \else + \PackageInfo{relenc}{You have provided a declaration of + \protect#1 in\MessageBreak encoding #2 as a variable + command, but it was\MessageBreak already declared as a + non-variable command.\MessageBreak Your declaration has + been ignored}% + \expandafter\providecommand + \csname RE@garbage\expandafter\expandafter + \expandafter\endcsname + \fi + \fi +} +\newcommand{\DeclareTextVariableAccent}[3]{% + \DeclareTextCommand{#1}{#2}{\RE@text@variable#1}% + \expandafter\newcommand \csname#2/?/?/?\string#1\endcsname + {\add@accent{#3}}% +} +\@onlypreamble\DeclareTextVariableAccent +\newcommand{\DefineTextCommandVariant}[5]{% + \expandafter\gdef + \csname\RE@font@spec{#2}{#3}{#4}{#5}\RE@bsl@string#1\endcsname +} +\newcommand{\DefineTextSymbolVariant}[6]{% + \global\expandafter\chardef + \csname\RE@font@spec{#2}{#3}{#4}{#5}\RE@bsl@string#1\endcsname + =#6\relax +} +\newcommand{\DefineTextAccentVariant}[6]{% + \expandafter\gdef + \csname\RE@font@spec{#2}{#3}{#4}{#5}\RE@bsl@string#1\endcsname + {\add@accent{#6}}% +} +\CheckCommand*{\newcommand}{\@star@or@long\new@command} +\newcommand{\NewTextCommandVariant} + {\RE@make@text@cmd@variant\new@command} +\CheckCommand*{\renewcommand}{\@star@or@long\renew@command} +\newcommand{\RenewTextCommandVariant} + {\RE@make@text@cmd@variant\renew@command} +\CheckCommand*{\providecommand}{\@star@or@long\provide@command} +\newcommand{\ProvideTextCommandVariant} + {\RE@make@text@cmd@variant\provide@command} +\def\RE@make@text@cmd@variant#1#2#3#4#5#6{% + \expandafter\RE@make@text@cmd@var@x + \csname\RE@font@spec{#3}{#4}{#5}{#6}\RE@bsl@string#2\endcsname + {#1}% +} +\def\RE@make@text@cmd@var@x#1#2{% + \def\l@ngrel@x{% + \global\let#1#1% + \let\l@ngrel@x\relax + \global + }% + #2#1% +} + +\def\RE@if@composed#1{% + \expandafter\expandafter \expandafter\ifx + \expandafter\@car #1\relax\relax\@nil \@text@composite + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand{\DeclareVariableTextComposition}[3]{% + \expandafter\RE@dec@var@text@comp + \csname\string#1-#3\expandafter\endcsname + \csname\@backslashchar#2\string#1-#3\endcsname + {#1}{#2}{#3}% +} +\def\RE@dec@var@text@comp#1#2#3#4#5{% + \ifx#2\relax + \DeclareTextCompositeCommand{#3}{#4}{#5}% + {\RE@text@comp@variable#1}% + \else + \expandafter\expandafter \expandafter\ifx + \expandafter\@car#2\@nil + \RE@text@variable + \PackageInfo{relenc}{Redundant \protect + \DeclareVariableTextComposition.\MessageBreak + The composition of \protect#3 with #5 is\MessageBreak + already declared as a variable command\MessageBreak + in encoding #4% + }% + \else + \expandafter\let \csname#4/?/?/?\string#1\endcsname #2 + \def#2{\RE@text@comp@variable#1}% + \fi + \fi +} +\newcommand\DefineTextCompositionVariant[7]{% + \global \RE@def@text@comp@var\chardef{#1}{#2}{#3}{#4}{#5}{#6}% + #7\relax +} +\newcommand\DefineTextCompositionVariantCommand{% + \RE@def@text@comp@var\gdef +} +\def\RE@def@text@comp@var#1#2#3#4#5#6#7{% + \expandafter#1% + \csname + \RE@font@spec{#3}{#4}{#5}{#6}\@backslashchar + \RE@bsl@string#1-#6% + \endcsname +} +\newcommand\DefineTextUncomposedVariant[6]{% + \expandafter\RE@def@text@uncmp + \csname#2\RE@bsl@string#1\expandafter\endcsname + \csname#2/\RE@empty@is@qmark{#3}/\RE@empty@is@qmark{#4}/% + \RE@empty@is@qmark{#5}\@backslashchar\RE@bsl@string#1-#6% + \endcsname + {#6}{#1}{#2}% +} +\def\RE@def@text@uncmp#1#2#3#4#5{% + \RE@if@composed#1{% + \expandafter\RE@def@text@uncmp@x #1{#3}{#2}% + }{% + \PackageWarning{relenc}{There are no compositions for % + \protect#4 in\MessageBreak the #5 encoding. % + \protect\DefineTextUncomposedVariant\MessageBreak + makes no sense here% + }% + }% +} +\def\RE@def@text@uncmp@x\@text@composite#1\@text@composite#2#3{% + \gdef#3{#2}% +} +\newcommand\DefineTextVariantComposition[7]{% + \RE@def@text@var@comp\chardef{#1}{#2}{#3}{#4}{#5}{#6}#7\relax +} +\newcommand\DefineTextVariantCompositionCommand{% + \RE@def@text@var@comp\gdef +} +\def\RE@def@text@var@comp#1#2#3#4#5#6#7{% + \expandafter\let \expandafter\RE@garbage + \csname\RE@font@spec{#3}{#4}{#5}{#6}\RE@bsl@string#2\endcsname + \ifx \RE@garbage\relax + \expandafter\RE@make@text@comp\csname + \RE@font@spec{#3}{#4}{#5}{#6}\RE@bsl@string#2% + \endcsname {\RE@again@read@spath#2{##1}}% + \else + \RE@if@composed\RE@garbage{}{% + \expandafter\RE@make@text@comp + \csname + \RE@font@spec{#3}{#4}{#5}{#6}\RE@bsl@string#2% + \expandafter\endcsname + \expandafter{\RE@garbage{##1}}% + }% + \fi + \global\expandafter#1\csname + \@backslashchar\RE@font@spec{#3}{#4}{#5}{#6}\RE@bsl@string#2-#7% + \endcsname +} +\def\RE@make@text@comp#1#2{% + \gdef#1##1{\@text@composite#1##1\@empty\@text@composite{#2}}% +} +\newcommand{\SetEncodingSearchPath}[1]{% + \begingroup + \RE@spath@catcodes + \expandafter\RE@set@spath \csname#1-path\endcsname +} +\newcommand{\SetFamilySearchPath}[2]{% + \begingroup + \RE@spath@catcodes + \expandafter\RE@set@spath \csname#1/#2-path\endcsname +} +\def\RE@set@spath#1#2{% + \gdef#1{#2\RE@var@not@found}% + \endgroup +} +\def\RE@spath@catcodes{% + \catcode`\ =9\relax + \catcode`\^^I=9\relax + \catcode`\^^M=9\relax + \catcode`\@=11\relax + \catcode`\/=12\relax + \catcode`\?=12\relax +} +\def\RE@convert@nfss#1#2{% + \ifx\@empty#2% + \@backslashchar#1\expandafter\expandafter \expandafter\@gobble + \else + #1\expandafter#2% + \fi +} +\newcommand\ActivateDefineFirst{% + \let\RE@define@first\RE@active@define@first +} +\newcommand\DeactivateDefineFirst{% + \let\RE@define@first\@gobbletwo +} +\newcommand{\ShowVariantSearchResult}{% + \immediate\write\sixt@@n{Encoding: \cf@encoding}% + \immediate\write\sixt@@n{Family: \f@family}% + \immediate\write\sixt@@n{Series: \f@series}% + \immediate\write\sixt@@n{Shape: \f@shape}% + \immediate\write\sixt@@n + {Remaining search path:\MessageBreak\the\RE@temptoks}% + \show\RE@first@search@item +} +\def\RE@garbage#1#2{% + \ifx#1\relax + \expandafter#2% + \else + #1% + \fi} +\ifx \@text@composite@x\RE@garbage + \def\@text@composite@x#1{% + \ifx #1\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi + #1% + } +\fi +\let\RE@garbage\relax +\endinput +%% +%% End of file `relenc.sty'. |