As Enrico said, the user might have installed a package that was
missing (in which case the .tex file would not have changed).
Another reason is that changing some document settings did not
automatically lead to a fresh compile after an error (#9061).
Our old mechanism for detemining whether there was an error was to
check if the dependent file existed in the temporary directory. If
it did not exist, that meant it was removed, presumably because
there was an error during compilation. That mechanism cannot be used
anymore because we keep the files around even after error because of
the "Show Output Anyway" button (09700d5b). This commit implements a
more straightforward way of checking whether there was an error in
the previous preview by simply storing the success of last compile
in a buffer variable.
The problem was due to the use of the wrong symbol for the slash.
The zero-width symbol for the \not operator was being used.
Using TeX fonts for all symbols gives now a better uniform look.
It is not possible using the alternative code even with Qt 5.4.1
because some glyphs are still missing.
Avoid that \newcommand[x] definitions of math macros are pushed multiple
times to the preview loader.
Redefinitions (via \renewcommand[x]) are properly handled.
If use of hyperref is detected, the postscript route is not attempted
(because we know it will fail) and the PDF route is directly chosen.
Also account for all upper case extensions for pdflatex image files.
Was forgetting this last bit from 64e0c558. Also give a message such
that the user is informed that not everything is lost if latex fails.
With this, the previews are generated also when the document directly
specifies a specific pdf output format.
This is a followup commit to 691fdea3 and restores the behavior of the
script as it was intended before 64e0c558, other than taking into account
possible inclusion of files that only pdflatex can process and the
possibility of multiple defined math macros.
The instant previews in the math manual now work again.
The preview snippets are cached in a seemingly random order, such
that, when regenerating them on zoom, the math previews would be
numbered accordingly. Hence, we have to go through the insets to
get the correct order. This is a bit slower but unavoidable.