summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/polynom/polynom.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/polynom/polynom.dtx')
-rw-r--r--Master/texmf-dist/source/latex/polynom/polynom.dtx93
1 files changed, 46 insertions, 47 deletions
diff --git a/Master/texmf-dist/source/latex/polynom/polynom.dtx b/Master/texmf-dist/source/latex/polynom/polynom.dtx
index 20475eeb59c..e87ca6f918f 100644
--- a/Master/texmf-dist/source/latex/polynom/polynom.dtx
+++ b/Master/texmf-dist/source/latex/polynom/polynom.dtx
@@ -3,7 +3,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
@@ -15,7 +15,7 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% The Current Maintainer of this work is Carsten Heinz <cheinz@gmx.de>.
+% The Current Maintainer of this work is Hendri Adriaens.
%
%<*driver>
\documentclass{ltxdoc}
@@ -46,7 +46,7 @@
%
%\newbox\abstractbox
%\setbox\abstractbox=\vbox{
-% \begin{abstract}
+% \begin{abstract}
% The \packagename{polynom} package implements macros for manipulating
% polynomials. For example, it can typeset polynomial long divisions and
% synthetic divisions (Horner's scheme), which can be shown step by step.
@@ -54,13 +54,23 @@
% with rational coefficients.
% \emph{Please note that this is work in progress. Multivariate polynomials
% are \emph{currently} not supported.}
-% \end{abstract}}
+% \end{abstract}}
%
% \title{The \packagename{Polynom} Package}
-% \author{Copyright 2000--2004\\ Carsten Heinz \texttt{<\,cheinz@gmx.de\,>}}
-% \date{2004/08/12\enspace Version 0.16\\ \box\abstractbox}
+% \author{Copyright 2000--2006\\ Carsten Heinz \texttt{<\,cheinz@gmx.de\,>}, Hendri Adriaens}
+% \date{2006/04/20\enspace Version 0.17\\ \box\abstractbox}
% \maketitle
%
+% \section{Preface}
+%
+%Because Carsten Heinz could not be reached anymore for a long time,
+%this package has been taken over according to the LPPL for
+%maintenance by Hendri Adriaens 2006/04/20. This package was using and
+%redefining internals of the \packagename{keyval} package and hence
+%it was incompatible with \packagename{xkeyval}. This problem has
+%been solved and the processing of the \texttt{vars} key has been
+%simplified. All following text is the original by Carsten Heinz.
+%\hfill\emph{Hendri Adriaens, 2006/04/20}
%
% \section{Introduction}
%
@@ -320,7 +330,7 @@
% the role of verbatim polynomials. This is also the case for \meta{\(a\)} and
% \meta{\(b\)} in table~\ref{low}, but each \meta{cs$_{\ldots}$} must be a
% control sequence, in which the result is saved.
-%
+%
% The command in table~\ref{low} can be used for low level calculations, and in
% particular to store polynomials for later use with the high-level commands.
% For example one could write the following.
@@ -392,7 +402,7 @@
%\end{thebibliography}}
%
%
-% \CheckSum{4559}
+% \CheckSum{4500}
%
%
% \section{Preliminaries}
@@ -401,7 +411,7 @@
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polynom}[2004/08/12 0.16 (Carsten Heinz)]
+\ProvidesPackage{polynom}[2006/04/20 0.17 (CH,HA)]
% \end{macrocode}
% Now follow two frequently used definitions.
%
@@ -448,7 +458,7 @@
% \packagename{keyval} package.
% \begin{macrocode}
\RequirePackage{keyval}[1997/11/10]
-\newcommand\polyset[1]{\ifx\@empty#1\@empty\else \setkeys{pld}{#1}\fi}
+\def\polyset{\setkeys{pld}}
% \end{macrocode}
% \end{macro}
%
@@ -463,12 +473,30 @@
\else \expandafter\@firstoftwo \fi}%
\expandafter\pld@temp\pld@variables,#1,\@empty\relax}
% \end{macrocode}
-% The key iterates down the tokens and expand the list.
+% \end{macro}
+% The key iterates down the tokens and expands the list, making a new
+% key for every variable.
% \begin{macrocode}
-\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
+ }%
+}
+% \end{macrocode}
+% \begin{macro}{\pld@GetValue}
+% Helper macro to retrieve the value of a variable.
+% \begin{macrocode}
+\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
+}
% \end{macrocode}
% \begin{macrocode}
\polyset{vars=Xx}
@@ -703,7 +731,7 @@
% \caption{Mathematical notation versus internal representation}\label{mvi}
% \end{table}
% Table \ref{mvi} shows examples of the internal data format. As you can see,
-% sometimes there are various ways to represent the same polynomial. The
+% sometimes there are various ways to represent the same polynomial. The
% exact internal data depends on how you enter the factors and which state has
% been reached in the division algorithm, for example.
%
@@ -2125,7 +2153,7 @@
\let\pld@firstcol\maxdimen \let\pld@lastcol\z@
\fi
% \end{macrocode}
-% The submacro does the subtraction and defines appropriate data
+% The submacro does the subtraction and defines appropriate data
% |\pld@lastline|, |\pld@subline|, \ldots\space.
% \begin{macrocode}
\let\pld@tempoly\@empty
@@ -2451,7 +2479,7 @@
% \begin{macrocode}
\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
% \end{macrocode}
% Otherwise we either drop the rest of the pattern since we've found the
@@ -3379,35 +3407,6 @@
% The following code lines come without comments. Good luck!
%
% \begin{macrocode}
-\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}
-% \end{macrocode}
-% \begin{macrocode}
\def\pld@KVCases#1#2#3{%
\@ifundefined{pld@#1@#2}%
{\PackageError{Polynom}{Unknown value #2}{Try #3.}}%