texlive[42664] Master/texmf-dist: polynom (9dec16)

commits+karl at tug.org commits+karl at tug.org
Fri Dec 9 23:53:03 CET 2016


Revision: 42664
          http://tug.org/svn/texlive?view=revision&revision=42664
Author:   karl
Date:     2016-12-09 23:53:03 +0100 (Fri, 09 Dec 2016)
Log Message:
-----------
polynom (9dec16)

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/polydemo.tex
    trunk/Master/texmf-dist/doc/latex/polynom/polynom.pdf
    trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx
    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	2016-12-09 22:52:51 UTC (rev 42663)
+++ trunk/Master/texmf-dist/doc/latex/polynom/README	2016-12-09 22:53:03 UTC (rev 42664)
@@ -1,5 +1,5 @@
 Polynom package
-Copyright 2000-2006 Carsten Heinz, Hendri Adriaens
+Copyright 2000-2016 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/polydemo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polynom/polydemo.tex	2016-12-09 22:52:51 UTC (rev 42663)
+++ trunk/Master/texmf-dist/doc/latex/polynom/polydemo.tex	2016-12-09 22:53:03 UTC (rev 42664)
@@ -86,6 +86,9 @@
 \dopolylongdiv{Polynomial long division -- Stages 1 to 11}{1}{11}
               {style=C}
 
+\dopolylongdiv{Polynomial long division -- Stages 1 to 11}{1}{11}
+              {style=D}
+
 \dopolyhornerscheme{Horner's scheme -- Stages 1 to 8}{1}{8}
                    {}
 

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	2016-12-09 22:52:51 UTC (rev 42663)
+++ trunk/Master/texmf-dist/source/latex/polynom/polynom.dtx	2016-12-09 22:53:03 UTC (rev 42664)
@@ -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-2006 Carsten Heinz, Hendri Adriaens.
+% This work is copyright 2000-2016 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,20 +57,20 @@
 %   \end{abstract}}
 %
 % \title{The \packagename{Polynom} Package}
-% \author{Copyright 2000--2006\\ Carsten Heinz \texttt{<\,cheinz at gmx.de\,>}, Hendri Adriaens}
-% \date{2006/04/20\enspace Version 0.17\\ \box\abstractbox}
+% \author{Copyright 2000--2016\\ Carsten Heinz \texttt{<\,cheinz at gmx.de\,>}, Hendri Adriaens}
+% \date{2016/12/09\enspace Version 0.18\\ \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
+%maintenance by Hendri Adriaens. 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}
+%\hfill\emph{Hendri Adriaens, 2006/04/20}\\
+%We thank Walter Daems for providing the \texttt D style.\hfill\emph{2016/12/09}
 %
 % \section{Introduction}
 %
@@ -226,7 +226,7 @@
 % \texttt{stage=}\meta{number}
 %       & print long division up to stage \meta{number} (starting with 1)\\
 %       &\\
-% \texttt{style=}\texttt{A$\vert$B$\vert$C}
+% \texttt{style=}\texttt{A$\vert$B$\vert$C$\vert$D}
 %       & define output scheme for long division, refer \href{polydemo.pdf}{polydemo.pdf}\\
 %       &\\
 % \texttt{div=}\meta{token}
