replace ascii math with latex-generated images