On 04.05.22 03:23, Waldek Hebisch wrote:
On Tue, May 03, 2022 at 11:28:58PM +0200, Ralf Hemmecke wrote:
I am currently working on the jfricas interface.
Unfortunately, there are some rather unsafe elements in it,
I must patch the functions |mathprintWithNumber| and OBEY
https://github.com/hemmecke/jfricas/blob/master/jfricas/webspad.lisp#L84
;;; Override a FriCAS function in order to remove the equation number.
(DEFUN |mathprintWithNumber| (|x|)
(PROG ()
(RETURN
(PROGN
;(|ioHook| '|startAlgebraOutput|)
(|saySpadMsg| '|--FORMAT:BEG:Algebra|)
(|maprin| (|outputTran2| |x|))
(|saySpadMsg| '|--FORMAT:END:Algebra|)
;(|ioHook| '|endOfAlgebraOutput|)
))))
I do not see why you are doing this. If you want to call
'saySpadMsg' appropriate io hook should be enough. For
skipping line numbers setting '$IOindex' to NIL should
be enough.
Well, not so easy. ;-) I could probably do this with the ioHook, but
the Jupyter interface also has numbers for input/output. I use $IOindex
to syncronize FriCAS step numbers with Jupyter numbers. Setting $IOindex
to nil is thus counterproductive.
Maybe I could change the |mathprintWithNumber| in FriCAS to depend on a
flag that if not set prevents outputting the equation number.
Sounds a bit strang, given the name ...withNumber.
mathprintWithNumber x ==
ioHook("startAlgebraOutput")
x:= outputTran2 x
maprin
$IOindex => ['EQUATNUM,$IOindex,x]
x
ioHook("endOfAlgebraOutput")
Must probably look deeper for an appropriate solution.
Ralf
--
You received this message because you are subscribed to the Google Groups "FriCAS -
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/636be0e1-a21d-b797-dc5a-65ebb21e11d5%40hemmecke.org.