astefanutti / decktape

PDF exporter for HTML presentations
MIT License
2.21k stars 177 forks source link

Reveal.js presentation fails to render (ReferenceError: Can't find variable $) #101

Closed pganssle closed 7 years ago

pganssle commented 7 years ago

I'm trying to create a PDF of my presentation - it was generated from a Jupyter notebook by nbconvert --to-slides (not using RISE). When I try and run decktape on it, I get ReferenceError: Can't find variable: $:

$ docker run astefanutti/decktape reveal https://pganssle.github.io/pybay-2017-timezones-talk pybay2017-timezones-talk.pdf
Loading page https://pganssle.github.io/pybay-2017-timezones-talk ...
Loading page finished with status: success
Reveal JS DeckTape plugin activated
Printing slide #/0      ( 1/35) ...+- ReferenceError: Can't find variable: $
|_ https://pganssle.github.io/pybay-2017-timezones-talk/: 14937 (in function "update_scroll")

I found this issue, which seems similar, but slightly different. That seems to be an issue with Reveal failing to load, whereas mine seems to be jquery failing to load. Is this a bug on my end?

astefanutti commented 7 years ago

Opening the Chrome console and navigating the presentation produces the error as well. So it seems this is an issue with the Jupyter notebook export.

That being said, it is not blocking and I've been able to successfully export the presentation with Decktape. It's just that the error gets propagated to the Decktape output. Let me know if that's the case for you too.

pganssle commented 7 years ago

@astefanutti Ah, so it does! For whatever reason the first time it didn't generate the presentation, and in later tries apparently it was generating it in a pdf/ file and I guess I didn't look.

Weirdly, the fonts (especially the monospaced ones) seem a bit messed up. Does the version you created also handle monospaced fonts wrong?

astefanutti commented 7 years ago

@pganssle great. For the font issue, it's likely related to #67. One workaround is to modify your CSS styles as in one of the comment.

If you feel adventurous, you can try the 2.x alpha that's based on Chrome. I'm attaching the PDF I've produced with it: test.pdf.

pganssle commented 7 years ago

@astefanutti Good call. I'll try playing around with the 2.x thing (I think I need to mess with the screen size to get it to look right). Thanks for the help!