Test for latex document end

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