Taking notes in mathematics lectures using LaTeX and Vim (2019)
castel.dev
castel.dev
I do think proper typesetting is a great idea afterwards, during its own dedicated phase; it is like the report-building stage of the detective work, where findings are revisited and structured so the detective can reflect on the case, compare it with others and have a reference for the future.
For anyone interested in my very opinionated patterns for latex typesetting in Vim, I have a github page with vim templates [0] and some demos at reddit [1].
[0] https://github.com/ykonstant1/dotfiles
[1] https://www.reddit.com/r/unixporn/comments/jtjol5/cinnamon_l...
This exercise inspired me to build my own learning platform from scratch that generates a latex-generated books at the end of course completion. The idea is to have interactive conversations while learning and at the end the personalized book is generated for you. You can see an example of personalized Python book here: https://tinyurl.com/3xfsunj9
You can see that the conversations between learner and Primer highlighted as red sprinkled throughout the book.
The learner doesn't need to write any equations or code examples as it is generated for them. They can further customize the notebook by adding notes or questions using prompts.[1]
Right now there are two free courses on the platform[2], and 5 more would be added by the end of the month. But the goal is create self-paced computer science degree.
[1]: https://primerlabs.io/blog/introducing-primer/#the-problem-o...
And certainly, it'd be a shame to be busy "live-latexing" notes for your class, but I think in the vast majority of classes, for someone really adept at it, it might work.
Not to mention that it's far easier to collaborate with LaTeX notes than paper. For example, we split the courses between friends so only one took LaTeX notes, the rest paid attention or took quick annotations on paper to later complete the notes.
What about diagrams?
For diagrams I had several options. Simple ones were easy enough to do with Tikz (maybe I didn't get it perfectly on the first try but good enough to fix later), diagrams that had a repeated structure were done with commands, and then for the ones that I couldn't do on the fly I just either wrote the description in text and did them later, or did a drawing in a notebook/phone/took a picture and then replicated it later with Tikz. I could also take diagrams from the web and paste the image.
If you want examples, we actually had all our note PDFs in a shared Dropbox folder [1] (in Spanish, though). Not all of them are mine, but there are a good bunch of them where I'm the main author. I'm specially proud of some notes, like the differential geometry course [2] or topology [3] with a good amount of diagrams (for a math course).
1: https://www.dropbox.com/sh/kbymf37cykz77ha/AADuRd3CoU6UUCZMt...
2: https://www.dropbox.com/sh/kbymf37cykz77ha/AAA1SKV3JLkVPX2nc...
3: https://www.dropbox.com/sh/kbymf37cykz77ha/AABNb9rTsaRzc-3xP...
When I got to college, I started requesting all the materials that students normally get in LaTeX. PDFs generated with pdflatex and similar aren't screen reader accessible, but I could read the LaTeX source code just fine.
Obviously, what I write for myself isn't pure, compilable LaTeX, I usually omit the dollar signs, write things like 2^32 instead of 2^{32} etc.
By the way, the linked post was almost unreadable to screen readers, the soft dash characters inserted between every syllable made my screen reader say every syllable separately, which breaks the pronunciation rules.
What CMS or editor outputs that? It's insane. I tried copying the text into a text editor and it displayed all the dashes: "math-e-mat-ics".
I am very confused, what's up with this?
https://www.unicode.org/charts/PDF/U0080.pdf
I know of it, but apparently I've never previously pasted text using it into my text editor, because it's displayed there as a hyphen (though it is still U+00AD).
I'm wondering what CMS/editor outputs so many SHY characters.
Sorry you had to pave the way.
> PDFs generated with pdflatex and similar aren't screen reader accessible, but I could read the LaTeX source code just fine.
That's... sad. Is Word any better?
It's something I think we're all used to, and will likely always be the case, because non-elderly blind people are such a tiny minority (perhaps we're even over-represented here on HN).
Perhaps XeTeX is better?
(I am not intimately familiar with what pdf(la)tex does, but this is how TeX works, and I've seen those PDFs, esp with eg. Cyrillic, which on select show up garbled text)
This however is and was for end-product stuff: my own personal collection of condensed notes, assignments that needed to be typed, and so on (I also use ultisnips for coding). I studied mathematics as a undergrad (I have a first class degree in Mathematics from a UK university) and I hand-wrote my lectures, and I know many mathematicians that are frankly much better than I am who find computers frankly difficult and avoided LaTeX as long as they possibly could.
What matters (if you are studying mathematics) is doing mathematics (exercises, experimentation, understanding proofs etc). There is no substitute. This is a nice to have, but will not make you a better mathematician. If you want to know how to be a good student, IMO this is a nice guide: https://www.maths.ox.ac.uk/system/files/attachments/study_pu...
I also use a markdown + inline latex setup rather than tex from scratch.
For non-math classes, typing notes worked well.
Indeed, I think the same and am on the very same boat.
I hadn't heard of you, but really respect what you're doing. I hope I didn't cause offence.
Heavens, no. Enjoy the day.
Newton may have stood on the shoulders of giants, but HN enables us to casually rub elbows with them.
https://github.com/dandavison/xenops
It creates plain LaTeX files that can be shared with non-Emacs users, but also works with org-mode. Math preview images are SVG by default and are crisp on high res / retina screens.
(Do any of the features work in the terminal?)
The benefit of having typed notes at least for me come from being able to search, having a good record of my own understanding of a course and also not having to rely on keeping handwritten notes safe. They also look pretty which is a bonus for studying from them.
Examples:
- Analysis I (which have been edited): https://adamkelly.me/files/ia-analysis-i/analysis-i.pdf
- Graph Theory (not edited but diagrams added): https://adamkelly.me/files/ii-graph-theory/graph-theory.pdf
As a side note, one other thing I do is write short 'handouts' on topics that I think I have something to say about. For example https://adamkelly.me/files/handouts/direct-products/direct-p....
Meanwhile I use Onenote. I don't have to worry about keeping notes safe, or the stress of trying to type at warpspeed. I would go with a Remarkable tablet but now with subscription pricing it's a non starter.
Those beautiful graphs now… I ended up using secondary programs to gen images (pdf or whatever) of graphs and such for latex to bring in the usual way. Not as good!
I live-LaTeXed notes for a couple of years in undergrad but eventually went back to pen + paper (approximately all my assignments continued to be typeset, though).
For speed with, e.g. matrices like you say, but also more specialized course specific notation, could you build a set of quick functions for the topic of the day to aid note taking?
If set up your environment just so, you can repurpose really simple commands like the slash in “\this” to do some common but annoying thing like bold upright lettering or underbars or something. (I actually need to go look at latex to be sure what all you could make maximally parsimonious… it’s been a while and I mostly copy and paste my old commands around. Anyway, you probably already do this kind of thing.
After all, if the lecture is just the textbook, why bother going at that point? :)
Completely disagree here. You need to find the setup that works for you, and for a lot of people that setup will be taking notes in a computer.
And I know this because in my class me and a few friends took computer notes, and we did really well. In my personal case, my handwriting is terrible and gets worse by the hour. By the fourth lecture of the day, my paper notes were an incomprehensible mess. Reformatting, organizing and sorting those notes took quite some time and then searching or referencing other pages was impossible.
When taking LaTeX notes, I could write at the same speed as when I was writing by hand, got less tiring, could pay more attention to the lecture (I can just go on and write things on the computer without looking and worry about them later, but I can't handwrite without looking).
Then later I could go back, rewrite the parts that needed rewriting, reference the parts that needed referencing, put graphs, paste links, whatever. And it was really helpful to have a document where I could iterate and improve the notes as my knowledge and understanding of the contents improved. You know how they say that you don't really understand something until you can explain it? Well, rewriting my notes was my process to understand things. And it would be impossible to have done it if I had to take paper notes.
Also, I could do the exercises on the same document (in an appendix) and quickly reference the theorems, and also work with my friends to correct/review the exercises. Again, impossible to do with paper notes.
1: https://tex.stackexchange.com/questions/110042/entering-unic...
Note that is my own self-answered question and answer, after having difficulty. For completeness' sake all steps involved in adding new symbols to the keyboard - desktop agnostic - are included in that question.
How I'm able to take notes in mathematics lectures using LaTeX and Vim - https://news.ycombinator.com/item?id=19448678 - March 2019 (221 comments)
How I'm able to take notes in mathematics lectures using LaTeX and Vim - https://news.ycombinator.com/item?id=19440652 - March 2019 (6 comments)
I just think to my cobbled-together vim setup which both had a long startup and was riddled with idiosyncrasies (both I'm sure caused by my own misconfiguration).
I since have migrated to spacemacs, thinking that I could let people more competent than I do the brunt of configuration, but still I have managed to make the startup long and the experience janky.
I guess I should either spend more or less time configuring my setups...
I like leaving the configuration to someone who I know has a better understanding of all the offerings. I realise this may not appeal to someone who has strong opinions or similar level of understanding as these maintainers however.
I might mention, if you hadn't already been aware of it, that SpaceVim exists as well. I really like the concept of layers, the bundling of packages for different features for basic/simple configuration (both SpaceVim/Emacs have this).
As an example pertinent to this post, I repeatedly have to dismiss notifications from pdflatex about some sort of incompatibility with my setup. I think it's relative line numbering, I'm not sure though. My attempts to fix it have only resulted in pdf files occasionally opening as raw code.
I will take a look at SpaceVim, though. I've been using vanilla vim for a while to edit personal stuff because I don't want to open spacemacs...
Taking notes in real time, however, is a whole different beast.
I can't imagine live TeXing a graph or tree diagram
One of my professors told me that the best way to do notes was write down normal quick ones in class, but then at home, rewrite the notes in complete sentences including the stuff you remember from the lecture that you didn't originally write down. He said this was a big help in absorbing and retaining the material. It sounded like a good idea, though I was too disorganized to actually try it.
It was great for sharing and searching notes, but definitely challenging.
Once in a while when a diagram was needed it would be really challenging to do (no stylus or touchscreen back then), and when a new math symbol showed up for the first time it would be a challenge.
In other times it could be useful, like if there’s a lot of matrices being written copy and pasting helps.
Overall, it was a good experience since for later math research I needed to know LaTeX well anyhow. But the flexibility of pen and paper can’t be matched.
Eventually I decided to switch to Vim and LaTeX though (I was pretty new to both). The OP's setup looks much fancier than what I did, I just used pdflatex and mupdf. Diagrams I would draw by hand on paper.
I am grateful to have my notes in a nice clean searchable pdf now 10 years later, but unfortunately my career in software has yet to have me actually do differential equations again.
I have to ask because I miss it so dearly: is there any modern alternative to a 10" netbook like what I had back then? Besides the GPD win that was posted a few days ago. And I don't like the idea of a super expensive tablet with its heavy screen.
What do students take notes on now?
Also a random thought: the netbook had also come with "windows 7 starter edition", which didn't let you change the wallpaper, much to my frustration. They went so far as (I believe) hashing the image, so if you edited it at all then it would show a black screen. [1]
I think that was what got me into Linux, despite years of losing access to wifi every time I updated and lost the Broadcom wifi drivers. My current laptop doesn't even have an ethernet port, I wonder how people get into Linux now.
[1]: The argument of "this laptop is resource constrained so it needs a simpler version of windows" seems weak when they go to such great lengths to enforce it. Maybe it was more about selling it for cheap and expecting some people to upgrade? Imagine paying $60 for windows for a <$150 netbook. (Maybe it was actually $200, I forget)
I'm done with classes as of last year but I just used pen & paper in all my schooling. I would rewrite my notes on a tablet after class though. It's more common to see people using iPads and Surfaces than when I first started.
Was the tablet not a good fit for real time handwriting? Is it a bit slower than pen and paper?
Haha it was fine for real time handwriting, I just did that because it forced me to go through my notes again and I felt like using a tablet may have been more distracting for me and other people.
Also the price since I would almost exclusively use it for traveling.
Surface Pro 3 works great with linux when I used it, but you can't replace anything on it. If you just want to use a laptop you already have this is a good option. https://www.amazon.com/XP-PEN-Graphic-Drawing-Digital-Teachi...
The price is worth it, I think -- I have a friend who I convinced to get one, and lo after his research group saw him using one handful of people bought them as well :)
https://karthinks.com/software/latex-input-for-impatient-sch...
Not my field, but I find it interesting to see how it is possible to optimize one environment for specific tasks.
Joplin is fantastic for creating and organizing references as long as you don't need advanced layouts. When you need them you can very quickly convert MD syntax to html or latex.
On a side note I always wonder who has the time of fine tuning uber-specialized text editor configuration at those levels. Not only that, but also having the burden of maintaining that and the inconvenience of being dependent on a very specific setup. I could see myself doing such an effort only after 4-5 years of daily use and friction.
[1] https://castel.dev/static/cb323a2ec665d98f93f78e13d3972e0e/4...
EDIT: this seems to actually be vanilla vim. vimtex is still great, though!
review, rewrite.
It's not just the math notation. Often there are diagrams, that illustrate, or facilitate mathematical reasoning.