(exec-file "$TEXMACS_PATH/progs/" "Init.scm")
(define cas-menu
  '(
    ("normal" (insert-string "normal()") )
    ("factor" (insert-string "factor()") )
    ("simplify" (insert-string "simplify()") )
    ("partfrac" (insert-string "partfrac()") )
    ---
    (-> "Plot"
	("Plot setup" (insert-string "xyztrange()") )
	("Plotfunc" (insert-string "plotfunc()") )
	("Plotparam" (insert-string "plotparam()") )
	("Plotpolar" (insert-string "plotpolar()") )
	("Plotseq" (insert-string "plotseq()") )
	)
    ---
    (-> "Constants"
 	("e" (insert-string "e") )
 	("i" (insert-string "i") )
 	("pi" (insert-string "pi") )
 	("+infinity" (insert-string "+infinity") )
 	("-infinity" (insert-string "-infinity") )
 	("infinity" (insert-string "infinity") )
 	("undef" (insert-string "undef") )
	)
    (-> "Real"
	("abs" (insert-string "abs()") )
	("factorial" (insert-string "factorial()") )
	("max" (insert-string "max()") )
	("min" (insert-string "min()") )
	("sign" (insert-string "sign()") )
	)
    (-> "Complex"
	("abs" (insert-string "abs()") )
	("arg" (insert-string "arg()") )
	("conj" (insert-string "conj()") )
	("im" (insert-string "im()") )
	("re" (insert-string "re()") )
	)
    (-> "Exp and ln"
 	("exp" (insert-string "exp()") )
 	("ln" (insert-string "ln()") )
 	("log10" (insert-string "log10()") )
	)
    (-> "Trig functions"
 	("acos" (insert-string "acos()") )
 	("asin" (insert-string "asin()") )
 	("atan" (insert-string "atan()") )
 	("cos" (insert-string "cos()") )
 	("sin" (insert-string "sin()") )
 	("tan" (insert-string "tan()") )
	)
    (-> "Hyperbolic"
 	("acosh" (insert-string "acosh()") )
 	("asinh" (insert-string "asinh()") )
 	("atanh" (insert-string "atanh()") )
 	("cosh" (insert-string "cosh()") )
 	("sinh" (insert-string "sinh()") )
 	("tanh" (insert-string "tanh()") )
	)
    (-> "Special functions"
 	("Airy_Ai" (insert-string "Airy_Ai()") )
 	("Airy_Bi" (insert-string "Airy_Bi") )
 	("gamma" (insert-string "gamma()") )
 	("psi" (insert-string "psi()") )
 	("zeta()" (insert-string "zeta()") )
	)
    ---
    (-> "Integer arithmetic"
 	("gcd" (insert-string "gcd()") )
 	("lcm" (insert-string "lcm()") )
 	("euler" (insert-string "euler()") )
 	("iabcuv" (insert-string "iabcuv()") )
 	("ichinrem" (insert-string "ichinrem()") )
 	("iegcd" (insert-string "iegcd()") )
 	("ifactor" (insert-string "ifactor()") )
 	("ifactors" (insert-string "ifactors()") )
 	("iquo" (insert-string "iquo()") )
 	("irem" (insert-string "irem()") )
 	("is_prime" (insert-string "is_prime()") )
 	("nextprime" (insert-string "nextprime()") )
 	("pa2b2" (insert-string "pa2b2()") )
 	("prevprime" (insert-string "prevprime()") )
	)
    (-> "Polynomial arithmetic"
 	("gcd" (insert-string "gcd()") )
 	("lcm" (insert-string "lcm()") )
 	("abcuv" (insert-string "abcuv()") )
 	("chinrem" (insert-string "chinrem()") )
 	("cyclotomic" (insert-string "cyclotomic()") )
 	("divis" (insert-string "divis()") )
 	("e2r" (insert-string "e2r()") )
 	("egcd" (insert-string "egcd()") )
 	("factor" (insert-string "factor()") )
 	("hermite" (insert-string "hermite()") )
 	("laguerre" (insert-string "laguerre()") )
 	("pcoeff" (insert-string "pcoeff()") )
 	("peval" (insert-string "peval()") )
 	("proot" (insert-string "proot()") )
 	("quo" (insert-string "quo()") )
 	("quorem" (insert-string "quorem()") )
 	("rem" (insert-string "rem()") )
 	("r2e" (insert-string "r2e()") )
 	("ranm" (insert-string "ranm()") )
 	("tchebyshev1" (insert-string "tchebyshev1()") )
 	("tchebyshev2" (insert-string "tchebyshev2()") )
	)
    (-> "Calculus"
 	("curl" (insert-string "curl()") )
 	("diff" (insert-string "diff()") )
 	("desolve" (insert-string "desolve()") )
 	("divergence" (insert-string "divergence()") )
 	("hessian" (insert-string "hessian()") )
 	("integrate" (insert-string "integrate()") )
 	("laplacian" (insert-string "laplacian()") )
 	("limit" (insert-string "limit()") )
 	("series" (insert-string "series()") )
 	("solve" (insert-string "solve()") )
 	("sum" (insert-string "sum()") )
	)
    (-> "Numeric"
 	("newton" (insert-string "newton()") )
 	("romberg" (insert-string "romberg()") )
 	("Bisection" (insert-string "fsolve(,bisection_solver)") )
 	("Brent" (insert-string "fsolve(,brent_solver)") )
 	("Falsepos" (insert-string "fsolve(,falsepos_solver)") )
 	("Newton" (insert-string "fsolve(,newton_solver)") )
 	("Secant" (insert-string "fsolve(,secant_solver)") )
 	("Newton D" (insert-string "fsolve(,dnewton_solver)") )
 	("Hybrid" (insert-string "fsolve(,hybrid_solver)") )
 	("Hybrid S" (insert-string "fsolve(,hybrids_solver)") )
 	("Newton Jacobian" (insert-string "fsolve(,newtonj_solver)") )
 	("Hybrid Jacobian" (insert-string "fsolve(,hybridj_solver)") )
 	("Hybrid S Jacobian" (insert-string "fsolve(,hybridsj_solver)") )
	)
    (-> "Transform"
 	("fourier_an" (insert-string "fourier_an()") )
 	("fourier_bn" (insert-string "fourier_bn()") )
 	("fourier_cn" (insert-string "fourier_cn()") )
 	("Inverse laplace" (insert-string "ilaplace()") )
 	("Laplace" (insert-string "laplace()") )
	)
    (-> "Rewrite"
 	("hyp2exp" (insert-string "hyp2exp()") )
 	("lin" (insert-string "lin()") )
 	("lncollect" (insert-string "lncollect()") )
 	("sincos" (insert-string "sincos()") )
 	("trig2exp" (insert-string "trig2exp()") )
 	("tsimplify" (insert-string "tsimplify()") )
	)
    (-> "Rewrite invtrig"
 	("acos2asin" (insert-string "acos2asin()") )
 	("acos2atan" (insert-string "acos2atan()") )
 	("asin2acos" (insert-string "asin2acos()") )
 	("asin2atan" (insert-string "asin2atan()") )
 	("atan2acos" (insert-string "atan2acos()") )
 	("atan2asin" (insert-string "atan2asin()") )
	)
    (-> "Rewrite trig"
 	("halftan" (insert-string "halftan()") )
 	("tan2sincos" (insert-string "tan2sincos()") )
 	("tan2sincos2" (insert-string "tan2sincos2()") )
 	("tcollect" (insert-string "tcollect()") )
 	("texpand" (insert-string "texpand()") )
 	("trigcos" (insert-string "trigcos()") )
 	("trigsin" (insert-string "trigsin()") )
 	("trigtan" (insert-string "trigtan()") )
 	("tlin" (insert-string "tlin()") )
	)
    ---
    (-> "Vector"
 	("abs" (insert-string "abs()") )
 	("Scalar product" (insert-string "dot()") )
 	("Vector product" (insert-string "cross()") )
	)
    (-> "Matrix"
 	("Hadamard" (insert-string "hadamard()") )
 	("Identity" (insert-string "idn()") )
 	("Inverse" (insert-string "inv()") )
 	("Random" (insert-string "ranm()") )
 	("trace" (insert-string "trace()") )
 	("Transconjugate" (insert-string "trn()") )
 	("Transpose" (insert-string "tran()") )
 	("vandermonde" (insert-string "vandermonde()") )
	)
    (-> "Eigenvalues/vectors"
 	("Eigenvectors" (insert-string "egv()") )
 	("Eigenvalues" (insert-string "egvl()") )
 	("jordan" (insert-string "jordan()") )
	)
    (-> "Matrix factorization"
 	("cholesky" (insert-string "cholesky()") )
 	("lu" (insert-string "lu()") )
 	("qr" (insert-string "qr()") )
 	("svd" (insert-string "svd()") )
	)
    (-> "Quadratic forms"
 	("axq" (insert-string "axq()") )
 	("gauss" (insert-string "gauss()") )
 	("qxa" (insert-string "qxa()") )
	)
    (-> "Gauss/Jordan pivot"
 	("basis" (insert-string "basis()") )
 	("Basis intersection" (insert-string "ibasis()") )
 	("ker" (insert-string "ker()") )
 	("image" (insert-string "image()") )
 	("linsolve" (insert-string "linsolve()") )
 	("rref" (insert-string "rref()") )
	)
    (-> "Isometries"
 	("isom" (insert-string "isom()") )
 	("mkisom" (insert-string "mkisom()") )
	)
    )
  )

(set! texmacs-menu (menu-merge texmacs-menu '((=> "Cas" (link cas-menu)))))
