diff options
author | Andrew Yu <andrew@andrewyu.org> | 2023-06-01 20:33:09 +0800 |
---|---|---|
committer | Automatic Merge <andrew+automerge@andrewyu.org> | 2023-07-15 00:30:48 +0800 |
commit | dccf627c458ad24f4f14216b765bc02adba8bc96 (patch) | |
tree | af207ff09ba496bff0ef2567df7cf5a317df8f68 /article/texmacs-maxima-integral.html | |
parent | 26109f0b1cb2a3d8412e3f7a366277c47d65745e (diff) | |
download | www-dccf627c458ad24f4f14216b765bc02adba8bc96.tar.gz |
TeXmacs article
Diffstat (limited to 'article/texmacs-maxima-integral.html')
-rw-r--r-- | article/texmacs-maxima-integral.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/article/texmacs-maxima-integral.html b/article/texmacs-maxima-integral.html new file mode 100644 index 0000000..cd86e3f --- /dev/null +++ b/article/texmacs-maxima-integral.html @@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> + <head> + <title>TeXmacs Maxima Integrals</title> + <link rel="stylesheet" href="/plain.css" /> + <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> + <script id="MathJax-script" async src="https://static.andrewyu.org/mathjax/tex-svg.js"></script> + <meta charset="utf-8" /> + </head> + <body> + <h1>TeXmacs Maxima Integrals</h1> + <p>Article ID: 18</p> + <p> + I've been trying to get <a href="https://www.texmacs.org/">TeXmacs</a> with its <a href="https://maxima.sourceforge.io/">Maxima</a> <a href="https://www.texmacs.org/tmweb/documents/tutorials/maxima-tutorial/maxima-tutorial.en.html">plugin</a> to work. + </p> + <p> + Enabling the ``mathematical input'' mode in its interactive sessions I can use TeXmacs as a nice computer algebra system. However, an issue arises when I use integration. + </p> + <p> + If I enter \(\displaystyle\int x\,\mathrm{d}\,x\) with ``<code>\int <enter>x d<tab><tab>x</code>'' (spaces here are actually typed in while the ``<code><tab></code>''s and ``<code><enter></code>''s are their respective keys), I get this idiosyncratic error: + </p> + <pre>incorrect syntax: 1 is not an infix operator +integrate( x 1, + ^</pre> + <p> + This seems to be a bug when TeXmacs is translating things into Maxima. Just replace the ``<code><tab></code>'' between the integrand and the ``\(\mathrm{d}\)'' with a multiplication operator entered by ``<code>*</code>''. For example, <code>\int <enter>x*d<tab><tab>x</code> yields the correct result of \(\displaystyle\frac{x^2}{2}\) rather than the nonsensical error. + </p> + <p> + For reference, the source code of a demonstration document is included below in Scheme and XML-like (?) formats. + </p> + <pre>(document (TeXmacs "2.1.1") (style (tuple "generic" "maxima")) (body (document (session "maxima" "default" (document (unfolded-io-math (document (with "color" "red" (concat "(" (with "math-font-family" "rm" "%i") "8) "))) (document (concat (big "int") " x <mathd> x")) (document "" "incorrect syntax: 1 is not an infix operator" "integrate( x 1," " ^")) (unfolded-io-math (document (with "color" "red" (concat "(" (with "math-font-family" "rm" "%i") "8) "))) (document (concat (big "int") "x*<mathd> x")) (document "" (concat " " (math (with "math-display" "true" (concat (text (with "font-family" "tt" "color" "red" (concat "(" (with "math-font-family" "rm" "%o8") ") "))) (frac (concat "x" (rsup "2")) "2"))))))))))) (initial (collection (associate "page-medium" "paper") (associate "preamble" "true") (associate "prog-scripts" "maxima"))))</pre> + <pre><TeXmacs|2.1.1> + +<style|<tuple|generic|maxima>> + +<\body> + <\session|maxima|default> + <\unfolded-io-math> + <with|color|red|(<with|math-font-family|rm|%i>8) > + <|unfolded-io-math> + <big|int> x \<mathd\> x + <|unfolded-io-math> + \; + + incorrect syntax: 1 is not an infix operator + + integrate( x 1, + + \ \ \ \ \ \ \ \ \ \ \ \ \ ^ + </unfolded-io-math> + + <\unfolded-io-math> + <with|color|red|(<with|math-font-family|rm|%i>8) > + <|unfolded-io-math> + <big|int>x*\<mathd\> x + <|unfolded-io-math> + \; + + \ <math|<with|math-display|true|<text|<with|font-family|tt|color|red|(<with|math-font-family|rm|%o8>) + >><frac|x<rsup|2>|2>>> + </unfolded-io-math> + </session> +</body> + +<\initial> + <\collection> + <associate|page-medium|paper> + <associate|preamble|false> + <associate|prog-scripts|maxima> + </collection> +</initial></pre> + <div id="footer"> + <hr /> + <p><a href="/">Andrew Yu's Website</a></p> + </div> + </body> +</html> |