Closed markwort closed 2 years ago
Hi Julian,
Thank you for your thorough report. I've pushed a commit to disable this deferring behavior. I thought there might be a performance gain, but I'd rather have interactive plots load at all than load fast, some of the times.
If the tests pass, I'll be releasing version 1.4.1 today. I'll post here again when it's released.
Laurent
Ok pandoc-plot 1.4.1 has been released. You can already install it from Hackage. Give GitHub a few hours to produce executables that you can download.
Let me know if things have been fixed for you
Thanks for your quick fix! It seems to work as expected now with version 1.4.1.
Dear @LaurentRDC ,
first of all, thank you for this filter, it allowed me to include some nice plotly figures in my Master's thesis. I really like having things that can be rebuilt on demand when some data changes etc., so this filter was really helpful.
Now I'm in the middle of preparing my defense and I thought I might try an HTML/JS slideshow instead of PDF, which would grant the ability to navigate the plots during the presentation.
My first attempts showed no errors, but no plots either, but I've been able to narrow the issue down. Apparently, the plotly JS doesn't like being loaded deferred, at least I can only see plotly figures when I remove all
defer
statements from the html file pandoc produces.I've attached a minimal reproducer (which additionally shows that for bokeh, deferred loading of the library works flawless). I'm not sure what would be the best option to solve this issue, perhaps making the deferred loading optional and disable it by default for plotly figures?
Here's the minimal reproducer:
bokeh foo
[julian@fedora pandoc_plot_reproducer]$ pandoc -v pandoc 2.14.0.3 Compiled with pandoc-types 1.22, texmath 0.12.3, skylighting 0.10.5.2, citeproc 0.4.0.1, ipynb 0.1.0.1 User data directory: /home/julian/.local/share/pandoc Copyright (C) 2006-2021 John MacFarlane. Web: https://pandoc.org This is free software; see the source for copying conditions. There is no warranty, not even for merchantability or fitness for a particular purpose. [julian@fedora pandoc_plot_reproducer]$ pandoc-plot -v 1.4.0 [julian@fedora pandoc_plot_reproducer]$ pip freeze | grep -i -e plotly -e bokeh bokeh==2.4.2 plotly==5.6.0
pandoc --filter pandoc-plot test.md --standalone -o test.html
firefox test.html chromium-browser test.html
sed 's/defer></></g' test.html > test_no_defer.html firefox test_no_defer.html chromium-browser test_no_defer.html