Auto-wrapping for latex documents