Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Katex not rendering in PDF export #3058

Closed
jeremyfreedman opened this issue Apr 14, 2020 · 3 comments
Closed

Katex not rendering in PDF export #3058

jeremyfreedman opened this issue Apr 14, 2020 · 3 comments
Labels
bug It's a bug

Comments

@jeremyfreedman
Copy link

jeremyfreedman commented Apr 14, 2020

Description

When exporting documents to PDF with Katex present, the Katex portions appear as whitespace.
As an example, the below images are the same note, the first being a screenshot from the Joplin application and the second from my PDF renderer (I tried multiple):
image
image

Environment

Joplin version: 1.0.200
Platform: Windows 10 Pro
OS specifics: x64 Version 1909 (18363.720)

Steps to reproduce

  1. Create a new note.
  2. Write some in-line math using Katex (ie. $1+1=2$)
  3. Export to PDF using File -> Export -> PDF - PDF File
  4. Open the PDF in any PDF viewer and check if the Katex you entered is visible.

Describe what you expected to happen

The lines should be visible and typesetted properly using Katex.

Logfile

The console raises no errors or warnings when exporting. The log file (log.txt) does not print anything when exporting whatsoever.

@jeremyfreedman jeremyfreedman added the bug It's a bug label Apr 14, 2020
@laurent22
Copy link
Owner

Please provide a full note that can be used to replicate the bug.

@tessus
Copy link
Collaborator

tessus commented Apr 14, 2020

I can't reproduce this, but I'm on macOS. Here's a test file:

# Matrix

$$
\begin{pmatrix}
    a & b & c\\
    a & b & c\\
    a & b & c\\
    a & b & c
\end{pmatrix}
$$

# Standard Deviation

$\bar{x}$ = the mean, or average, of all data points in the problem 
x = an individual data point 
N = the number of points in the data set

$$
\sigma = \sqrt{\frac 1 N \sum_{i=1}^N(x_i-\bar{x})^2}
$$

# Katex Documentation

https://katex.org/docs/supported.html

# Color Test

$\colorbox{red}{A}$

# Symbols

$$ 
\text{\textasciicircum}
$$

$$ 
\text{\textasciitilde} 
$$

However, for some reason the matrix looks like this in the PDF:

image

while in Joplin it looks perfectly fine:

image

@jeremyfreedman
Copy link
Author

jeremyfreedman commented Apr 14, 2020

Please provide a full note that can be used to replicate the bug.

Github wouldn't take an .md file, I had to rename to .txt. I included the Joplin-produced PDF as well, which is missing Katex rendering.

Test Katex.md
ENGRD 2300 - Test Katex.pdf

@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

3 participants