From 82dd9916bb22b8665edaa5122fadd57d0ca8e519 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 5 Jul 2006 23:47:50 +0000 Subject: polynom 0.17 update git-svn-id: svn://tug.org/texlive/trunk@1781 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/polynom/polynom.sty | 57 +++++++++---------------- 1 file changed, 21 insertions(+), 36 deletions(-) (limited to 'Master/texmf-dist/tex/latex/polynom') diff --git a/Master/texmf-dist/tex/latex/polynom/polynom.sty b/Master/texmf-dist/tex/latex/polynom/polynom.sty index 2d58d7a601c..ca61d9eb5bf 100644 --- a/Master/texmf-dist/tex/latex/polynom/polynom.sty +++ b/Master/texmf-dist/tex/latex/polynom/polynom.sty @@ -9,7 +9,7 @@ %% The files polynom.dtx and polynom.ins and all files generated %% from these two files are referred to as `this work'. %% -%% This work is copyright 2000-2004 Carsten Heinz. +%% This work is copyright 2000-2006 Carsten Heinz, Hendri Adriaens. %% %% This work may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 of this @@ -21,10 +21,10 @@ %% %% This work has the LPPL maintenance status "maintained". %% -%% The Current Maintainer of this work is Carsten Heinz . +%% The Current Maintainer of this work is Hendri Adriaens. %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{polynom}[2004/08/12 0.16 (Carsten Heinz)] +\ProvidesPackage{polynom}[2006/04/20 0.17 (CH,HA)] \def\pld@AddTo#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} \def\pld@Extend#1#2{% \expandafter\pld@AddTo\expandafter#1\expandafter{#2}} @@ -36,16 +36,28 @@ \def\pld@false{\let\pld@if\iffalse} \pld@false \RequirePackage{keyval}[1997/11/10] -\newcommand\polyset[1]{\ifx\@empty#1\@empty\else \setkeys{pld}{#1}\fi} +\def\polyset{\setkeys{pld}} \def\pld@IfVar#1{% \def\pld@temp##1,#1,##2##3\relax{% \ifx\@empty##3\@empty \expandafter\@secondoftwo \else \expandafter\@firstoftwo \fi}% \expandafter\pld@temp\pld@variables,#1,\@empty\relax} -\define@key{pld}{vars} - {\let\pld@variables\@empty - \@tfor\pld@temp:=#1\do - {\pld@Extend\pld@variables{\expandafter,\pld@temp}}} +\define@key{pld}{vars}{% + \let\pld@variables\@empty + \@tfor\pld@temp:=#1\do{% + \pld@Extend\pld@variables{\expandafter,\pld@temp}% + \edef\pld@temp{% + \noexpand\define@key{pld}{\pld@temp}% + {\noexpand\pld@GetValue{\pld@temp}{####1}}% + }% + \pld@temp + }% +} +\def\pld@GetValue#1#2{% + \pld@GetPoly{\pld@polya}{}{#2}% + \ifx\pld@polya\@empty\def\pld@polya{\pld@R 01}\fi + \expandafter\let\csname pld@value@#1\endcsname\pld@polya +} \polyset{vars=Xx} \define@key{pld}{style} {\@ifundefined{pld@style#1}% @@ -912,7 +924,7 @@ \def\pld@InsertItems@do@b#1{\pld@AddTo\pld@temp{#1}} \def\pld@InsertItems@find#1&{% \ifx\relax#1\relax - \expandafter\pld@InsertItems@find@fill\pld@recentmonom\pld@V{}0\@empty + \expandafter\pld@InsertItems@find@fill\pld@recentmonom\pld@V{}0\@empty \else \def\pld@recentmonom{#1}% \expandafter\pld@IfMonomE\expandafter{\pld@monom}{#1}% @@ -1388,33 +1400,6 @@ \expandafter\pld@Euclidean\expandafter\pld@accu\expandafter {\the\@tempcnta}{#7}% \pld@AccuMul{#3}{#5}} -\renewcommand\polyset[1]{% - \ifx\@empty#1\@empty\else - \let\pld@KVsplit@saved\KV@split - \let\KV@split\pld@KVsplit - \setkeys{pld}{#1}% - \let\KV@split\pld@KVsplit@saved - \fi} -\def\pld@KVsplit#1=#2=#3\relax{% - \KV@@sp@def\@tempa{#1}% - \ifx\@tempa\@empty\else - \expandafter\let\expandafter\@tempc - \csname\KV@prefix\@tempa\endcsname - \ifx\@tempc\relax - \expandafter\pld@IfVar\expandafter{\@tempa}% - {\pld@GetPoly{\pld@polya}{}{#2}% - \ifx\pld@polya\@empty \def\pld@polya{\pld@R 01}\fi - \expandafter\let\csname pld@value@\@tempa\endcsname\pld@polya}% - {\KV@errx{\@tempa\space undefined}}% - \else - \ifx\@empty#3\@empty - \KV@default - \else - \KV@@sp@def\@tempb{#2}% - \expandafter\@tempc\expandafter{\@tempb}\relax - \fi - \fi - \fi} \def\pld@KVCases#1#2#3{% \@ifundefined{pld@#1@#2}% {\PackageError{Polynom}{Unknown value #2}{Try #3.}}% -- cgit v1.2.3