Use preview package only instead of standalone for the preview of rendered LaTeX images
ClosedPublic

Authored by asemke on Nov 27 2019, 8:56 PM.

Details

Summary

standalone LaTeX package that is being used now doesn't work on openSuse and maybe on some other distributions. This patch makes the latex renderer using the preview package. Setting the background and the font colors as well as the font size works well.

One remaining issues is the white document margin line which becomes visible when using dark desktop theme (=dark colors in Cantor's worksheet). This minor issue will be addressed in another fix, if a solution for this problem is possible. If not, we should still go for this patch since it's better to accept think bounding box around formulas with dark themes on openSuse than accepting completely broken Cantor worksheet on this distribution.

Diff Detail

Repository
R55 Cantor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asemke created this revision.Nov 27 2019, 8:56 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptNov 27 2019, 8:56 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
asemke requested review of this revision.Nov 27 2019, 8:56 PM
sirgienko requested changes to this revision.Nov 28 2019, 11:34 AM

Basic latex package on most of system haven't preview.sty, if I am not mistaken. For example, in Ubuntu, this is package preview-latex-style.
So, @asemke, you should add the embedded sty file and restore code for using embeded version.

This revision now requires changes to proceed.Nov 28 2019, 11:34 AM

Basic latex package on most of system haven't preview.sty, if I am not mistaken. For example, in Ubuntu, this is package preview-latex-style.
So, @asemke, you should add the embedded sty file and restore code for using embeded version.

standalone.cls that was used previously in the code uses preview.sty internally. How did standalone style work for you on Ubuntu if preview style was not installed?

asemke updated this revision to Diff 70529.Nov 28 2019, 8:44 PM

Added preview.sty to the thirdparty folder and restored the logic in the code to copy the required style file to the temp folder.

sirgienko accepted this revision.Nov 29 2019, 9:15 AM
This revision is now accepted and ready to land.Nov 29 2019, 9:15 AM
This revision was automatically updated to reflect the committed changes.