fixed multiple latex errors.

The master document will now compile, though you have to add a
document class.

It isn't pretty yet.