diff options
author | Karl Berry <karl@freefriends.org> | 2007-10-05 23:13:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-10-05 23:13:42 +0000 |
commit | 4c911ff5ebf103e651707635abf2064ddf149c96 (patch) | |
tree | d3550a7008c8851c3df0746c7e9800df307a0699 /Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | |
parent | f020fc73ad0b6e33f65d5f0b84646131e0340f2f (diff) |
oberdiek update/new: bigintcalc bitset grfext
git-svn-id: svn://tug.org/texlive/trunk@5118 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty | 157 |
1 files changed, 132 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty index 070ced9c61d..1a222383f32 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/kvoptions.sty @@ -26,30 +26,119 @@ %% This work consists of the main source file kvoptions.dtx %% and the derived files %% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv, -%% example-mycolorsetup.sty. +%% example-mycolorsetup.sty, kvoptions-test1.tex. %% %% No we don't need the option 'color'. -%% With color support option 'emphcolor' will dynamically change -%% the color of \emph statements. -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{kvoptions} - [2007/06/11 v2.7 Connects package keyval with LaTeX options (HO)]% -\RequirePackage{keyval} +%% With color support option 'emphcolor' will dynamically +%% change the color of \emph statements. \begingroup - \edef\x{\endgroup - \noexpand\AtEndOfPackage{% - \catcode\@ne=\the\catcode\@ne\relax - \catcode\tw@=\the\catcode\tw@\relax + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ + \expandafter\let\expandafter\x\csname ver@kvoptions.sty\endcsname + \ifcase 0% + \ifx\x\relax % plain + \else + \ifx\x\empty % LaTeX + \else + 1% + \fi + \fi + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{kvoptions}{The package is already loaded}% + \endgroup + \expandafter\endinput + \fi +\endgroup +\begingroup + \catcode40 12 % ( + \catcode41 12 % ) + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode47 12 % / + \catcode58 12 % : + \catcode64 11 % @ + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% }% + \else + \def\x#1#2[#3]{\endgroup + #2[{#3}]% + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@kvoptions.sty\endcsname +\ProvidesPackage{kvoptions}% + [2007/10/02 v2.8 Connects package keyval with LaTeX options (HO)] +\expandafter\edef\csname KVO@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax +} +\catcode64 11 % @ +\def\TMP@EnsureCode#1#2{% + \edef\KVO@AtEnd{% + \KVO@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{1}{14}% ^^A (comment) +\TMP@EnsureCode{2}{14}% ^^A (comment) +\TMP@EnsureCode{33}{12}% ! +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{42}{12}% * +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{94}{7}% ^ (superscript) +\TMP@EnsureCode{96}{12}% ` +\@ifundefined{define@key}{% + \RequirePackage{keyval}\relax +}{} +\@ifundefined{@onelevel@sanitize}{% + \def\@onelevel@sanitize#1{% + \edef#1{\expandafter\strip@prefix\meaning#1}% }% -\x -\catcode\@ne=14 % -\catcode\tw@=14 % +}{} +\@ifundefined{strip@prefix}{% + \def\strip@prefix#1>{}% +}{} +\@ifundefined{@x@protect}{% + \def\@x@protect#1\fi#2#3{% + \fi\protect#1% + }% + \let\@typeset@protect\relax +}{} +\@ifundefined{@currname}{% + \def\@currname{}% +}{} +\@ifundefined{@currext}{% + \def\@currext{}% +}{} \DeclareOption{debugshow}{\catcode\@ne=9 } \DeclareOption{patch}{\catcode\tw@=9 } \ProcessOptions\relax \define@key{KVO}{family}{% - \expandafter\edef\csname KVO@family@\@currname.\@currext\endcsname{#1}% + \expandafter\edef\csname KVO@family@% + \@currname.\@currext\endcsname{#1}% } \def\KVO@family{% \@ifundefined{KVO@family@\@currname.\@currext}{% @@ -59,7 +148,8 @@ }% } \define@key{KVO}{prefix}{% - \expandafter\edef\csname KVO@prefix@\@currname.\@currext\endcsname{#1}% + \expandafter\edef\csname KVO@prefix@% + \@currname.\@currext\endcsname{#1}% } \def\KVO@prefix{% \@ifundefined{KVO@prefix@\@currname.\@currext}{% @@ -75,7 +165,8 @@ \KVO@ifdefinable{if\KVO@prefix#2}{% \KVO@ifdefinable{\KVO@prefix#2true}{% \KVO@ifdefinable{\KVO@prefix#2false}{% - \expandafter\newif\csname if\KVO@prefix#2\endcsname + \csname newif\expandafter\endcsname + \csname if\KVO@prefix#2\endcsname \@ifundefined{\KVO@prefix#2#1}{% \PackageWarning{kvoptions}{% Initialization of option `#2' failed,\MessageBreak @@ -111,8 +202,10 @@ You are inside % \ifx\@currext\@clsextension class\else package\fi\space `\@currname.\@currext'.\MessageBreak - `\KVO@family' is used as familiy for the keyval options.\MessageBreak - `\KVO@prefix' serves as prefix for internal switch macros.\MessageBreak + `\KVO@family' is used as familiy % + for the keyval options.\MessageBreak + `\KVO@prefix' serves as prefix % + for internal switch macros.\MessageBreak \MessageBreak \@ehc }% @@ -410,7 +503,8 @@ \ifx\@classoptionslist\relax \else \@for\KVO@CurrentOption:=\@classoptionslist\do{% - \@ifundefined{KV@#1@\expandafter\KVO@getkey\KVO@CurrentOption=\@nil}{% + \@ifundefined{KV@#1@\expandafter\KVO@getkey + \KVO@CurrentOption=\@nil}{% }{% \edef\KVO@temp{% ^^B \etex@unexpanded\expandafter{% @@ -522,8 +616,15 @@ \def\KVO@setcurrentvalue#1=#2\@nil{% \KV@@sp@def\CurrentOptionValue{#2}% } -^^B\@gobble - \endinput +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname documentclass\endcsname\relax + \def\ProcessKeyvalOptions{% + \@ifstar{}\@gobble + }% + \catcode\tw@=14 % +\fi +^^B\@gobbletwo +\KVO@AtEnd\endinput \PackageInfo{kvoptions}{Patching LaTeX's option system} \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname eTeXversion\endcsname\relax @@ -691,11 +792,15 @@ } \def\KVO@ExecuteOptions#1#2{% \let#1\CurrentOption - \edef\CurrentOption@SaveLevel{\the\numexpr\CurrentOption@SaveLevel+1}% + \edef\CurrentOption@SaveLevel{% + \the\numexpr\CurrentOption@SaveLevel+1% + }% \@for\CurrentOption:=#2\do{% \csname ds@\CurrentOption\endcsname }% - \edef\CurrentOption@SaveLevel{\the\numexpr\CurrentOption@SaveLevel-1}% + \edef\CurrentOption@SaveLevel{% + \the\numexpr\CurrentOption@SaveLevel-1% + }% \let\CurrentOption#1% } \def\KVO@fileswith@pti@ns#1[#2]#3[#4]{% @@ -724,7 +829,8 @@ \else \ifx\relax##1\relax \else - \KVO@onefilewithoptions{##1}[{\KVO@temp}][{#4}]\@pkgextension + \KVO@onefilewithoptions{##1}[{\KVO@temp}][{#4}]% + \@pkgextension \fi \expandafter\reserved@b \fi @@ -936,6 +1042,7 @@ \else \let\@fileswith@pti@ns\KVO@fileswith@pti@ns \fi +KVO@AtEnd \endinput %% %% End of file `kvoptions.sty'. |