Terrence Tao recommends that all students and mathematicians write down everything they’ve done. For professional mathematicians, this presumbly includes insights into problems they are working on, and perhaps references for interesting things found in papers. Students should write down lecture notes and solutions to exercises. This raises the question of where to write it down and how to organize it all, and that’s where having a master notebook comes in.
A LaTeX master notebook is a directory tree of LaTeX source files, all feeding in to a single “
root.tex” file which, when compiled, theoretically produces a pdf with all the mathematics you’ve ever written (which according to Tao, should be all the mathematics you’ve ever done). I’ll answer the first objection right here: yes, that would take an age to compile, and that’s why you don’t actually do this. The notebook is organized so that entire chapters can easily be added and removed by commenting out a single line.
Advantages to using a master notebook
- The master notebook contains a journal, with sections for each day. This is very useful, as the chronological structure provides a simple way to organize your notes that doesn’t require any thought or planning. Once you realize you have several journal entries about a similar theme, you can easily create a specialized chapter in the notebook and transfer those entries to organize them more efficiently. Personally, I also use my journal section for homework assignments, since these tend to be specific to a particular time.
- All your notes operate from a single preamble and bibliography file. There are advantages and disadvantages to this. The most obvious disadvantage is you will often be loading packages that are unnecessary for your current project, leading to some compiler overhead. On the other hand, I just love the convenience of being able to start writing without having to worry about what to include in the preamble.
- You can (and should) make your master notebook folder into a git repository so that you have version control. By the way, if you’re a student, you can get a bunch of free github benefits, including private github repositories. I keep a copy of my master notebook in a private github repository.
- Use hyperlinks to connect your notebook entries together. This is easy with the
- It’s easy to output different sections that you need as appropriate. For example, when it comes to submitting my homework, I have one file called “
homeworktemp.tex“. It’s an
articleclass file that’s not part of the master notebook, but just by changing one line, I can swap one homework out for another and compile it.
- Do you have lots of handwritten notes too? You can scan them and use
\includepdfto drop them into appropriate places in your master notebook. This is a great way to keep handwritten notes organized and accessible.
- You can synchonize a version of the output file of your master notebook with your mobile device. Now you have all your mathematical notes in your pocket.
- It’s pretty satisfying to track how much you’ve been writing by compiling everything in the directory at once and looking at the total page count of the pdf you produce.
How to get started with a master notebook
This was something I’d wanted to try for a little while but never found the time to get up and running. However, on Reddit I stumbled on this person’s implementation of the same concept, which he or she calls their logbook. I found it very easy to clone this repo and tweak it to my needs.
Here’s how to get it up and running
- Download or clone the github repo, and run the bash script to create the journal files. If you’re on Windows you’ll need a way to run bash scripts. This script creates journal files and directories for every for the next few years.
- Customize the directory structure to suit your needs. I have directories for Homework, Exercises, Projects, and notes on specific topics, all containng sub-directories for different classes and subjects. Of course, you should customize the
\inputcommands in Riboch’s template to match your directory structure and your needs.
- Customize the
DocumentSetup.texfiles to your liking, and move your
.bibfiles into the Citations folder.
- Run your compiler and biber a bunch of times and fix any mistakes you made while setting up.
Finally some miscelleneous tips I’ve found helpful when using a master notebook. Use a LaTeX editor that’s good at working with multi-file projects, for example allowing you to easily search for things across multiple files, and that will complete references spread across multiple files. On a similar theme, come up with a logical naming system for labels within your notebook early on, to make it easier to cross-reference different parts of the notebook. Last of all, make sure your notebook is backed up in several places!