You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doug Torrance edited this page Jun 5, 2023
·
2 revisions
Org Mode is an Emacs major mode with many features, including authoring computational notebooks.
To add Macaulay2 support to Org Mode, first install the Emacs package ob-M2 and make sure that the cons cell (M2 . t) is an element of the list org-babel-load-languages. See the README for instructions.
Then open a file in Emacs with the .org file extension and add a source code block (optionally using C-cC-, followed by s):
#+BEGIN_SRC M2
R = QQ[x, y, z, w]
monomialCurveIdeal(R, {1, 2, 3})
#+END_SRC
Then type C-cC-c. This will run the code, giving you the result:
#+RESULTS:
: 22
: ideal (z - y*w, y*z - x*w, y - x*z)