reddit / emacs

How would you go about using Org Mode for Math Notes?

Saturated-Memes · 2022-12-28 18:55
So for my previous year, I used LibreOffice Writer which sufficed well enough for using symbols as well as sub and super script but since then I’ve discovered my dearest Doom Emacs and kinda fell in love with Org Mode; y’know how the story goes. My current problem mostly is I’d really love to use Org Mode for my Math Notes but I don’t know how to insert symbols or structure things like larger division statements, or anything with how to insert functions. I’ve heard things about LaTeX being the optimal way to get this done; seemingly Emacs should have some integration with this but I don’t entirely know where to start with that and I don’t actually know a thing about LaTeX so I was wondering if anyone could offer me guidance on how to achieve the optimal note-taking Emacs setup, and just how you lovely lads would go about this?
judasblue · 2022-12-28 19:37
[https://gitlab.com/matsievskiysv/math-preview](https://gitlab.com/matsievskiysv/math-preview) gives you inline for math stuff. You can use mathjax or tex and some other stuff.
Saturated-Memes · 2022-12-28 19:38
Oh holy shit that looks really nice man thanks I’ll try that out later
doolio_ · 2022-12-28 20:56
[Here you go](https://karthinks.com/software/latex-input-for-impatient-scholars/).
Crash_Test_Mummy · 2022-12-28 21:37
One thing to note about Emacs and Org mode is how extensible and flexible it is. That is, you might want to state what you want out of your math notes then see how you may implement those features in Emacs. Here are some examples, &#x200B; 1. You may wish to have a digitized version of paper and pencil notes. This can be done in two main ways. 1. Writing pure LateX as a \*.tex file and exporting to PDF when you want to. 2. Writing inline LaTeX in an \*.org file (I, like /u/doolio_, recommend Karthinks blog post about this along with the [fragtog package](https://github.com/io12/org-fragtog).) <-- This is the straight answer you were looking for. Because this was already answered I felt like giving some extra context to why Org+LaTeX can be a good match for math notes in the following sections. 2. Have an interactive environment using Org Source blocks. Again this is done in multiple ways. 1. One I use a lot is the python "sympy" package for LaTeX output. This gives me the ability to write differential equations and matrix algebra statements, export to LaTeX via the [pretty printing](https://docs.sympy.org/latest/tutorials/intro-tutorial/printing.html) modules. I can then use the matrices and equations I wrote down symbolically to solve for null spaces and solutions without effort. You can use the full power of Python in this environment (simulations, random matrix problems, efficient multiplication, determinant calculation, etc) all while outputting in a nice format for notes. You don't need Python; Sage, Maxima, GNU Calc works for this purpose. 2. I also like to formalize proofs. The LEAN theorem prover can be used in Emacs and you may have Emacs verify statements you make on the fly. LEAN can also finish proofs and verify by brute force (by dec\_trivial). 3. Use Emacs as a Spaced Repetition System (SRS). Using a package like [Org Drill](https://orgmode.org/worg/org-contrib/org-drill.html) or Org-FC you may turn headings into flash cards (with special features like clozes or embedded elisp). This is invaluable to me, especially when I was studying for qualification exams for my PhD. I wanted to remember a lot of theorems and examples, and studying flashcards every morning was how I kept track of a lot of the fundamentals. 4. Turn your notes atomic (using [Zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten) method) using [Org Roam](https://www.orgroam.com/). This is a different system of note taking implemented in Emacs and Org mode. It focuses on making small notes and linking them together. This can be thought of as a mind map and you can actually see the full mind map using [Org Roam UI](https://github.com/org-roam/org-roam-ui) in your browser. 5. Share your notes with your friends, students, professors, etc, by turning your notes into a static website using [Org-Export](https://orgmode.org/manual/Exporting.html). &#x200B; Emacs is awesome. What I outlined here are just the ways I use Emacs, I'm sure other people have really nice workflows too. Give your note taking system some thought, Emacs will bend itself to be the best tool for the job.
acadian_cajun · 2022-12-29 00:00
Positive note about org-drill: if you have Latex in your card, org-drill automatically renders the Latex.
algalgal · 2022-12-29 17:30
Do you prefer this to the auctex package?
wakatara · 2022-12-30 11:22
Seconded. It's what I use. It's really nice (tho recently had a problem with it working in emacs 29 and with nano emacs. :-/ ). Correction: nano issue seems to be fixed. Working.
wakatara · 2022-12-30 11:45
Personally, I am more often writing formulas /in/ notes for lectures and books rather than birthing full-fledged latex documents (so far), so the MathJax rendering works great for me and what I need to do in astro and physics. I might change my mind as my needs become vastly more sophisticated (looking at [https://karthinks.com/software/latex-input-for-impatient-scholars/](https://karthinks.com/software/latex-input-for-impatient-scholars/) below makes me feel like I need to level up or something... =\] ).