SF.net SVN: fricas:[2628] trunk

1 view
Skip to first unread message

wheb...@users.sourceforge.net

unread,
Mar 2, 2020, 11:40:35 AM3/2/20
to fricas...@googlegroups.com
Revision: 2628
http://sourceforge.net/p/fricas/code/2628
Author: whebisch
Date: 2020-03-02 16:40:30 +0000 (Mon, 02 Mar 2020)
Log Message:
-----------
Get rid of string quotes in derivatives

Modified Paths:
--------------
trunk/ChangeLog
trunk/src/algebra/formula.spad
trunk/src/algebra/mathml.spad
trunk/src/algebra/tex.spad
trunk/src/algebra/texmacs.spad

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2020-03-02 15:14:55 UTC (rev 2627)
+++ trunk/ChangeLog 2020-03-02 16:40:30 UTC (rev 2628)
@@ -1,5 +1,11 @@
2020-03-02 Waldek Hebisch <heb...@math.uni.wroc.pl>

+ * src/algebra/formula.spad, src/algebra/mathml.spad,
+ src/algebra/tex.spad, src/algebra/texmacs.spad:
+ Get rid of string quotes in derivatives
+
+2020-03-02 Waldek Hebisch <heb...@math.uni.wroc.pl>
+
* src/algebra/genups.spad: Generalize
src/algebra/Makefile.in: Adjust


Modified: trunk/src/algebra/formula.spad
===================================================================
--- trunk/src/algebra/formula.spad 2020-03-02 15:14:55 UTC (rev 2627)
+++ trunk/src/algebra/formula.spad 2020-03-02 16:40:30 UTC (rev 2628)
@@ -253,7 +253,8 @@
op = "PAREN" =>
group parenthesize formatFormula(first args, minPrec)
op = "PRIME" =>
- formatSpecial("SUPERSUB", [first args, " "::E, second(args)], prec)
+ formatSpecial("SUPERSUB", [first args, empty()$E,
+ second(args)], prec)
op = "OVERBAR" =>
empty?(args) => ""
group concat [formatFormula(first args, minPrec)," bar"]

Modified: trunk/src/algebra/mathml.spad
===================================================================
--- trunk/src/algebra/mathml.spad 2020-03-02 15:14:55 UTC (rev 2627)
+++ trunk/src/algebra/mathml.spad 2020-03-02 16:40:30 UTC (rev 2628)
@@ -740,7 +740,7 @@
s := s"<mo>&#x02032;</mo>"
if commaS = commaTest then
arg2 := message(s)
- formatSpecial('SUPERSUB, [first args, " "::E, arg2], prec)
+ formatSpecial('SUPERSUB, [first args, empty()$E, arg2], prec)

formatPlex(op : Sy, args : L E, prec : I) : S ==
p : I := position(op, plexOps)

Modified: trunk/src/algebra/tex.spad
===================================================================
--- trunk/src/algebra/tex.spad 2020-03-02 15:14:55 UTC (rev 2627)
+++ trunk/src/algebra/tex.spad 2020-03-02 16:40:30 UTC (rev 2628)
@@ -319,6 +319,27 @@
parenthesize str ==
concat ["\left( ",str," \right)"]

+ format_prime(args : L E, prec : I) : S ==
+ arg2 := second(args)
+ narg2 :=
+ string?(arg2) =>
+ arg2s : S := string(arg2)
+ c_char := char(",")
+ every?(c +-> c = c_char, arg2s) =>
+ prime_str := "\prime"
+ n := #arg2s
+ n = 1 => message(prime_str)
+ res := new(n*#prime_str, char(" "))
+ k := 1
+ for i in 1..n repeat
+ for j in 1..#prime_str repeat
+ qsetelt!(res, k, qelt(prime_str, j))
+ k := k + 1
+ message(res)
+ arg2
+ arg2
+ formatSpecial('SUPERSUB, [first args, empty()$E, narg2], prec)
+
formatSpecial(op : Sy, args : L E, prec : I) : S ==
arg : E
prescript : Boolean := false
@@ -352,7 +373,7 @@
op = 'PAREN =>
group parenthesize ungroup formatExpr(first args, minPrec)
op = 'PRIME =>
- formatSpecial('SUPERSUB, [first args, " "::E, second(args)], prec)
+ format_prime(args, prec)
op = 'OVERBAR =>
empty?(args) => ""
group concat ["\overline ", formatExpr(first args, minPrec)]

Modified: trunk/src/algebra/texmacs.spad
===================================================================
--- trunk/src/algebra/texmacs.spad 2020-03-02 15:14:55 UTC (rev 2627)
+++ trunk/src/algebra/texmacs.spad 2020-03-02 16:40:30 UTC (rev 2628)
@@ -1035,7 +1035,8 @@
op = 'PAREN =>
group parenthesize ungroup formatExpr(first args, minPrec)
op = 'PRIME =>
- formatSpecial('SUPERSUB, [first args, " "::E, second(args)], prec)
+ formatSpecial('SUPERSUB, [first args, empty()$E,
+ second(args)], prec)
op = 'OVERBAR =>
empty?(args) => ""
concat ["(wide ", formatExpr(first args, minPrec), " _"<bar>_")"]

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Reply all
Reply to author
Forward
0 new messages