- Removed redundant variables
- Made data flow of the latex string explicit
- Marked the invalid latex message for localization
- Renamed some variables/methods for clarity
- Minor code cleanup
With this change, users won't have to delete the default x^2 LaTeX
formula before adding their own. The x^2 is selected so upon typing it
will vanish.
Fixes: #1140
- Improved memory safety by using unique_ptr instead of raw pointers for some
private fields and methods
- Simplified preview updating
- Removed some redundant helper methods
- General code cleanup
- Remove extra whitespace generated to the left of LaTeX images
- Fix OK button not being disabled when simultaneously updating and invalid
- Move away from deprecated GTK features in dialog buttons
Blank formulas generate sizeless PDFs, which Poppler cannot handler. This commit
modifies the template so that it will throw an error within latex when the
rendered preview is blank.
* Exit code of pdflatex is now checked.
* Any failure to run pdflatex will now cause the generated preview to be
deleted in order to avoid more errors.
* The existence of the preview PDF is now checked before attempting to render
it. In this case, the error popup will not be shown.
* Added warning logging messages to preview PDF handling.