This script looks for Markdown files in a specified directory, and converts a normal LaTeX environment:
$$
...
$$
to an align environment:
$$\begin{align}
...
\end{align}$$
Note that you can change 'align' on lines 25 and 28 to another type of environment.
- This will overwrite the file contents, so make a backup copy of your files before you run it
- Before you run the script, open it in a text editor (i.e. Notepad) and change line 3 to your target folder
- This won't touch files in subdirectories. You will have to change line 3 again and re-run the program for any notes in other directories or subdirectories