Theory Life-Hacks

LifeHacker is a website dedicated to tricks, especially technology related, to make people more efficient or productive. The signal to noise ratio in that website is not particularly high, but I think it is a good idea to share tricks that can save time and effort. In particular, are there tools or tricks that made a difference in your life as a theorist?

Here are some of the tools I use. This is obviously a very biased list and reflects my limitations as a Windows user that is too stupid to learn to use emacs  and vim. Please share your better tips in the comments:

LaTeX editor / collaboration platform: I recently discovered Overleaf  which can be described as “Google Docs” for LaTeX. It’s a web-based LaTeX editor that supports several people editing the same document simultaneously, so it’s great for multi-author projects, especially for those last days before the deadline where everyone is editing at once. There are few things as satisfying as watching improvements and additions being added to your paper as you’re reading it. One of the features I like most about it is its git integration. This means that you can also work offline on your favorite editor and pull and push changes from/to the overleaf repository. It also means that authors that don’t want to use overleaf (but can use git) can still easily collaborate with those that do. I actually like the editor enough that I’ve even used it for standalone papers.

Version control: I’ve mentioned git above, and this is the version control I currently use. I found source tree to be an easy GUI to work with git, and (before I switched to overleaf) bitbucket to be a good place to host a git repository. Git can sound intimidating but it takes 5 minutes to learn if someone who knows it explains it to you. The most important thing is to realize that commit and push are two separate commands. The former updates the repository that is on your local machine and the latter synchronizes those changes with the remote repository. The typical workflow is that you first pull updates, then make your edits, then commit and push them. As long as you do this frequently enough you should not have serious conflicts. I am also committing the cardinal sin of putting my git repositories inside my dropbox folder. There are a number of reason why it’s a bad idea, but I find it too convenient to stop. To make this not blow up, I never use the same folder from two different computers and hence have subfolders “Laptop” and “Desktop” for the repositories used by these computers respectively. Update 4/29: Clement Canonne mentions in a comment the Gitobox project that synchronizes a dropbox folder and a git repository and so allows easier collaboration with your non-git-literate colleagues.

Markdown: I recently discovered markdown and particularly its pandoc flavored variety as a quick and easy way to write any technical document – lecture notes, homework assignments, blog posts, technical emails – that is not an actual paper. It’s just much more lightweight than LaTeX and so you type things faster, but it can still handle LaTeX math and (using pdflatex) compile to both html and pdf. All the lecture notes for my crypto course were written in markdown and compiled to both html and pdf using pandoc.

Editor: I was a long time user of winedt but partially because of markdown and other formats, I decided to switch to a more general purpose editor that is not as latex centric. I am currently mostly using the Atom editor that I feel is the “editor of the future” in two senses. First, it is open source, backed by a successful company (github) and has a vibrant community working on extending it. Second, it’s the editor of the future in the sense that it doesn’t work so well in the present, and it sometimes hangs or crashes. If you prefer the “editor of the present” then sublime text might be for you. Some Atom packages I use include Build, Emmet, latextools, language-latex, language-pfmMarkdown Preview Plus,  Mathjax-wrapper, pdf-view, preview-inline, sync-settings (I find it also crucial to enable autosave ).

Remote collaboration: I use several tools to collaborate with people remotely. I’ve used slack as a way to maintain a long-running discussion relating to a project. It works much better than endless email threads. In a technical discussion we’ll sometimes open a google hangouts video chat and in addition use  appear to share a screen of a OneNote pad (assuming one or both of the discussants has a pen-enabled computer such as the Microsoft Surface Pro or Surface Book that seem to become the theorists’ new favorite these days). A good quality camera aimed at the whiteboard also works quite well in my experience.

Presentation: As I’ve written before, Powerpoint has awesome support for math in presentations. One thing which I would love to have – a visual basic script that goes over all my slides and changes all the math in them to a certain color. It’s a pain to do this manually.

