10 ms·
How I'm able to take notes in mathematics lectures using LaTeX and Vim (2019)
- amself 3y agoRIP Gilles Castel.
- ykonstant 3y agoSuch a horrible loss. The rumors say it was depression; I am also suffering from clinical depression, and fortunately got some medical help in time.
- amphitheatre 3y agoGlad you got some medical help. I hope you’re feeling better these days.
- coolThingsFirst 3y agoDid it help?
- ykonstant 3y agoI am alive.
- coolThingsFirst 3y agoAre you happy or each day is a struggle?
- bowsamic 3y agoHelp has such a broad range of meanings here. It can mean anything from achieving what you want to and living a happy life (unlikely) to avoiding killing yourself (likely). Most prognoses for depression look more like "can you cope with feeling like this for the rest of your life?" vs. "we will cure you". The latter is, of course, possible, though generally there is a problem. Many people have chronic depression, and it generally takes a long time and a lot of therapist effort to "cure depression" unless you are lucky, so there aren't really the resources to fix the problem for most people in the world. Usually at best we can learn to cope with it, especially if it has origins in early trauma.
- amphitheatre 3y agoSuch a loss, he was a talented person. I always checked in on his site from time to time to see if there were any updates on his tooling or what he was using it for. RIP
- DrNosferatu 3y agoNot to be confrontational or point fingers to anyone specific, but in general, it would be more helpful that acquaintances, instead of concern/react to the tragedy of the death, would instead concern/react to the tragedy of the preceding depression.
- bowsamic 3y agoWhy, though?
- DrNosferatu 3y agoWhy? To help/encourage depressed people finding quality help - so the worst outcome (suicide) doesn't happen.
- bowsamic 3y agoI don't really understand how that is related to your suggestion. Why would it encourage that?
- DrNosferatu 3y ago...? (Absurdity check: we're both talking of suicide prevention, right?) I really don't know how to best answer you - so I recruited some help: "Catching the early signs of someone struggling—like pulling back from activities or expressing a sense of hopelessness—can be key. It’s about noticing changes and gently encouraging a conversation or professional help." "Sometimes people just don’t know where to start with getting help. If we can proactively share resources, like info on good therapists or support groups with someone in need, it can be a nudge in the right direction." Assuming you believe psychology/psychotherapy has scientific merit, that is.
- blt 3y agoMay he rest in peace. I was excited to see what he did later in life. I don't like equating a person with their professional output, but this post shows a level of creativity and vigor that is extremely rare. I'm sure it was apparent in other aspects of his life. I imagine his friends and family cherished him.
- deleted 3y ago[deleted]
- ykonstant 3y agoI created a similar toolset using UltiSnips and vimtex, which I demonstrated here: https://www.reddit.com/r/unixporn/comments/jtjol5/cinnamon_latex_workflow_in_vim/ https://www.reddit.com/r/unixporn/comments/jtjol5/cinnamon_l... The dotfiles powering the demo (particularly, the UltiSnips folder) are at my github: https://github.com/ykonstant1/dotfiles https://github.com/ykonstant1/dotfiles
- blagie 3y agoI took notes in LaTeX in my college. I didn't need macros or the fancy editor setup. It's not hard. It turned passive learning into active. I didn't have a few of the formatting nuances as pretty as he did (e.g. boxes around theorems), but that's not hard. The key difference between him and me are the figures. It's worth looking at his notes here: https://castel.dev/notes https://castel.dev/notes The figures are beautiful. How?!?!?!? (Footnote due to recent bad experiences to pre-empt stupid answers: "Inkscape" is not an answer. I use Inkscape, and I know how long these things would take me. It's definitely not something I could do anywhere close to real-time. I want to know what conceivable workflow in Inkscape would allow those sorts of figures in even a significant fraction of lecture speed, let alone real-time)
- ilayn 3y agoTikZ and pgfplots
- oa335 3y agoI’m also wondering about how they made the figures, to be that is the most interesting and important bit.
- bilegeek 3y ago>I want to know what conceivable workflow in Inkscape would allow those sorts of figures in even a significant fraction of lecture speed, let alone real-time https://github.com/gillescastel/inkscape-shortcut-manager https://github.com/gillescastel/inkscape-shortcut-manager https://castel.dev/post/lecture-notes-2/ https://castel.dev/post/lecture-notes-2/ I've also done LaTeX for notes (in EMACS), but was never happy with how things looked when doing everything quick. The sheer genius of the setup he made is eye-opening.
- ykonstant 3y agoUsing TikZ and UltiSnips in vim, you can create figures very quickly; the following took me 2-3 minutes to make (I had the datafile beforehand): https://drive.google.com/file/d/1eLe0LdKqPyPdmXel_3DwP9AZcIQ19wF1/view?usp=sharing https://drive.google.com/file/d/1eLe0LdKqPyPdmXel_3DwP9AZcIQ... I don't know about real-time, though; I'd never try to draw figures in real time.
- ayhanfuat 3y agoSomeone created a VS Code version: https://www.reddit.com/r/LaTeX/comments/11fipv1/come_in_if_you_are_using_vscode/ https://www.reddit.com/r/LaTeX/comments/11fipv1/come_in_if_y...
- kataklasm 3y agoI've been using various tools and configs regarding this for years now, with tons of my own modifications to them. These write-ups and corresponding repositories are of great value to the vim/LaTeX community and Gilles' loss is tragic. Rest in peace, you won't be forgotten.
- gtsnexp 3y agoIs there an Emacs port for this?
- mixedmath 3y agoThe biggest speed gain comes from a snippet tool that can interact with a programming language. He uses Ultisnips, which can bw filtered through python. This is probably an equivalent in emacs. Interestingly, this is more or less unusable in neovim because of how slow neovim's python interop is.
- deleted 3y ago[deleted]
- bloopernova 3y agoThere's YASnippet, which could be used in much the same way as the tools that were described. https://github.com/joaotavora/yasnippet https://github.com/joaotavora/yasnippet
- jonrubens 3y agohttps://karthinks.com/software/latex-input-for-impatient-scholars/ https://karthinks.com/software/latex-input-for-impatient-sch... Closest guide I’ve read and used.
- venice_benice 3y agoI am unable to reply to any comments, so I’ll add my reply to blagie as a top-level comment instead: Gilles himself documents his process of using Inkscape here: https://castel.dev/post/lecture-notes-2/ https://castel.dev/post/lecture-notes-2/ As a summary, he uses a custom keyboard shortcut manager¹ which allows him to compos multiple keystrokes (and also saves commonly used styles): > For example, when I press `s` and `f` simultaneously, my shortcut manager will apply a solid stroke and a grey fill to the current selection. When I want the stroke to be thick, I press `s+f+g` together, where `g` stands for thick (as the `t` key is hard to reach). [1]: he makes it available on GitHub: https://github.com/gillescastel/inkscape-shortcut-manager https://github.com/gillescastel/inkscape-shortcut-manager
- lkdfjlkdfjlg 3y agoThis seems like a distraction from the substance. In my experience studying physics, most of the learning happens by yourself trying to solve problems, putting hypothesis to yourself, trying, failing, examining what failed.
- juujian 3y agoYup, there is definitely a lot of value in going fast and breaking things, and then tracking back to figure stuff out. It's overwhelming, but it gets you to a high level much faster. In fast, a linguist I know told me that it's how they do it with language students. Make them feel like they can only just about keep their head over the water.
- nomilk 3y agoPlaying devil's advocate (haven't tried it myself), but couldn't you try to solve the problems in vim/LaTeX (rather than pen/paper)? Presumably when vim/LaTeX are mastered, they're as easy to use (and easier to read back) than pen/paper.
- lkdfjlkdfjlg 3y agoLol you gotta be trolling.
- lanstin 3y agoThey aren’t because latex has non local syntax rules - figuring out why it is saying missing $ inserted instead of showing you the equation is rather damning to the free flow of thought. And when you are solving a problem, your thoughts are likely to be quite wrong, where you think a thing is an X but it is a finitely blah blah blah X’ which is totally different for the thing you want to calculate/prove. I will often generate ten pages of scribbled on paper to come up with one page of LaTeX homework. And the I joyfully crumple up the ten pages and recycle them.
- nomilk 3y agoThanks for explaining - makes a lot of sense. If using vim/LaTex takes away even a small % of attention from the actual math problem it becomes a hindrance relative to pen/paper.
- logifail 3y agoAppreciate this may not be what the HN audience wants to hear, but there is evidence that writing things down helps you remember information better than typing things out on a computer. https://www.newscientist.com/article/2414241-writing-things-down-may-help-you-remember-information-more-than-typing/ https://www.newscientist.com/article/2414241-writing-things-... https://stackoverflow.blog/2022/11/23/why-writing-by-hand-is-still-the-best-way-to-retain-information/ https://stackoverflow.blog/2022/11/23/why-writing-by-hand-is...
- thomastjeffery 3y agoBut is there any evidence on how what OP is doing compares? This is obviously different from "typing things out on a computer".
- NBJack 3y agoI can only speak anecdotally on this, but I personally find the added cognitive load of advanced note taking solutions like this one were often distracting when I hit a tough thing to represent. I would be so focused on figuring out how to encode it that I would miss parts of what's being said.
- lbourdages 3y agoAgreed, I stopped taking notes after 3 weeks in college because I was busy writing stuff and didn't have brain power left to actually try to understand.
- taopai 3y agoI agree with you. It's great to put your notes in latex. But that's just final polishing. It's just a medium. I am not a genius, in fact I am pretty dumb, but I studied with geniuses. The more geniuses they where, the less things they wrote in class. One of them, the extreme case, completed the 5 years Math and Physics combined undergrad IN ONLY 3 YEARS. He just wrote 4 or 6 sentences in a white sheet for class, except when doing calculations, but he didn't do that much in class. Some sentences were facts others were questions. He seemed uninterested but I think he was doing heavy lifting in his head relating what he saw with what he knew. When you asked something to him he used to say "Yes this is not new, it's just a variation, combination or example of this". If I were to do college again I would spend a lot of time reading the texts (more than one for comparing important topics), then go to class to listen and solve doubts and spend time solving problems (interleaving topics) and making active recall with spaced repetition. Only after the exam I will put effort to try to sum up what I learned In a well rounded Latex small book. For sharing and for revising it later on, in case of need.
- taopai 3y agoI tried doing this. It's feasible. But... It didn't worked for my learning. As years pas by I value more paper, pen and books. Physical books. I am not anti tech, I was raised with always evolving digital technology. I read 300 eBooks I had NO WAY to pay for. Latex looks awesome, and you feel proud when you put your notes in this format. But you feel equally proud when you are able to make a page equally beautiful with your hand. I enjoy solving things manually. The best teacher I had in uni gave us handwritten skeleton notes which you had to complete while following the class. Completions used to be examples or demos, or long development steps to reach a solution. This same course I read in a book about learning that this kind of material is the best for cognition. I felt grateful for that man. Despite being great at his field, and be super busy and travel a lot he really was into teaching undergrads and trying to use the right learning tools. The course was heavy, really hard, but it was very rewarding. I am not trying to downsize this article, It inspired me to push my skills. Just giving my experience.
- al_borland 3y agoI always found the best way for me to learn was when professors would allow us to make a cheat sheet. It would force me to sit down, read the information, and re-write it by hand. Once I did that, I didn’t need anything I wrote down.
- DrNosferatu 3y agoThe bullseye would be low error conversion of handwritten math notes to LaTex.
- Muller20 3y agoI use mathpix (https://mathpix.com/ https://mathpix.com/) quite often to copy equations from papers and it works very well, but I don't know how good it is with handwritten equations.
- nomilk 3y agoThis is so cool, and ambitious, as it takes high level vim skills to keep up with human explanations as well as high level latex skills. Recorded lectures probably makes this approach work well (since you could backtrack if required). I did uni in the days before recorded lectures, and if your scrawling pen/paper notes contained a typo in an equation there was no easy way to get the correction - you had to ask around or consult the lecturer during office hours. A PITA frankly. And that's if you noticed the equation might be wrong. There's such an incredible joy in good note taking. I only learned vim in the last year, and it increased my joy in programming immeasurably (well, I'd guess it about doubled if I had to quantify it). If I studied economics again, I'd 100% learn LaTeX so I could take math notes in the way the author has. They're beautiful and timeless (literally, if committed to source control).
- graycat 3y agoVery nice. Thanks. Typing and Text Editors? My favorite text editor is my most important application program, and nearly all of my work is typing into that editor. Soooo, I agree that typing and text editors are important tools, approaches. And I'm a TeX user: For any important writing, in math or not, I use TeX. Never tried LaTeX. The text editor I use is KEdit, and for it I have lots of macros and write more continually. VIM looks more advanced than KEdit! For drawing of simple figures, I use the old Microsoft PhotoDraw -- you seem to have something more recent and better. Good! Thanks!
- Koshkin 3y agoI have tried to use mspaint alone for creating documents complete with text and figures. (It’s not hard to compile a personal library of various symbols used in mathematics and elsewhere.) Works out pretty well, and the feeling of not being in any way constrained by the tool is a plus.
- luispauloml 3y agoFor those wondering how to accomplish something similar with Emacs: https://karthinks.com/software/latex-input-for-impatient-scholars/ https://karthinks.com/software/latex-input-for-impatient-sch... It does not cover creating figures, though.
- bowsamic 3y agoThis always reminds me of that time I submitted an absolutely awful physics lab report and was incredulous because I had written it in LaTeX and it looked nicely typeset. I'm not accusing this guy's notes of being bad, but I definitely think it is a strange "optimisation" when pen and paper exist. It's not like you're going to stop using pen and paper in grad school either. That said, by the end of my physics degree I'd probably used thousands of sheets of paper...
- notso411 3y ago[dead]
- lugao 3y agoAwesome write-up! I wonder how much simpler and/or unnecessary some of the snippets would be by using typst.app instead of latex. The figure creation pipeline is also great, in this case a custom plugin for typst would need to be added to inkscape.
- mo_42 3y agoWhen I was studying, I sometimes saw classmates typing the lecture directly in LaTeX. To me, they always seemed very busy and a little stressed. Also, it seemed that learning and understanding wasn't their primary goal rather than having beautiful lecture notes. I would have liked to have a tabled with a nicely working pen. But good old paper and pencil also did the job. Some professors even recommend not taking notes at all but rather preparing the lecture. Then, attending it by primarily listening and trying to understand and then working on the homework.
- lynndotpy 3y agoThis used to be me in grad school-- pen and paper for diagrams, vim for notes. I eventually moved to Markdown, using pen and paper more sparingly.
- xwiz 3y agoHa, you are absolutely correct about that. I don't believe LaTeX was designed with speed in mind. I was even using Vim! I eventually realized that I was paying far more attention to my notes than the actual material, and began to just bring a notebook and a pen.
- goku12 3y agoIt feels like your understanding of a subject/concept goes through successive phases of refinement. The initial mental image may be too chaotic to be properly converted into latex. However, the final picture may be refined enough to be worth preserving using latex.
- palata 3y ago> Some professors even recommend not taking notes at all but rather preparing the lecture. Then, attending it by primarily listening and trying to understand and then working on the homework. Some of my professors leveraged MOOCs (massive open online courses) and "inverted" their classes: they recorded a video of them giving the class, and asked the students to watch it before the class. During the class, the teachers would be here to answer questions and go deeper into the material. I loved it, because I could watch the video at my speed (with as many interruptions as I wanted).
- CisEternal 3y agoDid almost all my notetaking in LateX for the majority of high school and college. Worked out surprisingly well, much better than my bottom barrel handwriting at least. Takes more time than writing, but having nice, well readable lecture notes helped me a lot.
- kanzure 3y agothis can now be accomplished by vaguely describing the math to chatgpt (or your LLM of choice) in real-time, even if you describe it poorly. You can even take surprisingly bad short-hand notes and convert into good transcripts. For example, this comment was written by asking it to guess: ths cn nw b accmplsh b vague descri da math to chatgpt (or ur llm o choice) in reltym, even if u dscrb porly. u ca eve tk urpringly bd shrthnad nts n cnvrt nto gd trnscrpts.
- al_borland 3y agoIt seems the risk of hallucinations would be high, and with the user looking to learn the subject, they would probably lack the skill to spot them.
- polpo 3y agoI did this in college in the late 90s/early 00s. It was fun and I could keep up but ultimately it was a dumb flex and I didn’t retain the info any better. I’m glad I stopped. I still did my homework exercises in LaTeX but that was sort of an ADHD-driven yak shaving/procrastination exercise.
- westurner 3y agoPrevious discussion: "How I'm able to take notes in mathematics lectures using LaTeX and Vim" (2019) https://news.ycombinator.com/item?id=19448678 https://news.ycombinator.com/item?id=19448678 https://news.ycombinator.com/item?id=32420925 https://news.ycombinator.com/item?id=32420925 : > Computational Notebook speedrun competition ideas:
- westurner 3y agonews.ycombinator.com/from?site=castel.dev : https://news.ycombinator.com/from?site=castel.dev https://news.ycombinator.com/from?site=castel.dev
- dang 3y agoThanks! Macroexpanded: How I'm able to take notes in mathematics lectures using LaTeX and Vim - https://news.ycombinator.com/item?id=19448678 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 https://news.ycombinator.com/item?id=19440652 - March 2019 (6 comments)
- tippytippytango 3y agoI used to do this, but I preferred using lyx since it would typeset the equation as you typed it. I did it not for beautiful notes but out of sheer laziness. I could copy and paste the previous equation and tweak it to form the next step. More so useful for homework.
- LectronPusher 3y agoI agree with other commenters that paper and pencil are the way to go for true learning, but the other week I left my notebook at home for a lecture, and was able to keep good notes with Typst, although my typing speed isn't excellent. Curious what other people think about Typst vs Latex for notes? Edit: reading a bit further, it seems like Typst has the ability to do a lot of the snippets as-is ($->$ is \to, $in$ is \in, etc.), and since variables in Typst are usable by mere mortals, it's easier to hack in the language you already use. For example, I use `#let la = $lambda$` as a shortcut.
- goku12 3y agoIt's probably not going to be all that different - similar to switching between programming languages. Typst markup feels more modern and intuitive. That may give it a slight advantage while note taking. But LaTeX has an elaborate layout algorithm that plays a big part in why its output is so good looking. I'm curious about how Typst's layout compares with that.
- cryptonector 3y agoI think even if I were very proficient in LaTeX I'd still not be able to keep up with the lecture. It seems to me that pen and paper is better. Even better would be if the professor would just post the notes for their own lectures.
- supertofu 3y agoI can't retain information unless I write it by hand. It's a superstition created by my own mind, but it feels like knowledge can leak out of my brain unless I write it out. That said, I use a stylus and digital tablet to take handwritten notes, which allows for sooo much flexibility, editability, and creativity.
- whatupmiked 3y agoAccording to the comments in the most recent post on this blog the author has passed away: https://castel.dev/post/research-workflow/ https://castel.dev/post/research-workflow/ I stumbled on this blog recently when researching the same topic (nvim +latex). I found this more recent blog (https://www.ejmastnak.com/tutorials/vim-latex/intro/ https://www.ejmastnak.com/tutorials/vim-latex/intro/), by another author, inspired by this original author useful as well. I found this blog post to be very helpful and the author was obviously a very good writer and I am sure he will be missed. Condolences to his friends and family.
- gjjgjgjgj 3y agoIn grad school I started taking all my notes in Sublime with the Unicode-Math mod. I can effortlessly type any unicode characters with "\alias". I've installed that on all my computers since then because it's so easy and convenient. \int \pi \geq \forall x \underbar \overbar \prime \^2 \therefore \pm \psi \implies \sqrt \2/3 y \approx \Omega produces ∫π ≥ θ ∀ x̱̅′² ∴ ±ψ ⟹ √⅔y ≈ Ω I even made my own mod to shorten the aliases of the most commonly used symbols. I long ago gave up trying to memorize all my notes. I can type as fast as I can write and then everything is easy to read and easy to search and instantly synced to cloud without having to transcribe anything after the fact. I had several professors ask me to show them how to set it up.
- JNRowe 3y agoGiven that we're in a vim story, I'll reply with a little vim tip… Vim has digraph support built-in¹, so for your example the first few digraphs are In, p*, >=, h*. It is also how I typed the ellipsis on the first line of this comment(,.), and the superscript footnotes(1S and 2S). A more complete Unicode solution for vim is available in Christian Brabandt's excellent plugin². ¹ https://vimhelp.org/digraph.txt.html https://vimhelp.org/digraph.txt.html ² https://github.com/chrisbra/unicode.vim https://github.com/chrisbra/unicode.vim
- javier_e06 3y agoIn mathematics classes I cannot imagine how to used LaTex and/or vim to draw and shade the area under a curve to represent the integral. I have my lucky Pentel Mechanical pencil which took me over hours long tests back when I was in school. It is completely broken know but I keep as some sort of amulet. Only 3 people needed to understand my writings: The teacher, the TA, and me. I once had a heated argument with a TA. I wrote a hex number and I write the four closed, like this (4) But it was mistaken for an (A). I wished then the tests where typed.
- mike986 3y agoif you use emacs: https://karthinks.com/software/latex-input-for-impatient-scholars/ https://karthinks.com/software/latex-input-for-impatient-sch...
- major505 3y agoMy handwriting is terrible, and I use to much force, so I always end with lots of pain in my writs after writing for to long. I went back to university after my divoce, mainly to have somthing to occupy my mind at the time. I did most of my annotations in Markdown. The graphs and other images I would snap a photo in my phone from the blackboard, grab them from onedrive and puting the reference in my document, and after classI would drawin the proper application or get for a text and internet and copy paste. For fluxograms I would use Mermaid. For the editor I would just use vscode. I use vscode for almost everything, even control my spotify playback... Here is a example of some of my anotiations https://github.com/joetorres/Materiais01/blob/master/04.N%C3%BAmeros%20qu%C3%A2nticos.md https://github.com/joetorres/Materiais01/blob/master/04.N%C3... https://github.com/joetorres/Materiais01/blob/master/07.Estrutura%20cristalina.md https://github.com/joetorres/Materiais01/blob/master/07.Estr...
- aldanor 3y agoFor writing math notes (especially in vim), I switched to using Typst (https://typst.app https://typst.app). Here's a few points: - The syntax is a lot lighter and easier to type fast. I was up and running in half hour after starting to use it. Once in a while I can look up some symbol name in the docs but that's about it. I can type math notes almost at the speed of writing by hand and my right pinky doesn't fall off because of all backslashes and curly braces. - Empty document is a valid document. No preambles, no includes etc, it's all optional and the defaults are sensible. Just start typing. - It's incremental. Live preview from neovim is in the browser and it's lightning fast, pretty much immediate. No pdf sync pain. No build files, makefiles and all that. Just start typing. While it's not going to beat latex in terms of serious academic use, for personal use and notes it's close to perfect. (And of course it's written in Rust...)
- ambigious7777 3y agoI would absolutely recommend Typst. I've somewhat recently switched to it for my notes from LaTeX, and it's really a lot easier to type then TeX. For the most part, Typst is sort of like Markdown, but more stuff.
- cge 3y agoAs an undergraduate a number of years ago, in physics, I also experimented with taking notes in LateX. My approach, rather than making writing faster through editor wizardry, was to extensively use \def and \newcommand to abbreviate everything. The resulting sources were not easily readable by others, but could be written very quickly. These went beyond consistent, global abbreviations, or even course-level abbreviations: both were easy (and I can remember a few I used, like \beq/\eeq and \bea/\eea for beginning and ending an equation or eqnarray, etc, and \lt and \rt for \left and \right), but I could also quickly add definitions while taking notes, so if frequent symbols, or even whole expressions, showed up in a lecture I could \def them when it became likely they'd be used again. I could sometimes outpace the lecturer, working through equations on a board, because I could see where they were going to repeat expressions and just use the abbreviation I had made previously. The larger problem I had, as an undergraduate at a time when many students had laptops but I was often the only one who would use one in class, is that I would worry about the typing being annoyingly loud. My use of Dvorak today is largely as a result of my exploring ways of trying to make my typing quieter: comparing typing on the same keyboard and around the same speed, I do seem to be able to type with considerably less noise with Dvorak than with QWERTY.