Wednesday, June 27, 2012

LaTex: Subequations with a left brace

A colleague in my lab wanted to use subequations (he wanted to number two equations with the same number but with .a and .b) while keeping a large left brace around the two equations.  I stumbled upon the way to do this using the package empheq.

To use the empheq package be sure to use the following line in your preamble.

\usepackage{empheq}

Then in your document you can use:

\begin{subequations}
\begin{empheq}[left=\empheqlbrace]{align}
    x &= y + z \\
     y &= \sin(\theta)
\end{empheq}
\end{subequations}



Tuesday, June 5, 2012

Mac OS: Click non-highlighted buttons without using the mouse

I recently discovered this trick in Mac OSX Lion that allows you to navigate pop-up windows without taking your hands off the keyboard.

When I want to save a document I press 'cmd - s', but if the document exists I get a pop-up window with two buttons 'Cancel' and 'Save' with 'Save' highlighted.  If I hit the 'return' button on the keyboard I get a second pop-up window with two buttons 'Cancel' and 'Replace' with 'Cancel' highlighted.  I tried all sorts of combinations of tab to highlight the second button but nothing worked.  Then I discovered that you should hit 'cmd - "first letter of the button tag"'.  In this case I hit 'cmd-r', and it was equivalent to clicking the 'Replace' button.  I still don't know how to highlight the replace button so that I can then hight the 'return' button to click on the button, so if you know please comment.