summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-17 21:28:18 +0000
committerKarl Berry <karl@freefriends.org>2017-07-17 21:28:18 +0000
commit531e0c1b7e1882ab23f72329bf77e5f0cf5e3f79 (patch)
treed086c22713339cf25599953af27ed7d88d3d36c0 /Master/texmf-dist
parent4efb345fea5a89cba5c023d090b1eec849cec37c (diff)
polynom (17jul17)
git-svn-id: svn://tug.org/texlive/trunk@44832 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/polynom/README2
-rw-r--r--Master/texmf-dist/doc/latex/polynom/polydemo.pdfbin146225 -> 146225 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polynom/polynom.pdfbin338024 -> 338333 bytes
-rw-r--r--Master/texmf-dist/source/latex/polynom/polynom.dtx30
-rw-r--r--Master/texmf-dist/source/latex/polynom/polynom.ins2
-rw-r--r--Master/texmf-dist/tex/latex/polynom/polynom.sty18
6 files changed, 36 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/polynom/README b/Master/texmf-dist/doc/latex/polynom/README
index eb4c001e842..e36a0a14c61 100644
--- a/Master/texmf-dist/doc/latex/polynom/README
+++ b/Master/texmf-dist/doc/latex/polynom/README
@@ -1,5 +1,5 @@
Polynom package
-Copyright 2000-2016 Carsten Heinz, Hendri Adriaens
+Copyright 2000-2017 Carsten Heinz, Hendri Adriaens
Released under the LaTeX Project Public License 1.3 or later
The polynom package implements macros for manipulating
diff --git a/Master/texmf-dist/doc/latex/polynom/polydemo.pdf b/Master/texmf-dist/doc/latex/polynom/polydemo.pdf
index c979775598f..7e75c1b3915 100644
--- a/Master/texmf-dist/doc/latex/polynom/polydemo.pdf
+++ b/Master/texmf-dist/doc/latex/polynom/polydemo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polynom/polynom.pdf b/Master/texmf-dist/doc/latex/polynom/polynom.pdf
index 16d18e6b743..a045eba3665 100644
--- a/Master/texmf-dist/doc/latex/polynom/polynom.pdf
+++ b/Master/texmf-dist/doc/latex/polynom/polynom.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/polynom/polynom.dtx b/Master/texmf-dist/source/latex/polynom/polynom.dtx
index c2b2943f67d..c85ba214fa8 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-2016 Carsten Heinz, Hendri Adriaens.
+% This work is copyright 2000-2017 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
@@ -57,8 +57,8 @@
% \end{abstract}}
%
% \title{The \packagename{Polynom} Package}
-% \author{Copyright 2000--2016\\ Carsten Heinz \texttt{<\,cheinz@gmx.de\,>}, Hendri Adriaens}
-% \date{2016/12/09\enspace Version 0.18\\ \box\abstractbox}
+% \author{Copyright 2000--2017\\ Carsten Heinz \texttt{<\,cheinz@gmx.de\,>}, Hendri Adriaens}
+% \date{2017/07/17\enspace Version 0.19\\ \box\abstractbox}
% \maketitle
% \section{Preface}
%
@@ -70,7 +70,8 @@
%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}\\
-%We thank Walter Daems for providing the \texttt D style.\hfill\emph{2016/12/09}
+%We thank Walter Daems for providing the \texttt D style.\hfill\emph{2016/12/09}\\
+%And Hendrik Vogt for providing a bug fix on \texttt{\textbackslash polylongdiv}.\hfill\emph{2017/07/17}
%
% \section{Introduction}
%
@@ -411,7 +412,7 @@
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polynom}[2006/04/20 0.17 (CH,HA)]
+\ProvidesPackage{polynom}[2017/07/17 0.19 (CH,HA)]
% \end{macrocode}
% Now follow two frequently used definitions.
%
@@ -597,10 +598,11 @@
% \end{macro}
%
% \begin{macro}{\polylongdiv}
-% Ditto.
+% Ditto. We use an if to use the fix by Hendrik Vogt only inside this macro.
% \begin{macrocode}
+\newif\ifpld@InsidePolylongdiv
\newcommand*\polylongdiv[1][]{%
- \begingroup
+ \begingroup\pld@InsidePolylongdivtrue
\let\pld@stage\maxdimen \polyset{#1}%
\pld@GetPoly{\pld@polya\pld@polyb}%
{\pld@LongDividePoly\pld@polya\pld@polyb
@@ -2096,9 +2098,16 @@
\pld@NMultiplyPoly\pld@sub\pld@divisor\pld@factor
\pld@SubtractPoly\pld@remainder\pld@sub
\expandafter\pld@DivPoly@l}%
- {}%
+ {\ifpld@InsidePolylongdiv\expandafter\pld@insert@remainder
+ \pld@last@remainder+\relax\relax\fi}%
\fi}
% \end{macrocode}
+% The fix by Hendrik Vogt.
+% \begin{macrocode}
+\def\pld@insert@remainder#1+#2\relax{%
+ \ifx\relax#1\relax\else\pld@InsertItems\@empty\@empty{#1}\fi
+ \ifx\relax#2\relax\else\pld@insert@remainder#2\relax\fi}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pld@IfNeedsDivision}
@@ -2208,6 +2217,7 @@
% \begin{macrocode}
\def\pld@SubtractPoly@l#1+#2\@empty#3+#4\@empty{%
\ifx\relax#1\relax
+ \let\pld@last@remainder\@empty
\ifx\relax#3\relax \let\pld@next\@empty \else
% \end{macrocode}
% If we've reached the end of the first polynomial, we add the monomial of the
@@ -2266,7 +2276,9 @@
% \end{macrocode}
% Finally the macro used to add the rest of the first polynomial.
% \begin{macrocode}
-\def\pld@SubtractPoly@r#1+\relax+\@empty{\pld@AddToPoly\pld@tempoly{#1}}
+\def\pld@SubtractPoly@r#1+\relax+\@empty{%
+ \pld@AddToPoly\pld@tempoly{#1}%
+ \def\pld@last@remainder{#1}}
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/polynom/polynom.ins b/Master/texmf-dist/source/latex/polynom/polynom.ins
index cec1404da2d..0ff74c5b3b2 100644
--- a/Master/texmf-dist/source/latex/polynom/polynom.ins
+++ b/Master/texmf-dist/source/latex/polynom/polynom.ins
@@ -10,7 +10,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-2006 Carsten Heinz, Hendri Adriaens.
+This work is copyright 2000-2017 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
diff --git a/Master/texmf-dist/tex/latex/polynom/polynom.sty b/Master/texmf-dist/tex/latex/polynom/polynom.sty
index 95d49465ab0..9493f2d3d4e 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-2006 Carsten Heinz, Hendri Adriaens.
+%% This work is copyright 2000-2017 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
@@ -24,7 +24,7 @@
%% The Current Maintainer of this work is Hendri Adriaens.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polynom}[2006/04/20 0.17 (CH,HA)]
+\ProvidesPackage{polynom}[2017/07/17 0.19 (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}}
@@ -96,8 +96,9 @@
\let\polyremainder\pld@remainder
\pld@RestoreAftergroup#1\polyremainder\relax
\endgroup\ignorespaces}}
+\newif\ifpld@InsidePolylongdiv
\newcommand*\polylongdiv[1][]{%
- \begingroup
+ \begingroup\pld@InsidePolylongdivtrue
\let\pld@stage\maxdimen \polyset{#1}%
\pld@GetPoly{\pld@polya\pld@polyb}%
{\pld@LongDividePoly\pld@polya\pld@polyb
@@ -728,8 +729,12 @@
\pld@NMultiplyPoly\pld@sub\pld@divisor\pld@factor
\pld@SubtractPoly\pld@remainder\pld@sub
\expandafter\pld@DivPoly@l}%
- {}%
+ {\ifpld@InsidePolylongdiv\expandafter\pld@insert@remainder
+ \pld@last@remainder+\relax\relax\fi}%
\fi}
+\def\pld@insert@remainder#1+#2\relax{%
+ \ifx\relax#1\relax\else\pld@InsertItems\@empty\@empty{#1}\fi
+ \ifx\relax#2\relax\else\pld@insert@remainder#2\relax\fi}
\def\pld@IfNeedsDivision#1#2{%
\pld@ExpandTwo\pld@IfND{#1+\@empty}{#2+\@empty}}
\def\pld@IfND#1+#2\@empty#3+#4\@empty{%
@@ -786,6 +791,7 @@
\pld@SubtractPoly@l#2\@empty}
\def\pld@SubtractPoly@l#1+#2\@empty#3+#4\@empty{%
\ifx\relax#1\relax
+ \let\pld@last@remainder\@empty
\ifx\relax#3\relax \let\pld@next\@empty \else
\pld@AddToPoly\pld@tempoly{#3}%
\pld@if \pld@InsertItems{#3}{#3}{}\fi
@@ -815,7 +821,9 @@
}%
\fi \fi
\pld@next}
-\def\pld@SubtractPoly@r#1+\relax+\@empty{\pld@AddToPoly\pld@tempoly{#1}}
+\def\pld@SubtractPoly@r#1+\relax+\@empty{%
+ \pld@AddToPoly\pld@tempoly{#1}%
+ \def\pld@last@remainder{#1}}
\def\pld@InsertFake#1{%
\let\pld@temp\@empty
\expandafter\pld@InsertFake@l#1&\relax&}