/usr/share/cantor/maximabackend/cantor-initmaxima.lisp is in cantor-backend-maxima 4:16.08.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ;;this file is partially based on similar files from the WxMaxima and Texmacs projects
(in-package :maxima)
#+clisp (defvar *old-suppress-check-redefinition*
custom:*suppress-check-redefinition*)
#+clisp (setf custom:*suppress-check-redefinition* t)
(setf *alt-display2d* 'cantor-latex-print)
(setf *alt-display1d* 'cantor-regular-print)
(setf *prompt-prefix* "<cantor-prompt>")
;;the newline at the end of the next line is needed, as we otherwise might run into
;;weird issues with KPtyProcess caching the line of the prompt, and sending it twice
;;to readStdOut()
(setf *prompt-suffix* "</cantor-prompt>
")
;(setf *general-display-prefix* "DISPLAY_PREFIX")
(setf *maxima-prolog* "Hello World")
(setf *maxima-epilog* "Bye!")
(setf $inchar "%I")
(setf $outchar "%O")
(setf $display2d nil)
;#-gcl(setf *debug-io* (make-two-way-stream *standard-input* *standard-output*))
;#+(or cmu sbcl scl)
;(setf *terminal-io* (make-two-way-stream *standard-input* *standard-output*))
;; Small changes to mactex.lisp for interfacing with TeXmacs
;; Andrey Grozin, 2001-2006
;(defun main-prompt ()
; (format () "~A(~A~D) ~A" *prompt-prefix*
; (tex-stripdollar $inchar) $linenum *prompt-suffix*))
(declare-top
(special lop rop ccol $gcprint $inchar)
(*expr tex-lbp tex-rbp))
(defconstant texport *standard-output*)
(defun tex-stripdollar (x)
(let ((s (quote-% (maybe-invert-string-case (symbol-name (stripdollar x))))))
(if (> (length s) 1)
(concatenate 'string "\\mathrm{" s "}")
s)))
(defprop mtimes ("\\*") texsym)
(defun cantor-latex-print (x)
(princ "<cantor-result>")
(princ "<cantor-text>")
(linear-displa x )
(princ "</cantor-text>")
(let ((ccol 1))
(mapc #'princ
(tex x '("<cantor-latex>") '("</cantor-latex>") 'mparen 'mparen)))
(princ "</cantor-result>")
)
(defun cantor-regular-print (x)
(princ "<cantor-result>")
(princ "<cantor-text>")
(linear-displa x)
(princ "</cantor-text>")
(princ "</cantor-result>")
)
(defun cantor-inspect (var)
($disp var)
(mapc #'(lambda (x)
($disp (eval x))
($disp "-cantor-value-separator-")
)
(cdr var)
)
)
#+clisp (setf custom:*suppress-check-redefinition*
*old-suppress-check-redefinition*)
|