texlive[44832] Master/texmf-dist: polynom (17jul17)
commits+karl at tug.org
commits+karl at tug.org
Mon Jul 17 23:28:18 CEST 2017
Revision: 44832
http://tug.org/svn/texlive?view=revision&revision=44832
Author: karl
Date: 2017-07-17 23:28:18 +0200 (Mon, 17 Jul 2017)
Log Message:
-----------
polynom (17jul17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/polynom/README
trunk/Master/texmf-dist/doc/latex/polynom/polydemo.pdf
trunk/Master/texmf-dist/doc/latex/polynom/polynom.pdf
trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx
trunk/Master/texmf-dist/source/latex/polynom/polynom.ins
trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty
Modified: trunk/Master/texmf-dist/doc/latex/polynom/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polynom/README 2017-07-17 21:28:03 UTC (rev 44831)
+++ trunk/Master/texmf-dist/doc/latex/polynom/README 2017-07-17 21:28:18 UTC (rev 44832)
@@ -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
Modified: trunk/Master/texmf-dist/doc/latex/polynom/polydemo.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/polynom/polynom.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx 2017-07-17 21:28:03 UTC (rev 44831)
+++ trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx 2017-07-17 21:28:18 UTC (rev 44832)
@@ -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 at gmx.de\,>}, Hendri Adriaens}
-% \date{2016/12/09\enspace Version 0.18\\ \box\abstractbox}
+% \author{Copyright 2000--2017\\ Carsten Heinz \texttt{<\,cheinz at 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 at InsidePolylongdiv
\newcommand*\polylongdiv[1][]{%
- \begingroup
+ \begingroup\pld at InsidePolylongdivtrue
\let\pld at stage\maxdimen \polyset{#1}%
\pld at GetPoly{\pld at polya\pld at polyb}%
{\pld at LongDividePoly\pld at polya\pld at polyb
@@ -2096,9 +2098,16 @@
\pld at NMultiplyPoly\pld at sub\pld at divisor\pld at factor
\pld at SubtractPoly\pld at remainder\pld at sub
\expandafter\pld at DivPoly@l}%
- {}%
+ {\ifpld at InsidePolylongdiv\expandafter\pld at insert@remainder
+ \pld at last@remainder+\relax\relax\fi}%
\fi}
% \end{macrocode}
+% The fix by Hendrik Vogt.
+% \begin{macrocode}
+\def\pld at insert@remainder#1+#2\relax{%
+ \ifx\relax#1\relax\else\pld at InsertItems\@empty\@empty{#1}\fi
+ \ifx\relax#2\relax\else\pld at insert@remainder#2\relax\fi}
+% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\pld at IfNeedsDivision}
@@ -2208,6 +2217,7 @@
% \begin{macrocode}
\def\pld at SubtractPoly@l#1+#2\@empty#3+#4\@empty{%
\ifx\relax#1\relax
+ \let\pld at last@remainder\@empty
\ifx\relax#3\relax \let\pld at 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 at SubtractPoly@r#1+\relax+\@empty{\pld at AddToPoly\pld at tempoly{#1}}
+\def\pld at SubtractPoly@r#1+\relax+\@empty{%
+ \pld at AddToPoly\pld at tempoly{#1}%
+ \def\pld at last@remainder{#1}}
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/polynom/polynom.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/polynom/polynom.ins 2017-07-17 21:28:03 UTC (rev 44831)
+++ trunk/Master/texmf-dist/source/latex/polynom/polynom.ins 2017-07-17 21:28:18 UTC (rev 44832)
@@ -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
Modified: trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty 2017-07-17 21:28:03 UTC (rev 44831)
+++ trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty 2017-07-17 21:28:18 UTC (rev 44832)
@@ -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 at AddTo#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
\def\pld at Extend#1#2{%
\expandafter\pld at AddTo\expandafter#1\expandafter{#2}}
@@ -96,8 +96,9 @@
\let\polyremainder\pld at remainder
\pld at RestoreAftergroup#1\polyremainder\relax
\endgroup\ignorespaces}}
+\newif\ifpld at InsidePolylongdiv
\newcommand*\polylongdiv[1][]{%
- \begingroup
+ \begingroup\pld at InsidePolylongdivtrue
\let\pld at stage\maxdimen \polyset{#1}%
\pld at GetPoly{\pld at polya\pld at polyb}%
{\pld at LongDividePoly\pld at polya\pld at polyb
@@ -728,8 +729,12 @@
\pld at NMultiplyPoly\pld at sub\pld at divisor\pld at factor
\pld at SubtractPoly\pld at remainder\pld at sub
\expandafter\pld at DivPoly@l}%
- {}%
+ {\ifpld at InsidePolylongdiv\expandafter\pld at insert@remainder
+ \pld at last@remainder+\relax\relax\fi}%
\fi}
+\def\pld at insert@remainder#1+#2\relax{%
+ \ifx\relax#1\relax\else\pld at InsertItems\@empty\@empty{#1}\fi
+ \ifx\relax#2\relax\else\pld at insert@remainder#2\relax\fi}
\def\pld at IfNeedsDivision#1#2{%
\pld at ExpandTwo\pld at IfND{#1+\@empty}{#2+\@empty}}
\def\pld at IfND#1+#2\@empty#3+#4\@empty{%
@@ -786,6 +791,7 @@
\pld at SubtractPoly@l#2\@empty}
\def\pld at SubtractPoly@l#1+#2\@empty#3+#4\@empty{%
\ifx\relax#1\relax
+ \let\pld at last@remainder\@empty
\ifx\relax#3\relax \let\pld at next\@empty \else
\pld at AddToPoly\pld at tempoly{#3}%
\pld at if \pld at InsertItems{#3}{#3}{}\fi
@@ -815,7 +821,9 @@
}%
\fi \fi
\pld at next}
-\def\pld at SubtractPoly@r#1+\relax+\@empty{\pld at AddToPoly\pld at tempoly{#1}}
+\def\pld at SubtractPoly@r#1+\relax+\@empty{%
+ \pld at AddToPoly\pld at tempoly{#1}%
+ \def\pld at last@remainder{#1}}
\def\pld at InsertFake#1{%
\let\pld at temp\@empty
\expandafter\pld at InsertFake@l#1&\relax&}
More information about the tex-live-commits
mailing list