Fixed subscript and superscript in latex

Signed-off-by: Tom Wright <tom@inflatablecookie.com>