diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-17 21:28:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-17 21:28:18 +0000 |
commit | 531e0c1b7e1882ab23f72329bf77e5f0cf5e3f79 (patch) | |
tree | d086c22713339cf25599953af27ed7d88d3d36c0 /Master/texmf-dist/source/latex/polynom | |
parent | 4efb345fea5a89cba5c023d090b1eec849cec37c (diff) |
polynom (17jul17)
git-svn-id: svn://tug.org/texlive/trunk@44832 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/polynom')
-rw-r--r-- | Master/texmf-dist/source/latex/polynom/polynom.dtx | 30 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/polynom/polynom.ins | 2 |
2 files changed, 22 insertions, 10 deletions
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 |