ShareLaTeX: Collaborative LaTeX editing with style

For anyone who is a fan of \LaTeX, there is a great site, ShareLaTeX, that allows editing of LaTeX files via the browser. Never used \LaTeX? Well, it’s a rich typesetting system that among other things, allows for pretty printing of mathematics, like this: P(A|B) = \frac{P(B|A)P(A)}{P(B)}. (Bayes’ theorem has been on my mind a lot lately…).

Ok, that looks cool, but why would one anyone use this? Well, you might have to if you are a grad student. ūüėČ The \LaTeX learning curve can be quite steep, since it’s a completely different philosophy to editing documents than the “Microsoft Word” way. It is not a WYSIWYG system. Similar to how one compiles source code, \LaTeX documents are compiled into pdfs, dvis, etc…

ShareLaTeX closes the write / compile / view loop and has a nice side-by-side edit and view display. In the spirit of Bret Victor’s life principle that creator’s need an immediate connection, ShareLaTeX allows for instant feedback with the typesetting process.

Lastly, they just incorporated some pretty advanced features. Their blog has the latest news, but latexdiff looks especially cool.

latexdiff in action
Wow! Let’s see Word do this! :p

If you are an Emacs/¬†AUCTeX user there is still a good use case for shareLaTeX. ¬†Until you get Emacs on your Chromebook, you’ll need an online \LaTeX editor. ūüėČ ¬†And they even support¬†Emacs key bindings! (and also cough vi cough)


Emacs and PostgreSQL

One of the nice things about going to grad school, is that I really get to refine my Emacs fu. ¬†I’m taking this database class where we are using PostgreSQL and I’m using Emacs’ minor sql modes and I’m very impressed. ¬†Now, I’m no emacs knight, nor do I have the Emacs-fu of the emacs rocks¬†guy, but like any good student of zen, I’m maintaining a beginner’s mind (which is pretty easy to do with Emacs since it does pretty much everything).

Using the latest Aquamacs. BTW, I really like the new version of Gimp (which I used to blur the data). The left pane is my .emacs file since the queries are graded homework.

So, with the setup in the screenshot and working in the SQL minor mode, once I’ve written my query, I can shoot it over to the SQL Interpreter with at quick ^C-^C, which then runs the query and outputs the results, meanwhile the point stays right where I left it! ¬†Logging into the database is easy by firing off \texttt{M-x sql-postgres} and entering your¬†credentials. ¬†This mode is even more essential when SSHing in the department CS machines, where I then must connect to a remote DB server, only accessible from another CS department machine. ¬†Since this all is done in Emacs, in one screen, I have a complete SQL IDE, which is great.

This may seem a bit archaic to some to still use Emacs¬†when there are other, more intuitive interfaces out there. ¬†But even those vim users can appreciate that there is much to be had for learning the same tool and using it¬†everywhere. ¬†Admittedly, in this area I need some attention since I’m writing this post now in WordPress’ online editor, and I actually like Eclipse’s intellisense, and I’m tied to a¬†proprietary¬†editor at my day job. ¬†But besides WordPress, Eclipse, Mail, roads, public order and sanitation, what has Emacs done for us!?! ¬†Brought peace?!

Real Programmers
xkcd # 378. I’m glad to see there is actually a M-x Butterfly easter egg in Emacs ūüôā

Areas where I think I can realistically incorporate Emacs:

  1. First draft of blog posts. ¬†100% integration looks a bit wonky with WordPress and I’m still in that baby-blogger phase where I bounce back and forth from the preview to the ¬†edit screen and make tweeks. ¬†But the main draft can (and should) be authored from Emacs.
  2. Code more in Emacs. ¬†For any of the scripting languages this is easy. ¬†For C and C++, this isn’t too hard for me either since I never really grew up on Visual Studios, but for Java… Typing \texttt{this.} and then seeing a list of options is very handy. ¬†Except when I had this kick where I was over-using reflection, then Eclipse can’t really keep up…
  3. Email. ¬†I checked out gnus the other day and while I see how an Emacs only mail client can be done, with so much inline html these days, I’m not sure if its worth it. ¬†But I’m poking a stick at this bear and I’ll¬†probably¬†come back to it.
  4. \LaTeX. ¬†I love \LaTeX. ¬†Once I learned WordPress supported this, I was even more addicted to WordPress. ¬†My r√©sum√©, presentations, papers, letters (when I must actually print one out), are all done in lovable¬†\LaTeX. ¬†If you find yourself cursing at M$ Word, take the red pill my friend. ¬†And then you’ll start cursing weird compile errors, but worry about that after you take the pill… ¬†Many thanks to Brent over at The Math Less Traveled for showing me this!

Well, that’ll keep me busy for a while ūüôā

Emacs mug, which sold out in less than a day! Under the mug, the book I’m currently reading. Behind it, some Leuchtturm 1917s and Umberto Eco’s Baudolino, which I’m half-way through and from which I’m taking a break and of course, a WIRED.