ttools: improve handling of LaTeX errors in plot axis labels

Now writes the source text rather than the error message;
it tends to be more compact and long captions can cause trouble.