Macaulay 2, M2 for short, currently is mainly developed for Linux distros. For most Windows distro-s, use Cygwin to get Linux bash and through that, M2 command to start Macaulay2. However, Windows 10 for developers and insider builds come with a new feature, "Linux subsystem for Windows".
See the following sections for the steps for installation of, firstly, the Linux subsystem then M2, followed by installing and setting up an X server with emacs coupled with M2.
Follow instructions: https://msdn.microsoft.com/en-us/commandline/wsl/install_guide
Hit Start then type "bash", or open command prompt and type "bash".
Follow instructions: https://macaulay2.com/Downloads/GNU-Linux/Ubuntu/index.html Tip: use the command in bash "lsb_release -a" to retrieve your Ubuntu's version.
Secondly, get X server running with emacs GUI
- Install Xming: https://sourceforge.net/projects/xming/
bash:
export DISPLAY=:0
bash:
sudo apt-get install emacs
emacs # to see if it brings up GUI
- Run Macaulay2: bash> M2
- Run the following in M2: setupEmacs()
- exit() M2
- bash> emacs
- to run M2 in emacs, hit F12
- create new file, type
R = QQ[x,y]
f = symmetricPower(2,vars R)
- select line 1 or line 2, hit F11 and see what the M2 buffer does inside emacs!
To install TeXmacs, run the following commands in bash:
#cd
#wget http://mirrors.kernel.org/ubuntu/pool/universe/t/texmacs-extra-fonts/texmacs-extra-fonts_0.2_all.deb
#wget http://mirrors.kernel.org/ubuntu/pool/universe/t/texmacs/texmacs-common_1.0.7.18-1_all.deb
#wget http://mirrors.kernel.org/ubuntu/pool/universe/t/texmacs/texmacs_1.0.7.18-1_amd64.deb
#sudo dpkg -i texmacs*.deb
#sudo apt-get install -f
!!! Follow instructions here in stead: https://software.opensuse.org/download.html?project=home:slowphil:texmacs-devel&package=texmacs
- To run M2 directly from windows cmd, passing all commandline arguments, create a file 'M2.bat' with the following content:
@echo off
bash -l -c "M2 -q %*"
(Make sure it's accessible in windows PATH.)
- To run TeXmacs directly from windows cmd, as previously create a file 'texmacs.bat', with the following content:
@echo off
bash -l -c "export DISPLAY=:0 && texmacs %*"
(Make sure Xming is up and running!)
- https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/_editing_sp__Macaulay2_spcode_spwith_spemacs.html
- https://macaulay2.com/doc/Macaulay2/share/doc/Macaulay2/Macaulay2Doc/html/_using_sp__Macaulay2_spwith_spemacs.html
- https://www.howtogeek.com/261575/how-to-run-graphical-linux-desktop-applications-from-windows-10s-bash-shell/
- https://askubuntu.com/questions/694304/texmacs-not-available-ubuntu-15-10
Thank you, I updated the link according to the new domain (macaulay2.com), and two other links to sources below.
If you think this guide needs an improvement, feel free to suggest one or provide a fork to it.