Skip to content

Instantly share code, notes, and snippets.

eivan /
Created May 2, 2019
Set up bash to export proper values for vcxserv x server (I'm using it for WSL)
echo "export DISPLAY=:0" >> ~/.bashrc
echo "export LIBGL_ALWAYS_INDIRECT=1" >> ~/.bashrc
eivan /
Last active May 26, 2020
Macaulay2 on Windows 10 with X server and Emacs GUI

Macaulay2 for 'Linux subsystem for Windows', with GUI

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.

Get 'bash' for Windows and M2:

1.) Get Ubuntu "bash" in cmd Install "Linux subsystem for Windows" with ubuntu.

Follow instructions:

eivan / accented_2_tex.tex
Last active Dec 3, 2019
Replacing accented characters in LaTeX back and forth using Regular Expressions
View accented_2_tex.tex
% replacing accented characters using regexp-s
% can be used in Notepad++'s replace function for example
% %%%%%%%%%%%%%%%%%%%%%%% %
% accented letters -> tex %
% %%%%%%%%%%%%%%%%%%%%%%% %
% pattern:
% replace: