reddit / emacs

Questions about note-taking in Emacs with AUCTeX and Org-mode/Org-roam

SilkyRock · 2022-06-07 22:42
Parts of this post probably shouldn't be a topic of this sub as they're concerned with note-taking in general so I'm sorry in advance. Feel free to refer me to other subs. I study physics and take a fair amount of various notes, but after discovering [Org-roam](https://www.orgroam.com/) and [the Zettelkasten method](https://zettelkasten.de/introduction/), I have been thinking that my workflow is very rigid and just sub-par in general. Some of my "strategies" of how I approach note-taking might sound obviously flawed so any hints on that front are very welcome. I have been using AUCTeX to write up my notes in LaTeX for some time now. My workflow generally consists of reading various textbooks (and research papers) and creating a LaTeX "project" (a modular document) for each textbook, which sounds kind of awful, I know. But this way I can take notes on said textbook, solve problems and write up their solutions. I also have a couple of custom `.tex` files (preambles, files with custom macros, maybe even some custom classes in the near future, etc.) which I reuse between "projects" so as to keep my workflow and definitions consistent. With that said, I find this strategy rather lacking for one main reason: it would be a hassle to navigate these "projects" as their number grows with time, since they are bound to their respective textbooks, and I think this is the crux of my overall strategy. One solution would be to create bigger "projects" based on subject (mathematics, physics, etc.), but I guess there are some problems with this approach as well, as some topics cannot be easily categorized into a single subject. In the end, I take notes to learn, but I would also like to have the ability to navigate, edit and expand them as needed. In essence, I would like to build a "second brain". And that's where Org-roam comes in. It let's you build a personal knowledge system using plain `.org` files, which I find very appealing. And since it is possible to export `.org` files to `.tex` files, I am thinking of making a switch. But there are a couple of things that need to be addressed: 1. Books (and thus `.tex` files) are linear by nature while Org-roam offers a "network of concepts" experience. It would be easy to export big `.tex` files to PDF, but what about `.org` files that are used by Org-roam, also known as nodes? Last time I tried to do a PDF export of a single `.org` node, which has references to other nodes, I got a `user-error` about "inability to resolve links", which makes sense since those links are just IDs given by Org-roam to different nodes. In the end, I would like to have the ability to export my notes to PDF. 2. Customization. With AUCTeX, this is straightforward: you can create various custom files and `input`/`include` them into your LaTeX "project". But what about using custom LaTeX preambles, macros and classes in Org-mode? I researched this a bit and I think that I haven't found an easy way to, for instance, use a custom `preamble.tex` file as a preamble when exporting `.org` to PDF. My main question is this: given my previous considerations, should I just stick to AUCTeX for the more technical content (and possibly use Org for other things), or is it possible to achieve everything with Org + Org-roam? I don't mind using AUCTeX when writing LaTeX. In fact, I sometimes actually enjoy tinkering with `.tex` files. What I am on the fence about the most is: 1. The "linearity" of LaTeX (the "bad" in the long-term, I think) versus the "network-ality?" (the "good") of Org-roam. 2. Customizability of my notes. Thanks for the help!
OutsideArmadillo791 · 2022-06-08 00:16
Try update org id location to solve the link error.
mclearc · 2022-06-08 00:45
In terms of using tex in your notes you should take a look at this [blog post](https://karthinks.com/software/fast-latex-previews-in-org-mode/) and related package. Seems like it should serve you well. In terms of searching through notes you might take a look at a package I'm developing that uses [consult](https://github.com/minad/consult) to navigate through directories of files (you can set any directory, and multiple directories) as well as org-roam nodes -- it's called (not very creatively) [consult-notes](https://github.com/mclear-tools/consult-notes). Feedback is welcome.
mclearc · 2022-06-08 00:50
Oh -- and as for customization, I wrote a [blog post](https://www.colinmclear.net/posts/teaching-notes/) about this and have the preambles on [github](https://github.com/mclearc/org-latex-classes).
Relative_Tap5915 · 2022-06-08 02:55
Actually I faced the same issue some time ago. My thought now is that if the content is more “equation based”, I use auctex; anything else I use org and org roam. To manage my notes, I use a big ~/notes/ folder, which is subdivided into math, physics, computing, etc., and a main category like physics is then divided into quantum mechanics.tex, statistical mechanics.tex, etc., each has its own folder. To find some concept usually I just need to go to the tex file and do a swiper command (one enhanced isearch); if I forget where a thing located, I do regrep.
SilkyRock · 2022-06-09 09:00
While thinking about my setup I kind of arrived at a similar solution as yours. Would you say that you are happy with it? Any negatives aspects? Just curious. Since I'm familiar with LaTeX, I wouldn't really mind having this kind of a setup.
SilkyRock · 2022-06-09 09:45
So in essence, you can import custom `.tex` files, but these imports are pre-defined in a custom class in `org-latex-classes`. At first, I was thinking about something more dynamical, like importing a particular `.tex` file for some notes while excluding it for others, but keeping the overall appearance of all of my notes the same. For example, I have notes on different subjects, so I'm on the fence about using a single "master" preamble for all them, as it would just grow over time, using more and more packages, which is not optimal from the performance point of view. It could maybe even introduce some errors in the long run? But maybe I just have a wrong picture of this. Also, what about using a custom `.tex` file just for various custom-defined macros? Should I just have a "master" macro file, or should I split based on, for instance, subject matter?
SilkyRock · 2022-06-09 12:22
Thanks! I found some info on this, will definitely try it.
Relative_Tap5915 · 2022-06-10 00:58
Can’t complain. Auctex is simply better at editing macros and equations; while org-babel is well suited for taking notes of code snippets. Org offers better structural editing for sure, but auctex with outline mode is good enough. As for org roam, frankly I don’t see the selling point of making a network, because I feel writing some cross-reference messages is just fine.
mclearc · 2022-06-10 05:10
> I have notes on different subjects, so I'm on the fence about using a > single "master" preamble for all them, as it would just grow over time Well -- one nice thing about the system I suggest above is that you can change it as you please. You can have as many or as few as you like. You can also call different templates with different functions. I'll use the same material as a lecture, as notes, and as a handout, but they will all use different templates and different parts will be presented or emphasized. I will say that I used to write project-based notes in roughly a similar manner as you outline above (though using more org than tex) but I found it very difficult to keep these notes accessible. They all became "siloed" in their respective projects. So moving to something like a central note repo that uses tags or subdirectories for sorting is much better. It's easy to link these to a project file in a particular project directory (mine tend to hold only todos and scrap stuff).