Point to ruby 1.8 shim

Using a shim allows us to catch when 1.8 of ruby is not present and provide other options.

#ignore
Do not try to show non-existing PDF when using TextMate as viewer

Typesetting a TeX file can fail without our tex output parser picking up any errors/warnings, in this case there will be no PDF file but we would previously still redirect the HTML output view to show the (non-existing) PDF.
Fix file scan

Now also works if there is a file (e.g. `chapter1.tex`) with the same name as a project subdirectory (e.g. `chapter1`).

Before, the file scanner would return the directory name instead of the file name.
Run makeglossaries instead of makeindex if `base.glsdefs` exists

Also add a basic parser class (MakeGlossariesParser) for this command.
Set default encoding (in python script) to UTF-8

This is required when building LaTeX files with non-ASCII names.
Update how we ensure generated labels are ASCII (in snippets)

We now use TextMate’s asciify transformation which does a better job (and is less arcane) than the custom regexp.
Format “LaTeX Watch” script with `perltidy`

Use a maximum line width of 80 characters and replace tabs with spaces
to improve the readability of the script.
Fix minor spelling mistakes in “LaTeX Watch”
Use simpler code to print args in “LaTeX Watch”
Remove comments about unsupported options in “LaTeX Watch”
Update command to start “X11” in “LaTeX Watch”
Use `latexmk` in “LaTeX Watch”

This change allows us to directly translate the whole document without
the need to use any of the common external TeX tools (`bibtex`,
`makeindex`, …) directly.
Add support for `xelatex` in “LaTeX Watch”
Support `%!TEX TS-program` in “LaTeX Watch”

We now try to read the typesetting program specified in the tex file. If
the typesetting program is not specified inside the file then we use the
engine specified in the settings dialog.
Add support for `lualatex` to “LaTeX Watch”

To use `lualatex` to translate a document you need to set the
typesetting program at the beginning of the document:

	 %!TEX TS-program = lualatex
Update documentation of “LaTeX Watch”
Fix support for “TeXShop” PDF viewer in “LaTeX Watch”

Previously watching a documents in “TeXShop” would fail since the watch
script supplied the viewer with an incorrect file path for the generated
PDF/PS file.
Save preference nib with Xcode 6.1
Use `latexmk` program bundled with TeX distribution

Instead of providing our own copy of `latexmk.pl` we just use the
version provided by the TeX distribution. This way we do not need to
update `latexmk.pl` when a new version of the script is released.
Fix the behaviour of “Trash aux files”

Up to this point `textMate.py` used to call `latexmk -CA` to clean
auxiliary files. Calling this command should theoretically remove all
auxiliary files including the generated dvi, postscript and PDF files!
However, in most cases we want to keep the dvi, postscript and PDF
files while removing all the other generated files. This commit
introduces this behaviour.