6. Powerful Mac Utilities
The Mac and OS X is a powerful and easy to use system that comes with many useful applications and utilities that are installed by default and are surprisingly useful in helping you with your LaTeX document.
Some people have used Mac and OS X for years without ever knowing about or venturing into its Unix core. The OS X graphical interface – Aqua – does an excellent job of hiding this Unix base but it can be easily accessed through the Terminal application. Terminal is a fully featured and customisable console (or terminal) into the Unix world underneath Aqua and can do everything a terminal on a Linux or BSD system can.
The Unix under layer also means that a huge number of commands and applications that are in a base Linux system are also present by default in OS X. You might just be surprised at what is installed by default in OS X. Additionally, many classic Linux command-line programs are also available for OS X, meaning you don’t have to leave Emacs or Vi behind because they are also available on the Mac.
With the Mac system and OS X, you have the ease-of-use of the Aqua graphical front end and for those who like to spend time working on the command line, all the programs and utilities you might need are either installed for you, or are available for the Mac for you to download.
On the surface, Preview just displays files. They can be images in JPEG, GIF, PNG or any other common format and Preview is also the default viewer for EPS and PDF files. However, looking just a little deeper, you notice that Preview has the ability to take either a whole file (or image) or a custom selection and save it in all manner of file formats. The most useful one of which (for your LaTeX document) is the PDF.
This means Preview can be used as a PDF converter, taking your photos and figures and converting them to PDF for inclusion in your LaTeX document. You can either use the “Print” or “Save As” menu option (on the “File” menu) to convert to PDF. If you need just a particular a part of an image, then just drag a selection with the mouse and copy it, then you can select the “New from Clipboard” option that appears in the “File” menu to create a new Preview window with your selection, this can then be saved to PDF.
Grab is a simple screenshot utility that can take screenshots of a window, selection or the whole desktop. It also includes a timer, allowing you to set up your screenshot. You can use it to take screenshots of a workflow or process or to record a state of a computation or result.
Grapher is a surprisingly powerful graphing calculator that is a very unusual, but very welcome inclusion in the OS X install. Grapher can produce 2D and stunning 3D graphs with fully customisable axes, frames, backgrounds and mesh colours and resolution. Mesh transparency is also possible and the final graph can be exported to PDF.
Sets of equations to plot can be defined and as long as there is an “x” and “y” (and “z” for 3D), all other parameters can be symbolic as long as they are defined somewhere. For example, an equation you want to plot can contain several parameters that are actually equations themselves whose parameters are further sub equations. This is fine as long as the value for the “primitive” parameters are defined.
Grapher is an excellent tool for 2D and 3D graphs where you have the base parameters and equations and can save a huge amount of time wrestling for inferior results with Microsoft Excel.
Automator is essentially, graphical scripting. It is used to “automate” repetitive tasks such as batch-renaming files, file or graphic conversions, filtering, sorting and filing and much more. It works by linking together a series of basic tasks (such as “get files”, “move files”, “rename files”) into a chain. The results from one task (eg. get all graphics files from this folder) flow into the next (eg. convert these graphics to PDF) and continue along the chain to the end.
There are some limitations in that the chain is pretty much linear, there are no conditional branches or loops however, Automator allows shell and Apple scripting (literally from the Terminal) to be a link in the workflow chain and this increases the usefulness and power of Automator hugely.
Automator may not be used often but can save a huge amount of time by making boring, repetitive tasks automatic.
Spotlight is the search engine for OS X. It keeps a central index of the files (and their contents if possible) on your Mac and when you use Spotlight, it searches this index for the results. This means that results are returned very quickly as the search isn’t physically having to go through every single file and its contents on the hard disk but is only looking through an index.
Every time a file is saved to disk, Spotlight updates its index entry, meaning the index is kept up-to-date and you can search right away without having to wait for the index to fully update itself.
In the end, Spotlight is fast, accurate and incredibly useful. Not only can you search for a file name, but if you can’t remember what it was called, then you can search for the content inside the file (such as words or metadata). It will quickly turn out to be yet another one of those things you just can’t live without.