From 531e0c1b7e1882ab23f72329bf77e5f0cf5e3f79 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 17 Jul 2017 21:28:18 +0000 Subject: polynom (17jul17) git-svn-id: svn://tug.org/texlive/trunk@44832 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/polynom/README | 2 +- Master/texmf-dist/doc/latex/polynom/polydemo.pdf | Bin 146225 -> 146225 bytes Master/texmf-dist/doc/latex/polynom/polynom.pdf | Bin 338024 -> 338333 bytes Master/texmf-dist/source/latex/polynom/polynom.dtx | 30 ++++++++++++++------- Master/texmf-dist/source/latex/polynom/polynom.ins | 2 +- Master/texmf-dist/tex/latex/polynom/polynom.sty | 18 +++++++++---- 6 files changed, 36 insertions(+), 16 deletions(-) (limited to 'Master') 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 Binary files a/Master/texmf-dist/doc/latex/polynom/polydemo.pdf and b/Master/texmf-dist/doc/latex/polynom/polydemo.pdf 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 Binary files a/Master/texmf-dist/doc/latex/polynom/polynom.pdf and b/Master/texmf-dist/doc/latex/polynom/polynom.pdf 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&} -- cgit v1.2.3