diff --git a/org-contrib/babel/languages/ob-doc-maxima.org b/org-contrib/babel/languages/ob-doc-maxima.org index 810c9ef4..eb760eff 100644 --- a/org-contrib/babel/languages/ob-doc-maxima.org +++ b/org-contrib/babel/languages/ob-doc-maxima.org @@ -111,7 +111,9 @@ powers of 12, where the powers are passed with a variable. print(12^x); #+end_src -#+results: test-maxima +Which produces the result: + +#+RESULTS: test-maxima : 26.06280316745402 ** Solver @@ -137,6 +139,14 @@ Of course, =maxima= is more than a calculator. print(solution); #+end_src +Which produces the result: + +#+RESULTS: solve-maxima +: solve: solution: +: x = - 4 +: x = 4 +: [%t1, %t2] + ** 3D plots With =gnuplot= installed (4.0 or higher), 3D graphics are possible. This example is from [[http://maxima.sourceforge.net/maxima-gnuplot.html][a tutorial on the maxima/gnuplot interface]]. @@ -145,7 +155,7 @@ This example is from [[http://maxima.sourceforge.net/maxima-gnuplot.html][a tuto ,#+name: 3d-maxima ,#+header: :file images/maxima-3d.png ,#+header: :exports results -,#+header: :results graphics +,#+header: :results file ,#+begin_src maxima programmode: false; plot3d(atan(-x^2+y^3/4),[x,-4,4],[y,-4,4],[grid,50,50],[gnuplot_pm3d,true]); @@ -154,15 +164,25 @@ This example is from [[http://maxima.sourceforge.net/maxima-gnuplot.html][a tuto #+name: 3d-maxima #+header: :file images/maxima-3d.png -#+header: :results graphics #+header: :exports results +#+header: :results file #+begin_src maxima programmode: false; plot3d(atan(-x^2+y^3/4),[x,-4,4],[y,-4,4],[grid,50,50],[gnuplot_pm3d,true]); #+end_src -#+results: 3d-maxima +Which produces the code: + +#+begin_example +,#+RESULTS: 3d-maxima [[file:images/maxima-3d.png]] +#+end_example + +and the image: + +#+RESULTS: 3d-maxima +[[https://orgmode.org/worg/org-contrib/babel/languages/images/maxima-3d.png]] + ** Inline Display of Maxima LaTeX Output [[http://maxima.sourceforge.net/][Maxima]] code can be evaluated and displayed inline in Org mode @@ -170,19 +190,28 @@ This example is from [[http://maxima.sourceforge.net/maxima-gnuplot.html][a tuto example. #+begin_example -,#+NAME: solve-maxima -,#+HEADER: :exports none +,#+NAME: tex-maxima +,#+HEADER: :exports results ,#+BEGIN_SRC maxima :results raw tex(exp(-x)/x); ,#+END_SRC #+end_example -#+NAME: solve-maxima +#+NAME: tex-maxima #+HEADER: :exports results #+BEGIN_SRC maxima :results raw tex(exp(-x)/x); #+END_SRC +Which produces the code: +#+begin_example +,#+RESULTS: tex-maxima +$${{e^ {- x }}\over{x}}$$ +#+end_example +that is rendered as: +#+RESULTS: tex-maxima +$${{e^ {- x }}\over{x}}$$ + *** Toggle inline display of latex code Latex code in org mode can be displayed inline by 'C-c C-x C-l'. To remove the inline display 'C-c C-c' is used. This is