Bibliography maintenance:  Here is where I could use some advice. It seems that in every paper I end up spending the last few hours before the deadline scouring DBLP and Google Scholar for bib items and copying/pasting/formatting them. I wish there was an automatic script that would scan my tex sources for things like \ref{Goldwasser-Micali-Rackoff??} and return a bibtex file containing all of the best matches from DBLP/Google Scholar. Bonus points if it can recognize both the conference and journal version and format a bibtex which cites the journal version but adds a note “Preliminary version in STOC ’85”. Update 4/29: A commenter mentions the CryptoBib project that maintains a super-high-quality bibtex file of all crypto conferences and some theory conferences such as ICALP, SODA, STOC, FOCS. Would be great if this was expanded to all theory conferences.

Note taking: I am still a fan of a yellow pad with pen, but I find myself using OneNote quite often these days on my surface book (which is also the “computer of the future” in a sense quite similar to Atom..). It’s useful to take notes in talks, and also to write notes for myself before teaching a class so that they would be available for me the next time I teach it.

p.s. Thanks to David Steurer who I learned many of these tools from, though he shares no responsibility for my failure to learn how to use emacs.


29 thoughts on “Theory Life-Hacks

  1. Thanks for this list!

    I found (especially, its version for mac) very convenient to write/synchronize markdown. Unfortunately, it doesn’t seem to have a Windows version (one can use it online, though).

    Regarding presentations, there are non-beamer templates available online (see, e.g., They normally require xelatex, which allows to use non-standard fonts.

  2. I’m also a fan of overleaf. The downside is that it is a bit laggy.

    Re. bibliographies:
    Google Scholar has a browser plugin which helps generate bib items for you. (i.e. it saves you going to DBLP or opening up a Google Scholar tab) I haven’t used it, but I’ve heard good things.

    I just maintain an ever-growing bib file that gets copied from one project to the next and contains every citation I know about. However this requires systematic naming of bib entries, which I don’t do…

    1. Thanks. It is a little laggy but I find it not too bad. Am not sure if the fact that I’m paying for a pro subscription makes it faster or not.

      I will look into that plugin though ideally I’d like something that just scans my latex for me and extracts the right bibitems in one batch, no matter how little I remembered about the paper.

  3. I would be very interested in seeing one markdown source of your course notes. I have known Markdown and pandoc for a while, but I still have not tried it. I wonder how much simpler the source is compared to an equivalent LaTeX source.

    1. The source for all the homework exercises is online to make it easier for the students to submit their homework

      Basically it’s plain text + minimal formatting for bold/italics and lists + everything inside $ signs is latex math. If you use pandoc then you can also use newcommand to define macros

  4. You might be interested in JabRef [] for bibliography. It’s an open-source bilbiography manager, using bibtex as its native file format. It doesn’t scan your latex, but it does have an automated search function that knows about dblp (among others), and a button to automatically insert citations into your latex editor (works for winedt/kile — not sure about atom)…

  5. Nice idea to make this list! I’m also a new fan of Overleaf.

    I haven’t tried Atom yet, but while it installs, let me take a moment to praise the “editor of the present”.
    Sublime may offer the solution to your bib maintenence problem. In Sublime (with LaTeXTools – needed for building), once you type \cite and open curly bracket, it opens a search bar, type what you remember (author name, paper title) and gives suggestions from whatever compiled bib file you’re using. Just hit enter on the suggestion you want and then it’s in. closing curly bracket and all 🙂

    If your compiled bib file is something like ENS’s cryptobib (, pretty much all of the crypto papers are there and with Sublime, it makes bib maintenance super stress free.

    1. Sublime is actually quite nice – it runs super fast, never crashed for me, and is my editor of choice for handling very large files. I think Atom is based on sublime but is a little bit more modern, and has the backing of a larger company (but on the other hand is slower and more buggy, but hopefully that will become better with time).

      Thanks for the tip on cryptobib – this is a great project and if there was something like that for all of TCS it would more or less solve the problem. It also has nice git integration.

  6. I wrote a Python script just the other day to fetch DBLP bibtex entries using the cite keys. (There are some similar scripts out there but they can do way more than what I need – and don’t work.) I wrote it for my private use with my very limited coding skills. Its available from Simply run document.aux and you will get a file called dblp.bib.

    1. Thanks Thomas. I think the main issue for me is that I only remember something about the paper, so would like to write very fuzzy cite keys that contain only the information I remember, and have the appropriate entry extracted from either DBLP or google scholar.

    1. Thanks Clement! I guess now we just need a project like that that would automatically write and read emails from our colleagues who don’t even use dropbox 🙂

  7. I use Lyx since my M.Sc. and so far I am very happy with it.

    The only downside is that when collaborating with other people, I need to constantly export lyx files to tex files and then import tex files back to lyx files. It doesn’t take a lot of effort on my side, but my collaborators complain that the exported tex files are not fun to work with.

    1. While I am generally a big supporter of the freedom of speech and discussion of controversial topics, I think I have to draw the line at the promotion of Lyx 🙂

  8. Interesting list! Many of the things I wanted to mention are already in the comments, except for Spideroak. I find it superior to dropbox because I can just tell it to sync certain folders and it will do that automatically, without requiring me to move files to the dropbox or work directly in the dropbox.

      1. I have always been a bit nervous about automatic syncing in general. What if the Dropbox/Spideroak/other computer has a fit and deletes files at its end, then when it next syncs deletes them at your end too? I feel safer keeping the working files unsynced, then running the following script (Linux) to copy all changed files to folders that are synced every now and then by typing its name (I just call it backup) as a terminal command.

        rsync -av –delete ~/sourcefolder1/ ~/thesyncingfolder/destinationfolder1
        rsync -av –delete ~/sourcefolder2/ ~/thesyncingfolder/destinationfolder2
        [Add as many lines as you like]

        Of course this does make life a bit more complicated if you work on the same files on more than one computer.

      2. Dropbox keeps old versions of files (not sure but i think 30 days in the free version and unlimited or one year in the paid one) so if it ever happened that it deleted a file by mistake then itcan be recovered.

        FWIW this never happened to me though what did happen is that a new version of a file I had open in two computers was overwritten by an old one due to an auto save feature of the editor. But it was easy enough to restore using Dropbox.

  9. BaKoMa TeX is the only editor I know that instantly renders as you type. It is expensive, but was totally worth it for me.

    1. Thanks! I should have noted that I also use google inbox, and in particular its feature of classifying many messages as “low priority” and “snoozing” messages, very heavily.

  10. Emacs with the built in AucTeX and RefTex packages is the nicest cross-platform environment for editing latex I have used so far (I think it is also unique in having the capability to include previews of latexed mathematics directly in the text bufer, but I personally do not use that feature a lot). It of course has git integration, and with tweaking could possibly even “read email” :).

    There is also Org-mode, another emacs builtin that is basically a more powerful version of markdown which can be used for everything from short technical notes (which can be published with two keystrokes to both pdf and html) to maintaining a calendar or a hyperlinked reading-list.

  11. Here is a small hack that I fell in love with: For ease on the eyes, change the default background color on your PDF reader. This can be done at least in Sumatra and Acrobat. I am currently using “blond” (rgb hex: #fbf6d9). So warm.

  12. Thanks for the pointers. I’ve written a bunch of Latex macros for doing lecture notes, quickly. Unlike lecture notes you might post for students when are in paragraph form, I like my lecture notes to be exactly what I might write on the board, with reminders of what I might talk about. I’ve been meaning to make these into a class file and put them out there, but who knows when the time for that will happen. I’m happy to share the macro file. The results look like this:

Leave a Reply to Boaz Barak Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s