Bug 330834 - LaTeX corrupted when attempting to print to pdf
Summary: LaTeX corrupted when attempting to print to pdf
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: maxima-backend (show other bugs)
Version: 0.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL: http://i.imgur.com/G998uBm.png
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-06 01:12 UTC by Archelon
Modified: 2018-06-03 08:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.04.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Archelon 2014-02-06 01:12:58 UTC
Printing a Cantor/Maxima worksheet with LaTeX entries (to the default virtual ps/pdf printer) produces corrupted output.  The expression is intact, but there are two or three copies of it, blown up huge, and cut off on the right.

Reproducible: Always

Steps to Reproduce:
1. Type `$$x(t)=t\,\mathrm{cos}(t), \; y(t)=t\,\mathrm{sin}(t), \; 0 \le t \le 2\pi$$` and [shift]-[enter].
2. File --> Print --> Print to File (PDF)
3. Open resulting PDF in Okular
Actual Results:  
See .png file at link (this is the full width of the .pdf document)

Expected Results:  
One complete copy of the rendered formula, at a reasonable size (e.g. the same size as it appears on the screen relative to the other objects in the worksheet)

What it amounts to is that there is no way to get some plots with nicely typeset labels into a portable format from this software.
Comment 1 Alexander Semke 2016-10-08 09:14:17 UTC
I cannot see the copies of the expression since the output is complete broken and I cannot even recognize the expression.

This error seems to be related to "latex entries" only. Latex output of usual command entries is printed correctly.
Comment 2 Nikita Sirgienko 2018-05-06 17:38:28 UTC
This bug more important: it can cause segfault.
For example, if your first entry in worksheet is LaTeX, you get segfault.
If you have few LaTeX entries, you also can get segfault sometimes (I haven't understood rule of segfault happening).
Comment 3 Nikita Sirgienko 2018-06-01 15:59:36 UTC
Git commit 355f0f1163bcba857da63200c3289774e4e4c49c by Nikita Sirgienko.
Committed on 01/06/2018 at 15:59.
Pushed by sirgienko into branch 'master'.

In LatexEntry::updateEntry path to esp file is constructed invalid. This commit fix it. During debuging, it was found, that EpsRenderer don't check, that input is valid, at all. So, the commit also add checking, that input file is valid eps file, and warning message printing, if it is not true.
FIXED-IN: 18.04.2
Differential Revision: https://phabricator.kde.org/D13234

M  +4    -0    src/epsrenderer.cpp
M  +1    -1    src/latexentry.cpp

https://commits.kde.org/cantor/355f0f1163bcba857da63200c3289774e4e4c49c
Comment 4 Alexander Semke 2018-06-03 08:28:24 UTC
Git commit 8f382c721828565a2893027b33ea081442cd6982 by Alexander Semke, on behalf of Nikita Sirgienko.
Committed on 03/06/2018 at 08:28.
Pushed by asemke into branch 'Applications/18.04'.

In LatexEntry::updateEntry path to esp file is constructed invalid. This commit fix it. During debuging, it was found, that EpsRenderer don't check, that input is valid, at all. So, the commit also add checking, that input file is valid eps file, and warning message printing, if it is not true.
FIXED-IN: 18.04.2
Differential Revision: https://phabricator.kde.org/D13234

M  +4    -0    src/epsrenderer.cpp
M  +1    -1    src/latexentry.cpp

https://commits.kde.org/cantor/8f382c721828565a2893027b33ea081442cd6982