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

Make the PDF print work for MathJax math #285

Closed
choldgraf opened this issue Sep 1, 2019 · 4 comments
Closed

Make the PDF print work for MathJax math #285

choldgraf opened this issue Sep 1, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@choldgraf
Copy link
Member

choldgraf commented Sep 1, 2019

Currently, we use a library called PrintJS to handle
printing of just the notebook content (when you click the "print -> PDF" buttons).

However, a drawback of this approach is that MathJax mathematics don't quite display properly. Here's an example of how it looks:

live page:

https://jupyter.org/jupyter-book/features/markdown.html

Original math:

printed math:

Here are a few problems:

  • We don't get the same math fonts that are normally displayed. (I believe because MathJax dynamically loads them, so this defaults to system fonts)
  • The mathematics are duplicated for some reason fixed by fixing double math printing #286 !

We should fix these!

@mneira10
Copy link

mneira10 commented Sep 4, 2019

Hi! I've been trying to get the new download "download"->"pdf" to work but it doesn't seem to come as a default when you create a new notebook or when you upgrade a previous notebook version.

I can't seem to find the setting for enabling it either. Is there a straight forward way to get this working?

Thanks in advance!

@choldgraf
Copy link
Member Author

This only works on the master branch right now, can you try installing jupyter book from there and trying?

@choldgraf
Copy link
Member Author

I just added a quick note about this to the main page of the docs:

https://jupyter.org/jupyter-book/intro#Installation

@choldgraf choldgraf added the bug Something isn't working label Sep 5, 2019
@choldgraf
Copy link
Member Author

I think that we can say Math rendering works OK now on print - the fonts aren't quite right, but the math actually renders pretty nicely so I'm gonna close this and we can see if folks aren't happy with the result in subsequent issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants