let picture_of_latex l =
  try
    Mlpost.Picture.tex (Latex.to_string l)
  with (Invalid_argument txt) ->
    Mlpost.Picture.tex
      ("Cannot compile Mlpost figure. Reason: " ^
          (Latex.to_string
             (Latex.texttt
                (Latex.Verbatim.verbatim txt))))