Quote IDs that are passed over into the LaTeX class.

Using {} and some other characters should work fine.