[Lowerbounds, Upperbounds]

Algorithms are everywhere.

In a secret mission, last week I forced myself to write a 20-page document with TeXnicCenter, a Visual-Studio-like text editor for LaTeX. It was a rather painful experience given its current BibTeX support. Here is the feature list for this (quote) “extremely feature rich” editor. (Perhaps I missed the bib support feature somewhere in this feature list?)

One feature I like about TeXnicCenter is its Navigator (screenshot), which is a tree widget showing the section structure of the document. In Visual Studio, this would be showing the class structure. It is very useful for navigating between sections and can help somewhat when inserting labels.

And that reminds me that a couple years ago I have blown my officemate away by showing him how to use RefTeX. This comes standard with Emacs. (It’s in lisp/textmode/reftex.el.)

Once loaded, it adds the following five key bindings, along with another five that are related to indexing:

  • C-c =
    reftex-toc shows you a table of content in a separate window and let you navigate among sections. Pressing Enter on a section brings your cursor right there.
  • C-c [
    reftex-citation scans your current bib file and help you insert \cite. It prompts you for a regex and then show you all matching entries. Press Enter on the desired entry and the proper \cite will be inserted for you! (This is a killer feature if you have long bibitem key to your bib entries.)
  • C-c )
    reftex-reference shows you the table of content of sections, equations etc. It works like reftex-citation and inserts \ref.
  • C-c (
    reftex-label helps you insert \labels by offering a somewhat intelligent default.
  • C-c &
    When the cursor is on a \ref, reftex-view-crossref brings up the corresponding \label in a separate window. When the cursor is on a \label, then it shows you occurrences of the label one-by-one. The same dual features are available when you are on a \cite and a bib entry.

P.S. Emacs means GNU Emacs. I suppose XEmacs will be similar.