Bug 434812

Summary: Markdown LaTeX rendering issue
Product: [Applications] cantor Reporter: Jebin <jebin12raj>
Component: generalAssignee: Cantor Bugs <cantor-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.semke, jebin12raj
Priority: NOR    
Version First Reported In: 20.12.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 22.03
Sentry Crash Report:
Attachments: Rendered Markdown LaTeX
Markdown text
rendered output without the fix
rendered output with the fix

Description Jebin 2021-03-23 04:10:01 UTC
Created attachment 136966 [details]
Rendered Markdown LaTeX

SUMMARY
The LaTeX inside markdown (both inline and separate line) gets rendered with wide gap between it and previous line.

STEPS TO REPRODUCE
1. Create/load a ipynb file with markdown containing latex.
2. Render the LaTeX.

OBSERVED RESULT
LaTeX rendered with huge wide gaps

EXPECTED RESULT
LaTeX rendered inline or separate line with normal spacing.

SOFTWARE/OS VERSIONS
Operating System: Fedora 33
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.19-200.fc33.x86_64
OS Type: 64-bit
Comment 1 Jebin 2021-03-23 04:12:18 UTC
Created attachment 136967 [details]
Markdown text

markdown text:

### Net Present Value
- $PV ~=~ \frac{b}{(1+r)^t-1}$
- $b ~=~  {p S\{t\} - k (1+r)^t}$
Comment 2 Alexander Semke 2022-01-09 10:34:16 UTC
Git commit dce028566d4f5b4ea31966cab2afd876b44d1159 by Alexander Semke.
Committed on 09/01/2022 at 10:33.
Pushed by asemke into branch 'master'.

Removed the border and reduced the margins of the LaTeX preview image.
FIXED-IN: 22.03

M  +2    -0    src/mathrendertask.cpp

https://invent.kde.org/education/cantor/commit/dce028566d4f5b4ea31966cab2afd876b44d1159
Comment 3 Alexander Semke 2022-01-09 10:38:14 UTC
Created attachment 145259 [details]
rendered output without the fix
Comment 4 Alexander Semke 2022-01-09 10:38:35 UTC
Created attachment 145260 [details]
rendered output with the fix
Comment 5 Alexander Semke 2022-01-09 10:39:27 UTC
(In reply to Jebin from comment #1)
> Created attachment 136967 [details]
> Markdown text
> 
> markdown text:
> 
> ### Net Present Value
> - $PV ~=~ \frac{b}{(1+r)^t-1}$
> - $b ~=~  {p S\{t\} - k (1+r)^t}$

I did a fix now and I added two screenshots for the comparison. Please check. Thanks for reporting this issue!