@@ -510,7 +510,7 @@
 \define at key{pld}{style}
     {\@ifundefined{pld at style#1}%
          {\PackageError{polynom}{Unknown style `#1'}%
-          {Arguments can be `A' or `B' or `C'.}}%
+          {Arguments can be `A' or `B' or `C' or `D'.}}%
          {\let\pld at style=#1%
           \@nameuse{pld at style#1}}}
 %    \end{macrocode}
@@ -519,6 +519,7 @@
 \def\pld at styleA{\let\pld at iftopresult\iftrue}
 \def\pld at styleB{\let\pld at iftopresult\iffalse}
 \let\pld at styleC\pld at styleB
+\let\pld at styleD\pld at styleB
 %    \end{macrocode}
 %    \begin{macrocode}
 \polyset{style=A}
@@ -2066,6 +2067,7 @@
     \let\pld at pattern\@empty \let\pld at lastline\@empty
     \let\pld at subline\@empty \let\pld at currentline\@empty
     \let\pld at allines\@empty \let\pld at maxcol\z@
+    \let\pld at maxcolplustwo\z@ \let\pld at linepos\z@
     \pld at true \pld at DivPoly#1#2%
     \pld at ArrangeResult#1}
 %    \end{macrocode}
@@ -2427,7 +2429,11 @@
 %    \begin{macrocode}
     \ifnum\pld at firstcol>\@tempcnta \edef\pld at firstcol{\the\@tempcnta}\fi
     \ifnum\pld at lastcol<\@tempcnta \edef\pld at lastcol{\the\@tempcnta}\fi
-    \ifnum\pld at maxcol<\@tempcnta \edef\pld at maxcol{\the\@tempcnta}\fi
+    \ifnum\pld at maxcol<\@tempcnta 
+      \edef\pld at maxcol{\the\@tempcnta}
+      \@tempcntb\pld at maxcol\relax\advance\@tempcntb\tw@
+      \edef\pld at maxcolplustwo{\the\@tempcntb}
+    \fi
 %    \end{macrocode}
 % Finally we insert the arguments.
 %    \begin{macrocode}
@@ -2546,8 +2552,8 @@
         \def\pld at lastline{\pld at PrintPoly\pld at divisor\bigr)&}%
     \else
         \let\pld at lastline\@empty
-        \ifx B\pld at style\else
-            \def\pld at lastline{\pld at leftdelim\strut\pld at rightxdelim&}%
+        \ifx C\pld at style
+          \def\pld at lastline{\pld at leftdelim\strut\pld at rightxdelim&}%
         \fi
     \fi
 %    \end{macrocode}
@@ -2583,6 +2589,9 @@
         \@tempcnta-\@tempcnta
         \advance\@tempcnta\pld at maxcol\relax \advance\@tempcnta\@ne
         \edef\pld at span{\the\@tempcnta}%
+        \@tempcntb\pld at maxcol\relax\advance\@tempcntb\pld at span%
+        \advance\@tempcntb\@ne%
+        \edef\pld at linepos{\the\@tempcntb}%
 %    \end{macrocode}
 % Then we can add divisor, quotient, and remainder. First we go for style B.
 %    \begin{macrocode}
@@ -2603,20 +2612,34 @@
 %    \end{macrocode}
 % And now for style C. Note that we `smash' the depth of the fraction.
 %    \begin{macrocode}
-          \pld at AddTo\pld at lastline{%
-            &\multispan\pld at span$\pld at leftxdelim\strut\pld at rightdelim
-            \pld at div
-            \pld at PrintPolyWithDelims\pld at divisor=
-            \pld at PrintPolyShadow
-            \ifx\pld at remainder\@empty\else
-                +{}%
-                \setbox\z@=\hbox{$\displaystyle
-                  \frac{\let\strut\@empty\pld at firsttrue \expandafter
-                        \pld at PrintRemain\expandafter{\pld at remainder}}%
-                       {\let\strut\@empty\pld at PrintPoly\pld at divisor}$}%
-                \dp\z@=\z@\box\z@
-            \fi
-            $}%
+          \if C\pld at style
+            \pld at AddTo\pld at lastline{%
+              &\multispan\pld at span$\pld at leftxdelim\strut\pld at rightdelim
+              \pld at div
+              \pld at PrintPolyWithDelims\pld at divisor=
+              \pld at PrintPolyShadow
+              \ifx\pld at remainder\@empty\else
+                  +{}%
+                  \setbox\z@=\hbox{$\displaystyle
+                    \frac{\let\strut\@empty\pld at firsttrue \expandafter
+                          \pld at PrintRemain\expandafter{\pld at remainder}}%
+                         {\let\strut\@empty\pld at PrintPoly\pld at divisor}$}%
+                  \dp\z@=\z@\box\z@
+              \fi
+              $}%
+          \else
+%    \end{macrocode}
+% Finally, style D.
+%    \begin{macrocode}
+            \pld at AddTo\pld at lastline{%
+              \cr%
+              \noalign{\vskip-\normalbaselineskip}%
+              \multispan\pld at maxcol~&~&\multispan\pld at span${}\vrule~%
+              \pld at PrintPoly\pld at divisor\hfil\hfil$\cr%
+              \cline{\pld at maxcolplustwo-\pld at linepos}%
+              \multispan\pld at maxcol~&~&\multispan\pld at span${}\vrule height
+              2.25ex~\pld at PrintPolyShadow$\hfil\cr\noalign{\vskip-2\normalbaselineskip}}%
+          \fi
         \fi
     \fi
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty	2016-12-09 22:52:51 UTC (rev 42663)
+++ trunk/Master/texmf-dist/tex/latex/polynom/polynom.sty	2016-12-09 22:53:03 UTC (rev 42664)
@@ -62,12 +62,13 @@
 \define at key{pld}{style}
     {\@ifundefined{pld at style#1}%
          {\PackageError{polynom}{Unknown style `#1'}%
-          {Arguments can be `A' or `B' or `C'.}}%
+          {Arguments can be `A' or `B' or `C' or `D'.}}%
          {\let\pld at style=#1%
           \@nameuse{pld at style#1}}}
 \def\pld at styleA{\let\pld at iftopresult\iftrue}
 \def\pld at styleB{\let\pld at iftopresult\iffalse}
 \let\pld at styleC\pld at styleB
+\let\pld at styleD\pld at styleB
 \polyset{style=A}
 \define at key{pld}{delims}
     {\@ifnextchar[\pld at delims
@@ -713,6 +714,7 @@
     \let\pld at pattern\@empty \let\pld at lastline\@empty
     \let\pld at subline\@empty \let\pld at currentline\@empty
     \let\pld at allines\@empty \let\pld at maxcol\z@
+    \let\pld at maxcolplustwo\z@ \let\pld at linepos\z@
     \pld at true \pld at DivPoly#1#2%
     \pld at ArrangeResult#1}
 \def\pld at DivPoly#1#2{%
@@ -900,7 +902,11 @@
     \expandafter\pld at InsertItems@find\pld at pattern\relax&%
     \ifnum\pld at firstcol>\@tempcnta \edef\pld at firstcol{\the\@tempcnta}\fi
     \ifnum\pld at lastcol<\@tempcnta \edef\pld at lastcol{\the\@tempcnta}\fi
-    \ifnum\pld at maxcol<\@tempcnta \edef\pld at maxcol{\the\@tempcnta}\fi
+    \ifnum\pld at maxcol<\@tempcnta
+      \edef\pld at maxcol{\the\@tempcnta}
+      \@tempcntb\pld at maxcol\relax\advance\@tempcntb\tw@
+      \edef\pld at maxcolplustwo{\the\@tempcntb}
+    \fi
     \pld at InsertItems@do\pld at lastline{\pld at PLD{#3}}%
     \pld at InsertItems@do\pld at subline{\pld at PLD{#2}}%
     \pld at InsertItems@do\pld at currentline{\pld at PLD{#1}}}
@@ -967,8 +973,8 @@
         \def\pld at lastline{\pld at PrintPoly\pld at divisor\bigr)&}%
     \else
         \let\pld at lastline\@empty
-        \ifx B\pld at style\else
-            \def\pld at lastline{\pld at leftdelim\strut\pld at rightxdelim&}%
+        \ifx C\pld at style
+          \def\pld at lastline{\pld at leftdelim\strut\pld at rightxdelim&}%
         \fi
     \fi
     \expandafter\pld at AR@col\expandafter\pld at PLD
@@ -990,6 +996,9 @@
         \@tempcnta-\@tempcnta
         \advance\@tempcnta\pld at maxcol\relax \advance\@tempcnta\@ne
         \edef\pld at span{\the\@tempcnta}%
+        \@tempcntb\pld at maxcol\relax\advance\@tempcntb\pld at span%
+        \advance\@tempcntb\@ne%
+        \edef\pld at linepos{\the\@tempcntb}%
         \ifx B\pld at style
           \pld at AddTo\pld at lastline{%
             &\multispan\pld at span${}=%
@@ -1004,20 +1013,31 @@
             \pld at firstfalse
             \expandafter\pld at PrintRemain\expandafter{\pld at remainder}$}%
         \else
-          \pld at AddTo\pld at lastline{%
-            &\multispan\pld at span$\pld at leftxdelim\strut\pld at rightdelim
-            \pld at div
-            \pld at PrintPolyWithDelims\pld at divisor=
-            \pld at PrintPolyShadow
-            \ifx\pld at remainder\@empty\else
-                +{}%
-                \setbox\z@=\hbox{$\displaystyle
-                  \frac{\let\strut\@empty\pld at firsttrue \expandafter
-                        \pld at PrintRemain\expandafter{\pld at remainder}}%
-                       {\let\strut\@empty\pld at PrintPoly\pld at divisor}$}%
-                \dp\z@=\z@\box\z@
-            \fi
-            $}%
+          \if C\pld at style
+            \pld at AddTo\pld at lastline{%
+              &\multispan\pld at span$\pld at leftxdelim\strut\pld at rightdelim
+              \pld at div
+              \pld at PrintPolyWithDelims\pld at divisor=
+              \pld at PrintPolyShadow
+              \ifx\pld at remainder\@empty\else
+                  +{}%
+                  \setbox\z@=\hbox{$\displaystyle
+                    \frac{\let\strut\@empty\pld at firsttrue \expandafter
+                          \pld at PrintRemain\expandafter{\pld at remainder}}%
+                         {\let\strut\@empty\pld at PrintPoly\pld at divisor}$}%
+                  \dp\z@=\z@\box\z@
+              \fi
+              $}%
+          \else
+            \pld at AddTo\pld at lastline{%
+              \cr%
+              \noalign{\vskip-\normalbaselineskip}%
+              \multispan\pld at maxcol~&~&\multispan\pld at span${}\vrule~%
+              \pld at PrintPoly\pld at divisor\hfil\hfil$\cr%
+              \cline{\pld at maxcolplustwo-\pld at linepos}%
+              \multispan\pld at maxcol~&~&\multispan\pld at span${}\vrule height
+              2.25ex~\pld at PrintPolyShadow$\hfil\cr\noalign{\vskip-2\normalbaselineskip}}%
+          \fi
         \fi
     \fi
     \expandafter\pld at AR@\pld at allines\relax}



More information about the tex-live-commits mailing list