From 4cdf992ae5541df31f424a6c4fd119f307b0c17c Mon Sep 17 00:00:00 2001 From: Tim Daly Date: Mon, 26 Jan 2015 00:51:12 -0500 Subject: books/bookvol10.3 fixed bug 7297: Extraneous "#\" characters fixed by 20150126.01.fmp.patch (sent by Frederick H. Pitts) ========================================================================= bug 7297: Extraneous "#\" characters in Axiom TeX output The Axiom TeX output for a number with radix greater than 10 potentially contains "#\A" (A is any upper case alphabetic character) where it should contain just "A" (the double quotes are mine, they do not appear in the actual output). This particular bug is used as a Axiom debugging example in "Volume 4: Axiom Developers Guide' on page 91, but no fix is presented there. In the release notes I stumbled over a fix to essentially the same bug in HTML output. A quick fix applied to the TeX case is to replace the invocation of the Lisp function "object2String" with "mathObject2String" (again, the double quotes are mine) in the file bookvol10.3.pamphlet, line 132043. I came across this issue while trying to use TeXmacs as a front end to Axiom. In that environment, the above fix generates nicely formatted numbers with fixed width characters (i.e. monospaced) and over-lining as needed. On the other hand, if I run Axiom in an Emacs shell and attempt to use latex-math-preview-expression to format the Axiom TeX output, the number is not so nicely formatted. The letter digits are slanted and variable width while the number digits are upright and fixed width. Maybe a "\rm" font specification command is needed in the Axiom TeX output for a number with radix greater than 10. reported on 25 Jan 2015 by Frederick H. Pitts --- books/bookvol10.3.pamphlet | 17 ++- buglist | 52 +++--- changelog | 4 + patch | 32 +++- src/axiom-website/patches.html | 2 + src/input/Makefile.pamphlet | 7 +- src/input/radixtex.input.pamphlet | 408 +++++++++++++++++++++++++++++++++++++ 7 files changed, 484 insertions(+), 38 deletions(-) create mode 100644 src/input/radixtex.input.pamphlet diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index fc0a266..34cf166 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -141307,42 +141307,54 @@ TexFormat(): public == private where US ==> UniversalSegment(Integer) public == SetCategory with + coerce: E -> $ ++ coerce(o) changes o in the standard output format to TeX ++ format. + convert: (E,I) -> $ ++ convert(o,step) changes o in standard output format to ++ TeX format and also adds the given step number. This is useful ++ if you want to create equations with given numbers or have the ++ equation numbers correspond to the interpreter step numbers. + convert: (E,I,E) -> $ ++ convert(o,step,type) changes o in standard output format to ++ TeX format and also adds the given step number and type. This ++ is useful if you want to create equations with given numbers ++ or have the equation numbers correspond to the interpreter step ++ numbers. + display: ($, I) -> Void ++ display(t,width) outputs the TeX formatted code t so that each ++ line has length less than or equal to \spadvar{width}. + display: $ -> Void ++ display(t) outputs the TeX formatted code t so that each ++ line has length less than or equal to the value set by ++ the system command \spadsyscom{set output length}. + epilogue: $ -> L S ++ epilogue(t) extracts the epilogue section of a TeX form t. + tex: $ -> L S ++ tex(t) extracts the TeX section of a TeX form t. + new: () -> $ ++ new() create a new, empty object. Use \spadfun{setPrologue!}, ++ \spadfun{setTex!} and \spadfun{setEpilogue!} to set the various ++ components of this object. + prologue: $ -> L S ++ prologue(t) extracts the prologue section of a TeX form t. + setEpilogue!: ($, L S) -> L S ++ setEpilogue!(t,strings) sets the epilogue section of a TeX form t ++ to strings. + setTex!: ($, L S) -> L S ++ setTex!(t,strings) sets the TeX section of a TeX form t to strings. + setPrologue!: ($, L S) -> L S ++ setPrologue!(t,strings) sets the prologue section of a TeX form t ++ to strings. @@ -141426,12 +141438,9 @@ TexFormat(): public == private where -- public function definitions new() : $ == --- [["\["]$(L S), [""]$(L S), ["\]"]$(L S)]$Rep [["$$"]$(L S), [""]$(L S), ["$$"]$(L S)]$Rep newWithNum(stepNum: I) : $ == --- num : S := concat("%AXIOM STEP NUMBER: ",string(stepNum)$S) --- [["\["]$(L S), [""]$(L S), ["\]",num]$(L S)]$Rep num : S := concat(concat("\leqno(",string(stepNum)$S),")")$S [["$$"]$(L S), [""]$(L S), [num,"$$"]$(L S)]$Rep @@ -141500,7 +141509,7 @@ TexFormat(): public == private where then setelt(str,i,char " ")$S str - stringify expr == (object2String$Lisp expr) pretend S + stringify expr == (mathObject2String$Lisp expr)@S lineConcat( line : S, lines: L S ) : L S == length := #line diff --git a/buglist b/buglist index 2970249..3bb5842 100644 --- a/buglist +++ b/buglist @@ -23,32 +23,6 @@ factor(t1) reported on 25 Jan 2015 by Ralf Hemmecke ========================================================================= -bug 7297: Extraneous "#\" characters in Axiom TeX output - - The Axiom TeX output for a number with radix greater than 10 -potentially contains "#\A" (A is any upper case alphabetic character) -where it should contain just "A" (the double quotes are mine, they do -not appear in the actual output). This particular bug is used as a -Axiom debugging example in "Volume 4: Axiom Developers Guide' on page -91, but no fix is presented there. In the release notes I stumbled over -a fix to essentially the same bug in HTML output. A quick fix applied -to the TeX case is to replace the invocation of the Lisp function -"object2String" with "mathObject2String" (again, the double quotes are -mine) in the file bookvol10.3.pamphlet, line 132043. - - I came across this issue while trying to use TeXmacs as a front end -to Axiom. In that environment, the above fix generates nicely formatted -numbers with fixed width characters (i.e. monospaced) and over-lining as -needed. On the other hand, if I run Axiom in an Emacs shell and attempt -to use latex-math-preview-expression to format the Axiom TeX output, the -number is not so nicely formatted. The letter digits are slanted and -variable width while the number digits are upright and fixed width. -Maybe a "\rm" font specification command is needed in the Axiom TeX -output for a number with radix greater than 10. - -reported on 25 Jan 2015 by Frederick H. Pitts - -========================================================================= bug 7296: connect from VIEW2D is not graph specific The connect function in VIEW2D globally turns lines on or off. @@ -41710,4 +41684,30 @@ Browse -> "Integer" -> IntegerNumberSystem >> System error: Caught fatal error [memory may be damaged] +fixed by 20150126.01.fmp.patch (sent by Frederick H. Pitts) +========================================================================= +bug 7297: Extraneous "#\" characters in Axiom TeX output + + The Axiom TeX output for a number with radix greater than 10 +potentially contains "#\A" (A is any upper case alphabetic character) +where it should contain just "A" (the double quotes are mine, they do +not appear in the actual output). This particular bug is used as a +Axiom debugging example in "Volume 4: Axiom Developers Guide' on page +91, but no fix is presented there. In the release notes I stumbled over +a fix to essentially the same bug in HTML output. A quick fix applied +to the TeX case is to replace the invocation of the Lisp function +"object2String" with "mathObject2String" (again, the double quotes are +mine) in the file bookvol10.3.pamphlet, line 132043. + + I came across this issue while trying to use TeXmacs as a front end +to Axiom. In that environment, the above fix generates nicely formatted +numbers with fixed width characters (i.e. monospaced) and over-lining as +needed. On the other hand, if I run Axiom in an Emacs shell and attempt +to use latex-math-preview-expression to format the Axiom TeX output, the +number is not so nicely formatted. The letter digits are slanted and +variable width while the number digits are upright and fixed width. +Maybe a "\rm" font specification command is needed in the Axiom TeX +output for a number with radix greater than 10. + +reported on 25 Jan 2015 by Frederick H. Pitts diff --git a/changelog b/changelog index 3fd6cfe..de4a9f8 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20150125 fmp src/axiom-website/patches.html 20150126.01.fmp.patch +20150126 fmp books/bookvol10.3 fixed bug 7297: Extraneous "#\" characters +20150126 fmp src/input/radixtex.input regression test fixed bug 7297 +20150126 fmp src/input/Makefile add radixtex regression test 20150125 rhx src/axiom-website/patches.html 20150125.02.rhx.patch 20151025 rhx buglist: bug 7298: coercion to SUP failure in factor 20150125 fmp src/axiom-website/patches.html 20150125.01.fmp.patch diff --git a/patch b/patch index 7d9131f..b40619f 100644 --- a/patch +++ b/patch @@ -1,12 +1,32 @@ -buglist: bug 7298: coercion to SUP failure in factor +books/bookvol10.3 fixed bug 7297: Extraneous "#\" characters -t1:=(4*x^3+2*y^2+1)*(12*x^5-x^3*y+12)*(x+1)*(y^2+3)*(x^2-1) -factor(t1) +fixed by 20150126.01.fmp.patch (sent by Frederick H. Pitts) +========================================================================= +bug 7297: Extraneous "#\" characters in Axiom TeX output - >> Error detected within library code - (1 . failed) cannot be coerce to mode (SparseUnivariatePolynomial (Integer)) + The Axiom TeX output for a number with radix greater than 10 +potentially contains "#\A" (A is any upper case alphabetic character) +where it should contain just "A" (the double quotes are mine, they do +not appear in the actual output). This particular bug is used as a +Axiom debugging example in "Volume 4: Axiom Developers Guide' on page +91, but no fix is presented there. In the release notes I stumbled over +a fix to essentially the same bug in HTML output. A quick fix applied +to the TeX case is to replace the invocation of the Lisp function +"object2String" with "mathObject2String" (again, the double quotes are +mine) in the file bookvol10.3.pamphlet, line 132043. + + I came across this issue while trying to use TeXmacs as a front end +to Axiom. In that environment, the above fix generates nicely formatted +numbers with fixed width characters (i.e. monospaced) and over-lining as +needed. On the other hand, if I run Axiom in an Emacs shell and attempt +to use latex-math-preview-expression to format the Axiom TeX output, the +number is not so nicely formatted. The letter digits are slanted and +variable width while the number digits are upright and fixed width. +Maybe a "\rm" font specification command is needed in the Axiom TeX +output for a number with radix greater than 10. + +reported on 25 Jan 2015 by Frederick H. Pitts -reported on 25 Jan 2015 by Ralf Hemmecke diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 40c6e1e..1fd86b9 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4974,6 +4974,8 @@ books/bookvol5 remove $undoFlag and rename functions
buglist: bug 7297: Extraneous "#\" characters in Axiom TeX output
20150125.02.rhx.patch buglist: bug 7298: coercion to SUP failure in factor
+20150126.01.fmp.patch +books/bookvol10.3 fixed bug 7297: Extraneous "#\" characters
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet index 09ae62f..854df2e 100644 --- a/src/input/Makefile.pamphlet +++ b/src/input/Makefile.pamphlet @@ -335,6 +335,7 @@ REGRESSTESTS= ackermann.regress \ poly1.regress polycoer.regress poly.regress psgenfcn.regress \ quat1.regress quat.regress r20abugs.regress r20bugs.regress \ r21bugsbig.regress r21bugs.regress radff.regress radix.regress \ + radixtex.regress \ realclos.regress reclos.regress reclos2.regress regset.regress \ repa6.regress risch.regress \ robidoux.regress \ @@ -778,7 +779,8 @@ FILES= ${OUT}/ackermann.input \ ${OUT}/r20abugs.input \ ${OUT}/r20bugs.input ${OUT}/r21bugsbig.input \ ${OUT}/r21bugs.input \ - ${OUT}/radff.input ${OUT}/radix.input ${OUT}/realclos.input \ + ${OUT}/radff.input ${OUT}/radix.input ${OUT}/radixtex.input \ + ${OUT}/realclos.input \ ${OUT}/reclos.input ${OUT}/reclos2.input ${OUT}/regset.input \ ${OUT}/risch.input \ ${OUT}/robidoux.input ${OUT}/roman.input ${OUT}/roots.input \ @@ -1113,7 +1115,8 @@ DOCFILES= \ ${DOC}/quat.input.dvi ${DOC}/r20abugs.input.dvi \ ${DOC}/r20bugs.input.dvi ${DOC}/r21bugsbig.input.dvi \ ${DOC}/r21bugs.input.dvi ${DOC}/radff.input.dvi \ - ${DOC}/radix.input.dvi ${DOC}/realclos.input.dvi \ + ${DOC}/radix.input.dvi ${DOC}/radixtex.input.dvi \ + ${DOC}/realclos.input.dvi \ ${DOC}/reclos.input.dvi ${DOC}/reclos2.input.dvi \ ${DOC}/regset.input.dvi ${DOC}/reductio.input.dvi \ ${DOC}/regset.input.dvi ${DOC}/repa6.input.dvi \ diff --git a/src/input/radixtex.input.pamphlet b/src/input/radixtex.input.pamphlet new file mode 100644 index 0000000..e5863f2 --- /dev/null +++ b/src/input/radixtex.input.pamphlet @@ -0,0 +1,408 @@ +\documentclass{article} +\usepackage{axiom} +\setlength{\textwidth}{400pt} +\begin{document} +\title{\$SPAD/src/input radixtex.input} +\author{Frederick H. Pitts} +\maketitle +\begin{abstract} +This fixes bug 7297: Extraneous \verb|#\| characters in Axiom TeX output +and provides unit tests. +\end{abstract} +\eject +\tableofcontents +\eject +\begin{chunk}{*} +)set break resume +)set message test on +)set message auto off +)set output algebra off +)set output tex on +)sys rm -f radixtex.output +)spool radixtex.output +)set output tex console +)clear all + +--S 1 of 31 +1 / 2 = radix( 1 / 2, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{2}}={0.8} +--R\leqno(1) +--R$$ +--R +--R Type: Equation(Any) +--E 1 + +--S 2 of 31 +1 / 3 = radix( 1 / 3, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{3}}={0.{\overline 5}} +--R\leqno(2) +--R$$ +--R +--R Type: Equation(Any) +--E 2 + +--S 3 of 31 +2 / 3 = radix( 2 / 3, 16 ) +--R +--R +--R$$ +--R{ \frac{2}{3}}={0.{\overline A}} +--R\leqno(3) +--R$$ +--R +--R Type: Equation(Any) +--E 3 + +--S 4 of 31 +1 / 4 = radix( 1 / 4, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{4}}={0.4} +--R\leqno(4) +--R$$ +--R +--R Type: Equation(Any) +--E 4 + +--S 5 of 31 +3 / 4 = radix( 3 / 4, 16 ) +--R +--R +--R$$ +--R{ \frac{3}{4}}={0.C} +--R\leqno(5) +--R$$ +--R +--R Type: Equation(Any) +--E 5 + +--S 6 of 31 +1 / 5 = radix( 1 / 5, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{5}}={0.{\overline 3}} +--R\leqno(6) +--R$$ +--R +--R Type: Equation(Any) +--E 6 + +--S 7 of 31 +2 / 5 = radix( 2 / 5, 16 ) +--R +--R +--R$$ +--R{ \frac{2}{5}}={0.{\overline 6}} +--R\leqno(7) +--R$$ +--R +--R Type: Equation(Any) +--E 7 + +--S 8 of 31 +3 / 5 = radix( 3 / 5, 16 ) +--R +--R +--R$$ +--R{ \frac{3}{5}}={0.{\overline 9}} +--R\leqno(8) +--R$$ +--R +--R Type: Equation(Any) +--E 8 + +--S 9 of 31 +4 / 5 = radix( 4 / 5, 16 ) +--R +--R +--R$$ +--R{ \frac{4}{5}}={0.{\overline C}} +--R\leqno(9) +--R$$ +--R +--R Type: Equation(Any) +--E 9 + +--S 10 of 31 +1 / 6 = radix( 1 / 6, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{6}}={0.2{\overline A}} +--R\leqno(10) +--R$$ +--R +--R Type: Equation(Any) +--E 10 + +--S 11 of 31 +5 / 6 = radix( 5 / 6, 16 ) +--R +--R +--R$$ +--R{ \frac{5}{6}}={0.D{\overline 5}} +--R\leqno(11) +--R$$ +--R +--R Type: Equation(Any) +--E 11 + +--S 12 of 31 +1 / 7 = radix( 1 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{7}}={0.{\overline {249}}} +--R\leqno(12) +--R$$ +--R +--R Type: Equation(Any) +--E 12 + +--S 13 of 31 +2 / 7 = radix( 2 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{2}{7}}={0.{\overline {492}}} +--R\leqno(13) +--R$$ +--R +--R Type: Equation(Any) +--E 13 + +--S 14 of 31 +3 / 7 = radix( 3 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{3}{7}}={0.{\overline {6DB}}} +--R\leqno(14) +--R$$ +--R +--R Type: Equation(Any) +--E 14 + +--S 15 of 31 +4 / 7 = radix( 4 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{4}{7}}={0.{\overline {924}}} +--R\leqno(15) +--R$$ +--R +--R Type: Equation(Any) +--E 15 + +--S 16 of 31 +5 / 7 = radix( 5 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{5}{7}}={0.{\overline {B6D}}} +--R\leqno(16) +--R$$ +--R +--R Type: Equation(Any) +--E 16 + +--S 17 of 31 +6 / 7 = radix( 6 / 7, 16 ) +--R +--R +--R$$ +--R{ \frac{6}{7}}={0.{\overline {DB6}}} +--R\leqno(17) +--R$$ +--R +--R Type: Equation(Any) +--E 17 + +--S 18 of 31 +1 / 8 = radix( 1 / 8, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{8}}={0.2} +--R\leqno(18) +--R$$ +--R +--R Type: Equation(Any) +--E 18 + +--S 19 of 31 +3 / 8 = radix( 3 / 8, 16 ) +--R +--R +--R$$ +--R{ \frac{3}{8}}={0.6} +--R\leqno(19) +--R$$ +--R +--R Type: Equation(Any) +--E 19 + +--S 20 of 31 +5 / 8 = radix( 5 / 8, 16 ) +--R +--R +--R$$ +--R{ \frac{5}{8}}={0.A} +--R\leqno(20) +--R$$ +--R +--R Type: Equation(Any) +--E 20 + +--S 21 of 31 +7 / 8 = radix( 7 / 8, 16 ) +--R +--R +--R$$ +--R{ \frac{7}{8}}={0.E} +--R\leqno(21) +--R$$ +--R +--R Type: Equation(Any) +--E 21 + +--S 22 of 31 +1 / 9 = radix( 1 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{9}}={0.{\overline {1C7}}} +--R\leqno(22) +--R$$ +--R +--R Type: Equation(Any) +--E 22 + +--S 23 of 31 +2 / 9 = radix( 2 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{2}{9}}={0.{\overline {38E}}} +--R\leqno(23) +--R$$ +--R +--R Type: Equation(Any) +--E 23 + +--S 24 of 31 +4 / 9 = radix( 4 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{4}{9}}={0.{\overline {71C}}} +--R\leqno(24) +--R$$ +--R +--R Type: Equation(Any) +--E 24 + +--S 25 of 31 +5 / 9 = radix( 5 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{5}{9}}={0.{\overline {8E3}}} +--R\leqno(25) +--R$$ +--R +--R Type: Equation(Any) +--E 25 + +--S 26 of 31 +7 / 9 = radix( 7 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{7}{9}}={0.{\overline {C71}}} +--R\leqno(26) +--R$$ +--R +--R Type: Equation(Any) +--E 26 + +--S 27 of 31 +8 / 9 = radix( 8 / 9, 16 ) +--R +--R +--R$$ +--R{ \frac{8}{9}}={0.{\overline {E38}}} +--R\leqno(27) +--R$$ +--R +--R Type: Equation(Any) +--E 27 + +--S 28 of 31 +1 / 10 = radix( 1 / 10, 16 ) +--R +--R +--R$$ +--R{ \frac{1}{{10}}}={0.1{\overline 9}} +--R\leqno(28) +--R$$ +--R +--R Type: Equation(Any) +--E 28 + +--S 29 of 31 +3 / 10 = radix( 3 / 10, 16 ) +--R +--R +--R$$ +--R{ \frac{3}{{10}}}={0.4{\overline C}} +--R\leqno(29) +--R$$ +--R +--R Type: Equation(Any) +--E 29 + +--S 30 of 31 +7 / 10 = radix( 7 / 10, 16 ) +--R +--R +--R$$ +--R{ \frac{7}{{10}}}={0.B{\overline 3}} +--R\leqno(30) +--R$$ +--R +--R Type: Equation(Any) +--E 30 + +--S 31 of 31 +9 / 10 = radix( 9 / 10, 16 ) +--R +--R +--R$$ +--R{ \frac{9}{{10}}}={0.E{\overline 6}} +--R\leqno(31) +--R$$ +--R +--R Type: Equation(Any) +--E 31 + +)set output tex off +)set output algebra on +)spool +)lisp (bye) + +\end{chunk} +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} -- 1.7.5.4